cassandratransactionsrdbmsisolation-levelrepeatable-read

Does Cassandra offer any semantics similar to REPEATABLE READ?


Does Cassandra offer any semantics similar to REPEATABLE READ?

I believe you can do this within a "batched" LWT, but doesn't this incur significant network overhead due to PAXOS? REPEATABLE READ allows other concurrent transactions to make some progress and not be completely blocked. Doesn't batched LWT completely block all other concurrent batch LWTs ?

We take REPEATABLE READ for granted on RDBMS, yet seems to be really costly on Cassandra. What techniques do developers use at the application level to enforce REPEATABLE READ on top of Cassandra ? (mainly to avoid Phantom Reads and Lost Updates)


Solution

  • Instead of taking things for granted, I would argue that developers fail to recognise that RDBMS share a lot of components particularly the storage layer among other things and there are a lot of single points-of-failure.

    It is able to achieve isolation because the data is stored on a shared infrastructure so it can be locked at a single location. But that's also its downfall -- RDBMS was not designed to accept millions of writes per second so locking is not an issue for it.

    It is easy to take for granted that Cassandra has a shared-nothing, distributed architecture that is designed for high velocity concurrent throughput at internet scale. It is designed to serve millions and millions of reads per second and accept writes from multiple clients.

    It was originally intended to solve problems at internet scale that Facebook had and so do a lot of internet giants. Its main purpose was to serve millions of concurrent requests at internet scale.

    Achieving isolation and atomicity in a distributed architecture is a very hard problem to deal. Having said all that, support for ACID transactions are coming to Apache Cassandra 5.0. To achieve this, teams at Apple and University of Michigan first had to solve it not with Paxos but with a new concensus protocol called Accord.

    For details see Patrick McFadin's blog post An Apache Cassandra Breakthrough: ACID Transactions at Scale and Aaron Ploetz's ACID Transactions Change the Game for Cassandra Developers. Cheers!