Recently, the company is making a NoSQL model selection, and has made the following Rough Analysis and Comparison on several common NoSQL databases over a week.
Recently, the company is making a NoSQL model selection, and has made the following Rough Analysis and Comparison on several common NoSQL databases over a week.
Recently, the company is making a NoSQL model selection, and has made the following Rough Analysis and Comparison on several common NoSQL databases over a week.
Glossary:
Distributed Storage Unit: in distributed storage, large data files are usually cut into different blocks for separate storage on different machines. Each split block is called a storage unit.
I. CouchDB
CouchDB is a document-oriented nosql database. The document storage format is described in JSON, and the structure deployment adopts the peer-based mode, that is to say, each machine is equally important in terms of functions. Without the distinction between the master and slave, the stored data is also the same (without distributed storage of data ), similar to the concepts of version library and work copy in Subversion.
The features stated in the official documentation mainly include the following:
1. multi-platform deployment, including Android and iOS
2. Excellent data integrity and reliability support
3. native support for BLOB Data Types
4. document-based version management
5. The framework comes with MapReduce Components
6. query support (using javascript)
7. Provide Java API and REST API
Advantages:
Multi-platform support (mobile platform)
When the data volume is small, it can be used offline as a standalone version and updated online when necessary.
Ii. Redis
Redis is a nosql database based on the key-value storage format. It adopts the master/slave Mode in structural deployment. The slave node acts as a backup, when a problem occurs on the master node, the slave node can be replaced with the master node to ensure the security and stability of the system.
Distributed Storage Unit: slot (a set of key/value storage Records)
There may be multiple matser nodes in a cluster. The master node records the slot information stored between each other through communication, this ensures that the client can locate the required slot through any master node. After obtaining the slot information, the client will cache the slot address locally, this accelerates the efficiency of the next query.
Deployment structure:
Note: The figure does not show the slave node (slave only serves to back up the master). All the circles are master nodes, and the communication between the master nodes is in a mesh structure.