nosql - Understanding Eventual Consistency in Cassandra from theory -


i on way writing bachelor thesis. therefore concerned consistency in theory , how cassandra applies theory. understand problem, consider following definitions of consistency (as far understood):

  • causal consistency:

    a system provides causal consistency if memory operations potentially causally related seen every node of system in same order. (wikipedia)

    so if process writes data x db , after process b reads data x , overwrites y, causal consistency ensured if b gets x after on replicas (resp. nodes).

  • read-your-write consistency:

    this special case of causal consistency. hereby reading , writing processed on same process a. type of consistency ensures never have older object of data after modification.

  • session consistency:

    in case process accesses db in session. long session exists, system guarantess read-your-write consistency

  • monotonic read consistency:

    if process gets specific data object after reading, system guarantees process on every subsequent read-access won't older data object.

  • monotonic write consistency:

    in case write options db done serialised whereby order of write options results process came first write.

    now consistency options in theory or 1 of them implemented in nosql-system. please correct me if understood wrong.

my question type of consistency provided cassandra? , how these consistencys related rule "r+w>n" respectively "r+w<=n"

whereby  r=read replica count  w=write replica count  n=replication factor  i'd appreciate quick answer. thank you!!! 

consistency levels in cassandra can set on read or write query. allows application developers tune consistency on per-query basis depending on requirements response time versus data accuracy. cassandra offers number of consistency levels both reads , writes.

you should first understand quorom

quorum middle-ground ensuring strong consistency, yet still tolerating level of failure.

a quorum calculated (rounded down whole number):

(replication_factor / 2) + 1

for example, replication factor of 3, quorum 2 (can tolerate 1 replica down). replication factor of 6, quorum 4 (can tolerate 2 replicas down).

for question explanation given below

(nodes_read + nodes_written) > replication_factor

r + w > n

for example, if application using quorum consistency level both write , read operations , using replication factor of 3, ensures 2 nodes written , 2 nodes read. combination of nodes written , read (4) being greater replication factor (3) ensures strong read consistency

you can read more quorom , consistency in detail in link posted below

http://www.datastax.com/docs/1.1/dml/data_consistency


Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

java - What is the difference between String. and String.this. ? -