最近有很多关于卡桑德拉的话题。
Twitter, Digg, Facebook等都在使用它。
什么时候有意义:
使用卡桑德拉, 不用卡桑德拉,还有 使用RDMS而不是Cassandra。
最近有很多关于卡桑德拉的话题。
Twitter, Digg, Facebook等都在使用它。
什么时候有意义:
使用卡桑德拉, 不用卡桑德拉,还有 使用RDMS而不是Cassandra。
当前回答
除了上面给出的关于何时使用和何时不使用Cassandra的答案外,如果你决定使用Cassandra,你可能会考虑不使用Cassandra本身,而是使用它的众多表亲之一。
上面的一些答案已经指出了各种“NoSQL”系统,它们与Cassandra有许多相同的属性,有一些或大或小的差异,并且可能比Cassandra本身更适合您的特定需求。
Additionally, recently (several years after this question was originally asked), a Cassandra clone called Scylla (see https://en.wikipedia.org/wiki/Scylla_(database)) was released. Scylla is an open-source re-implementation of Cassandra in C++, which claims to have significantly higher throughput and lower latencies than the original Java Cassandra, while being mostly compatible with it (in features, APIs, and file formats). So if you're already considering Cassandra, you may want to consider Scylla as well.
其他回答
Mongodb有非常强大的聚合函数和一个富有表现力的聚合框架。它具有许多开发人员习惯于从关系数据库世界中使用的特性。例如,它的文档数据/存储结构允许比Cassandra更复杂的数据模型。
当然,所有这些都是有代价的。因此,当您选择数据库(NoSQL、NewSQL或RDBMS)时,请考虑您要解决的问题和可伸缩性需求。没有一个数据库可以完成所有的工作。
Cassandra是一个特定问题的答案:当您有太多数据,以至于无法在一台服务器上存储时,您该怎么办?如何将所有数据存储在多个服务器上,同时不破坏银行账户,不让开发人员抓狂?Facebook每天都会收到4tb的压缩数据。这个数字很可能在一年内增长两倍以上。
如果您没有这么多数据,或者您有数百万美元来支付企业Oracle/DB2集群安装费用,以及安装和维护它所需的专家,那么您可以使用SQL数据库。
然而,Facebook不再使用cassandra,现在几乎只使用MySQL,在应用程序堆栈中移动分区,以获得更快的性能和更好的控制。
Cassandra是个不错的选择,如果:
您不需要DB中的ACID属性。 DB上会有大量的写操作。 需要与大数据、Hadoop、Hive和Spark集成。 需要实时数据分析和生成报告。 有一个强大的容错机制的要求。 有一个齐次系统的要求。 调优需要大量的自定义。
another situation that makes the choice easier is when you want to use aggregate function like sum, min, max, etcetera and complex queries (like in the financial system mentioned above) then a relational database is probably more convenient then a nosql database since both are not possible on a nosql databse unless you use really a lot of Inverted indexes. When you do use nosql you would have to do the aggregate functions in code or store them seperatly in its own columnfamily but this makes it all quite complex and reduces the performance that you gained by using nosql.
除了上面给出的关于何时使用和何时不使用Cassandra的答案外,如果你决定使用Cassandra,你可能会考虑不使用Cassandra本身,而是使用它的众多表亲之一。
上面的一些答案已经指出了各种“NoSQL”系统,它们与Cassandra有许多相同的属性,有一些或大或小的差异,并且可能比Cassandra本身更适合您的特定需求。
Additionally, recently (several years after this question was originally asked), a Cassandra clone called Scylla (see https://en.wikipedia.org/wiki/Scylla_(database)) was released. Scylla is an open-source re-implementation of Cassandra in C++, which claims to have significantly higher throughput and lower latencies than the original Java Cassandra, while being mostly compatible with it (in features, APIs, and file formats). So if you're already considering Cassandra, you may want to consider Scylla as well.