问题
Cassandra does not comply with ACID like RDBMS but CAP. So Cassandra picks AP out of CAP and leaves it to the user for tuning consistency. I definitely cannot use Cassandra for core banking transaction because C* is slightly inconsistent. But Cassandra writes are extremely fast which is good for OLTP. I can use C* for OLAP because reads are extremely fast which is good for reporting too. So i understood that C* is good only when your application do not need your data to be consistent for some amount of time but reads and writes should be quick? If my understanding is right kindly list some applications?
回答1:
ACID are properties of relational databases where BASE are properties of most nosql databases and Cassandra is one of the. CAP theorem just explains the problem of consistency, availability and partition tolerance in distributed systems. Good thing about Cassandra is that it has tunable consistency so you can be pretty much consistent (at the price of partition tolerance) so OLTP is doable. As phact said there are even some banks that built their transaction software on top of Cassandra. OLAP is also doable but not with just Cassandra since its partitioned row storage limits its capabilities. You need to have something like Spark to be able to do complex queries required.
来源:https://stackoverflow.com/questions/37434016/is-cassandra-for-olap-or-oltp-or-both