本文介绍了何时不使用Cassandra?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近有很多关于的演讲。



Twitter,Digg,Facebook等都使用它。



什么时候有意义:




  • 使用Cassandra,

  • 不使用Cassandra,

  • 使用RDMS而不是Cassandra。 / li>

解决方案

没有什么像银子弹,一切都是为了解决具体问题而建立的,利弊。这取决于你,你有什么问题声明,什么是最适合解决这个问题。
我会尝试按照你问的顺序逐个回答你的问题。由于Cassandra基于NoSQL系列数据库,因此在回答您的问题之前,了解为什么要使用NoSQL数据库很重要。



为什么使用NoSQL



在RDBMS数据库的情况下,做出选择是很容易的,因为几乎所有的数据库,如MySQL,Oracle,MS SQL,PostgreSQLin这个类别提供了几乎相同的解决方案面向NoSQL,决策变得困难,因为每个NoSQL数据库提供不同的解决方案,你必须了解哪一个最适合你的应用/系统需求。例如,MongoDB适合您的系统需要无模式文档存储的用例。 HBase可能适合于搜索引擎,分析日志数据,任何需要扫描巨大的二维无连接表的地方。 Redis是为了提供内存搜索树,队列,链表等各种数据结构而构建的,可以很好地适用于实时排行榜,pub-sub系统。类似地,在这个类别(包括Cassandra)中有其他数据库适合不同的问题陈述。


$ b现在可以移动到原始问题,并一一回答。



使用Cassandra $ b

作为NoSQL系列的一部分,Cassandra提供了一个问题解决方案,您的要求是具有非常繁重的写入系统,并且您希望在存储的数据之上有相当灵活的报告系统。考虑Web分析的使用情况,其中为每个请求存储日志数据,并且您希望围绕它建立分析平台以按小时,按浏览器,由IP等实时地计数命中。
您可以参考博客文章()了解更多关于Cassandra适用的用例。 / p>

何时使用RDMS而不是Cassandra



Cassandra基于NoSQL数据库并且不提供ACID和关系数据属性。如果你有强烈的ACID属性要求(例如财务数据),Cassandra将不适合这种情况。显然,你可以使它的工作,但是,你会最终写了大量的应用程序代码来处理ACID属性,并将随时间上市不好。



不使用Cassandra时



如果上面的解释有意义,我不认为需要回答。


There has been a lot of talk related to Cassandra lately.

Twitter, Digg, Facebook, etc all use it.

When does it make sense to:

  • use Cassandra,
  • not use Cassandra, and
  • use a RDMS instead of Cassandra.

解决方案

There is nothing like Silver bullet, everything is built to solve specific problem and has its own pros and cons. It is up to you, what problem statement you have and what is best fit for solution of that problem.I will try to answer your question one by one in the same order you asked. Since Cassandra is based on NoSQL family database, it is important to understand why to use NoSQL database before I answer your questions.

Why to Use NoSQL

In the case of RDBMS database, making choice is quite easy because almost all the databases like MySQL, Oracle, MS SQL, PostgreSQLin this category offers almost same kind of solutions oriented to ACID property.When it comes to NoSQL, decision becomes difficult because every NoSQL database offers different solution and you have to understand which one is best suited for your app/system requirement. For example, MongoDB is fit for usecases where your system demands schema-less document store. HBase might be fit for Search engines, Analysing log data, Any place where scanning huge, two-dimensional join-less tables are a requirement. Redis is built to provide In-Memory search for varieties of data structures like tree, queue, link list etc and can be good fit for making real time leaderboard, pub-sub kind of system. Similarly there are other database in this category (Including Cassandra) which are fit for different problem statement. Now lets move to original question, and answer them one by one.

When to use Cassandra

Being a part of NoSQL family Cassandra offers solution for problem where your requirement is to have very heavy write system and you want to have quite responsive reporting system on top of that stored data. Consider use case of Web analytics where log data is stored for each request and you want to built analytical platform around it to count hits by hour, by browser, by IP, etc in real time manner.You can refer to blog post (http://blogs.shephertz.com/2015/04/22/why-cassandra-excellent-choice-for-realtime-analytics-workload/) to understand more about the use cases where Cassandra fits in.

When to Use a RDMS instead of Cassandra

Cassandra is based on NoSQL database and does not provide ACID and relational data property. If you have strong requirement of ACID property (for example Financial data), Cassandra would not be a fit in that case. Obviously, you can make work out of it, however you will end up writing lots of application code to handle ACID property and will loose on time to market badly. Also managing that kind of system with Cassandra would be complex and tedious for you.

When not to use Cassandra

I dont think it needs to be answered if above explanation makes sense.

这篇关于何时不使用Cassandra?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 10:42