Dynamo database, leaderless, quorum read/write, vector clock.
database, ACID
cache coherent, consistency
linearizable, 用户写的action发生了,那么read的时候就要读出write的内容
leaderless, quoram write, quoram read
read repair
or a background process to detect the stale data in replica
如果是read repair,某些data一直没有被read repair过,有些机器down了。good data node不在了。所以一定要有background process
anti-entrophy
the higher entropy, the greater the disorder
3 nodes.
r+w>n.
when w=1, r=3.
user1 only write (“a”, 1) in replica1, vector = [1, 0, 0].
user2 only write (“a”, 2) in replica2, vector = [0, 0, 1].
2 writes persistent in different replicas.
In this way, there will be conflict when reading from 3 replicas.
sloppy quorum, r+w is not greater than n
sloppy quorums and hinted handoff
redo log, undo log
snowflake calculate UUID, no conflict UUID
write conflicts的时候,如何resolve conflict?
This is a isolation problem. 2 users both write same record at same time.
MVCC(multi version concurrent control)
CRDT