Is Cassandra for OLAP or OLTP or both?
Asked Answered
C

2

12

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?

Cable answered 25/5, 2016 at 10:11 Comment(1)
If you read and write quorum, C* is consistent. Plenty of banks use C*, even for payments. Check some of the Cassandra summit videos for real use cases. In general, C* is oltp not okay, though there are some near real time olap use cases that you can take down with spark on C* and DSE.Bozeman
U
13

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.

Useful answered 26/5, 2016 at 9:11 Comment(0)
E
-3

Cassandra should be avoided for OLTP applications , even they state that it might not be the perfect use case for OLTP.Even though you can achieve a fully consistent model with setting Write Consistency to All , this would make writing rather a tough process , for the coordinator node to write that data to all partitions of all replicated nodes.And also if your Cassandra system is massively replicated across different Data Centers, maybe across different Continents then the time taken to write will increase dramatically.

Elliot answered 15/6, 2020 at 16:22 Comment(2)
Actually, Cassandra handles OLTP much better than it handles OLAP. You don't need to guarantee full consistency to sustain hundreds of thousands of transactions per second. Also, the write operation is "complete" once the configured consistency is met; not when all replicas are written. Additionally, any high-throughput transaction service is going to use the TokenAwareLoadBalancingPolicy, which negates the need for a coordinator node all together. -1Menticide
Thanks , TokenAwareLoadBalancingPolicy does not need a coordinator node , it directly helps in storing the data in the respective partition. I will try to find some good reading material on Cassandra's OLTP handling,Elliot

© 2022 - 2024 — McMap. All rights reserved.