Database Reference
In-Depth Information
production environment , but it can sometimes be useful for maintaining a
local development Redis server with access to production data.
Clustering/Sharding Databases
At the moment, Redis does not have a native sharding solution like many
other databases in the “NoSQL” world. There has been a sharded version of
Redis called Redis Cluster in the works for some time, but it has never been
released in a production form.
The only real option for sharding a Redis database right now is Twitter's
twemproxy tool (also known as nutcracker). This is a proxy server for both
Redis and Memcached that implements sharding features for both of these
key-value stores. Using twemproxy, servers are combined into pools and
writes are distributed across members of the pool using consistent hashing.
This allows for both redundancy and partitioning of the data across multiple
servers. The drawback is that not all Redis operations are supported, so if
complicated scripting or the publish/subscribe mechanism are used then
it may not be possible to use twemproxy without additional architectural
considerations, such as keeping a sharded and unsharded server pool.
MongoDB
Unlike Redis, MongoDB is a schema-less document store. It has been
developed by 10gen, a company that provides enterprise-level sales and
support for MongoDB installations with either a Software-as-a-Service or
an On-Premise model depending on the needs of the organization. It also
provides a Community edition, which does not provide many of the security
features available tothe Enterprise edition. It is the version discussed in this
section.
The MongoDB Model
The documents in a MongoDB are schema-less data structures represented
as JSON objects, which would be analogous to records in a traditional
database system or a value in a key-value store.
Although each of these documents has a unique identifier that can be used
to address it directly, the intention is that documents will be manipulated
en masse by grouping them into collections . These collections are roughly
analogous to a table in a relational database system, and it is expected that
Search WWH ::




Custom Search