Collaborative Concurrency Control
Last updated
Last updated
Eventual delivery: every update made to one non-faulty replica is eventually processed by every non-faulty replica.
Convergence: any two replicas that have processed the same set of updates are in the same state.
Operation based
last write wins
Need arbitrary position arithemetic library.
Reliable broadcast ensures every operation is eventually delivered to every replica.
Applying operation is commutative: order of delivery doesn't matter.
State based
Merge operator must satisfy:
Best effort broadcast
Can tolerate message loss/duplication
has smaller message payload to broadcast
Initially the document has "BC"
User A inserts A at the beginning, the text becomes "ABC"
User B inserts D at the very end, the text becomes "BCD"
When then changes from user A get broadcast to userB, it works okay.
When the changes from user B: (insert, 2, "D") get broadcast to user A, it becomes "ABDC"
Operational transformation aim to transform the operation such that the operation will work correctly.