什么时候不使用 Cassandra? [英] When NOT to use Cassandra?

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

问题描述

最近有很多关于 Cassandra 的讨论.

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

Twitter、Digg、Facebook 等都在使用它.

Twitter, Digg, Facebook, etc all use it.

什么时候有意义:

  • 使用 Cassandra,
  • 不要使用 Cassandra,并且
  • 使用 RDMS 而不是 Cassandra.

推荐答案

没有什么是灵丹妙药,一切都是为了解决特定问题而构建的,各有优缺点.您有什么问题陈述以及最适合该问题的解决方案取决于您.

There is nothing like a silver bullet, everything is built to solve specific problems and has its own pros and cons. It is up to you, what problem statement you have and what is the best fitting solution for that problem.

我会尽量按照您提出的问题的顺序一一回答.由于 Cassandra 基于 NoSQL 系列数据库,因此在我回答您的问题之前,您了解为什么使用 NoSQL 数据库非常重要.

I will try to answer your questions one by one in the same order you asked them. Since Cassandra is based on the NoSQL family of databases, it's important you understand why use a NoSQL database before I answer your questions.

为什么要使用 NoSQL

在 RDBMS 的情况下,做出选择非常容易,因为该类别中的所有数据库(如 MySQL、Oracle、MS SQL、PostgreSQL)都提供了几乎相同类型的面向 ACID 属性的解决方案.当谈到 NoSQL 时,决定变得困难,因为每个 NoSQL 数据库都提供不同的解决方案,您必须了解哪一个最适合您的应用程序/系统要求.例如,MongoDB 适用于您的系统需要无模式文档存储的用例.HBase 可能适用于搜索引擎、分析日志数据或任何需要扫描巨大的二维无连接表的地方.Redis 旨在为树、队列、链表等各种数据结构提供内存中搜索,非常适合制作实时排行榜、发布订阅类系统.同样,该类别中还有其他数据库(包括 Cassandra)适用于不同的问题陈述.现在让我们转到原始问题,并一一回答.

In the case of RDBMS, making a choice is quite easy because all the databases like MySQL, Oracle, MS SQL, PostgreSQL in this category offer almost the same kind of solutions oriented toward ACID properties. When it comes to NoSQL, the decision becomes difficult because every NoSQL database offers different solutions and you have to understand which one is best suited for your app/system requirements. For example, MongoDB is fit for use cases where your system demands a schema-less document store. HBase might be fit for search engines, analyzing log data, or any place where scanning huge, two-dimensional join-less tables is a requirement. Redis is built to provide In-Memory search for varieties of data structures like trees, queues, linked lists, etc and can be a good fit for making real-time leaderboards, pub-sub kind of system. Similarly there are other databases in this category (Including Cassandra) which are fit for different problem statements. Now lets move to the original questions, and answer them one by one.

何时使用 Cassandra

作为 NoSQL 家族的一员,Cassandra 为以下问题提供了解决方案:您的要求之一是拥有一个非常繁重的写入系统,并且您希望在存储的数据之上拥有一个反应灵敏的报告系统.考虑 Web 分析的用例,其中为每个请求存储日志数据,并且您希望围绕它构建一个分析平台,以实时计算每小时、浏览器、IP 等的点击量.你可以参考这个 博客文章,以了解有关 Cassandra 适合的用例的更多信息.

Being a part of the NoSQL family, Cassandra offers a solution for problems where one of your requirements is to have a very heavy write system and you want to have a quite responsive reporting system on top of that stored data. Consider the use case of Web analytics where log data is stored for each request and you want to built an analytical platform around it to count hits per hour, by browser, by IP, etc in a real time manner. You can refer to this blog post to understand more about the use cases where Cassandra fits in.

何时使用 RDMS 而不是 Cassandra

Cassandra 基于 NoSQL 数据库,不提供 ACID 和关系数据属性.如果您对 ACID 属性(例如财务数据)有很强的要求,那么 Cassandra 将不适合这种情况.显然,您可以为此制定一个解决方法,但是您最终会编写大量应用程序代码来模拟 ACID 属性,并且会严重浪费上市时间.此外,使用 Cassandra 管理此类系统对您来说既复杂又乏味.

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

何时不使用 Cassandra

如果上面的解释有道理,我认为不需要回答.

I don't think it needs to be answered if the above explanation makes sense.

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆