Skip to content

Commit

Permalink
[doc] Some general information about databases
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Mar 21, 2013
1 parent 63509ad commit e08476c
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 11 deletions.
73 changes: 73 additions & 0 deletions content/databases/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,74 @@
Nodejitsu's database offering allows you to easily create a free tier database
with our database partners.

### [MongoDB](/documentation/databases/mongodb)

[MongoDB][mongodb] is an open source document database created by 10gen. MongoDB
is really popular for Node.js applications as it's build on top of JavaScript
and using JSON in Node feels really natural. It features:

<dl>
<dt>Document Oriented</dt>
<dd>It stores JSON documents with flexible schema's</dd>

<dt>Querying</dt>
<dd>Custom query language that is optimized for JSON documents</dd>

<dt>In-place updates<dt>
<dd>Atomic modifiers for contention-free performance</dd>

<dt>Map/Reduce</dt>
<dd>Map/Reduce can be used for data aggregation and processing</dd>

<dt>GridFS</dt>
<dd>Supports storing files of any size without complicating your stack</dd>
</dl>

### [Redis](/documentation/databases/redis)

[Redis][redis] is an open source key-value database created by antirez. It's
famous for it's high speed which achieved by storing all data in memory. It has
uses a simple protocol that was inspired by the memcached ASCII protocol. Some
of it's highlights:

<dl>
<dt>Different data types</dt>
<dd>Add data to lists, hashes or sets.</dd>

<dt>Pub/Sub</dt>
<dd>Redis comes with fast and stable Publish/Subscribe messaging system build in</dd>

<dt>Lua scripting</dt>
<dd>Execute Lua scripts to aggregate and process data</dd>

<dt>Expires</dt>
<dd>Redis allows you to set the time to live different for every key</dd>
</dl>

### [CouchDB](/documentation/databases/redis)

[Couchdb][couchdb] is also an open source database that uses JSON for
documentation storage, JavaScript for Map/Reduce queries and HTTP for an API. As
HTTP is a first class citizen in Node.js it's really easy to use this. But also:

<dl>
<dt>Build for Offline</dt>
<dd>
CouchDB can replicate to devices (like smartphones) that go offline and
syc when it's online
</dd>

<dt>ACID</dt>
<dd>It does this by implementing Multi-Version Concurrency Control</dd>
</dl>

## Do we get access to the providers web interfaces?

The database details that are created for database do no provide you with access
to the providers web interfaces. The databases are created Nodejitu's account
and thus not accessible.

[mongodb]: http://www.mongodb.org/
[redis]: http://redis.io/
[couchdb]: http://couchdb.apache.org/
[meta:title]: <> (Databases)
22 changes: 11 additions & 11 deletions content/databases/redis.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Database provisioners
# Database provisioner's

## IrisCouch

Expand All @@ -7,20 +7,20 @@

## Connecting using the redis-cli CLI tool

If you have redis running locally, you will probably have the `redis-cli`
If you have Redis running locally, you will probably have the `redis-cli`
installed as well.

```bash
redis-cli -h <hostname> -p <port> -a <password>
```

Once you are connected you can simply any of the redis commands. You can type a
Once you are connected you can simply any of the Redis commands. You can type a
simple `ping` or `info` command to check if the connection is working as
intended.

## Connecting to redis using the Node.js Redis module
## Connecting to Redis using the Node.js redis module

The `redis` module is a complete redis client for Node.js. It supports all the
The `redis` module is a complete Redis client for Node.js. It supports all the
commands including support for `EVAL`. The module makes use of it's own pure
JavaScript parser but has the option to the official `hiredis` C library for
parsing. The C library however is not compatible with Smart OS (the operating
Expand Down Expand Up @@ -53,22 +53,22 @@ client.auth(/* password */, function auth(err) {
client.ping(function ping(err) { });
```

There's more dedicated documentation available in the the
[node-redis][node-redis] Github repository.
There's more dedicated documentation available in the [node-redis][node-redis]
Github repository.

## Connecting to redis using the IrisCouch Redis module
## Connecting to Redis using the IrisCouch Redis module

The `iris-redis` client is a wrapper for the orfginal `redis` client which makes it
The `iris-redis` client is a wrapper for the original `redis` client which makes it
easier to connect to the IrisCouch Redis servers. In addition to that it
provides you with the option to upgrade your connection to a direct connection
to reduce the latency between the database and your application. Please note
that this only works if you are in the same datacenter.
that this only works if you are in the same data center.

```bash
npm install iris-redis --save
```

If you want to learn more about this special IrisCouch redis module take a look
If you want to learn more about this special IrisCouch Redis module take a look
at the [iris-redis][iris-redis] Github repository.

[node-redis]: https://github.com/mranney/node_redis#readme
Expand Down

0 comments on commit e08476c

Please sign in to comment.