NOSQL資料庫大比拼:Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase

banq發表於2011-01-02
Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison :: KKovacs

CouchDB

Written in: Erlang
關鍵點Main point: DB consistency一致性, ease of use易用
License: Apache
Protocol: HTTP/REST
Bi-directional (!) replication, 雙向複製
continuous or ad-hoc,
with conflict detection,衝突檢測
thus, master-master replication. (!)主主複製
MVCC - write operations do not block reads 寫操作不會阻塞讀操作
Previous versions of documents are available文字式
Crash-only (reliable) design 可靠性設計
Needs compacting from time to time
Views: embedded map/reduce 內部嵌入Hadoop之類map/reduce演算法
Formatting views: lists & shows
Server-side document validation possible
Authentication possible
Real-time updates via _changes (!)實時更新
Attachment handling
thus, CouchApps (standalone js apps)
jQuery library included

適合: 累計 堆積計算, 偶爾改變資料, 預先定義的查詢. 非常注重版本控制的場合.
舉例:: CRM, CMS系統. 主-主複製是其特別亮點,可以易於多個站點部署。


Redis

Written in: C/C++
關鍵點Main point:超快Blazing fast
License: BSD
Protocol: Telnet-like
Disk-backed in-memory database, 磁碟後備,記憶體資料庫。
but since 2.0, it can swap to disk.但是從2.0開始直接交換到磁碟。
Master-slave replication主-從複製
Simple keys and values,簡單的key-value形式
but complex operations like ZREVRANGEBYSCORE但是複雜操作類似ZREVRANGEBYSCORE
INCR & co (good for rate limiting or statistics)
Has sets (also union/diff/inter)
Has lists (also a queue; blocking pop)
Has hashes (objects of multiple fields)
Of all these databases, only Redis does transactions (!)在這些資料庫中,只有Redis有事務機制。
Values can be set to expire (as in a cache)如同快取一樣,值能被設定為超過一定時間過期失效。
Sorted sets (high score table, good for range queries)有排序的sets,善於range查詢。
Pub/Sub and WATCH on data changes (!)採取Pub/Sub 和觀察者WATCH事件觸發資料變化。

適合: 在可以控制的資料庫大小情況下(放得下整個記憶體),快速改變資料,快速寫資料。
案例:股票價格系統 分析,實時資料收集,聯絡等等。


[該貼被banq於2011-01-07 11:31修改過]

相關文章