I'm looking at a design where multiple clients will connect to Cassandra and
get/mutate resources, possibly concurrently. After planning a bit, I ran
into the following scenero for which I have not been able to research to
find an answer sufficient for my needs. I have found where others have
recommended Zookeeper for such tasks, but I want to determine if there is a
simple solution before including another product in my design.
Make the following assumption for all following situations:
Assuming multiple clients where a client is someone accessing Cassandra
using thrift. All reads and writes are performed using the QUORUM
consistency level.
Situation 1:
Client A ("A") connects to Cassandra and requests a QUORUM consistency level
get of an entire row. At or very shortly thereafter (before A's request
completes), Client B ("B") connects to Cassandra and inserts (or mutates) a
column (or multiple columns) within the row.
Does A receive the new data saved by B or does A receive the data prior to
B's save?
Situaton 2:
B connects and mutates multiple columns within a row. A requests some data
therein while B is processing.
Result?
Situation 3:
B mutates multiple columns within multiple rows. A requests some data
therein while B is processing.
Result?
Justification: At certain points I want to essentially lock a resource (row)
in cassandra for exclusive write access (think checkout a resource) by
setting a flag value of a column within that row. I'm just considering race
conditions.
Thanks,
Lucas Nodine