crdt.txt (923B)
1 CRDT 2 3 https://www.bartoszsypytkowski.com/the-state-of-a-state-based-crdts/ 4 5 We can discrimitate CRDTs using two core categories: 6 state-based (convergent) and operation-based (commutative) data types. 7 8 No matter which one we talk about, they all consists of two parts: 9 replication protocol and state application algorithms. 10 11 - Replication Protocol 12 - State Application Algorithms 13 14 Merge operation must conform to three properties: 15 16 1. Commutativity (x . y = y . x) 17 18 2. and Asociativity ((x . y) . z = x . (y . z)) which means that 19 we can perform out of order merge operations and still end up 20 with correct state 21 22 3. Idempotency (x . x = x), so we don't need to care about potential 23 duplicates send from replication layer 24 25 Those properties are not easy to guarantee, but you're going to see how far we 26 can go only by using two basic operations, which meet those criteria: 27 28 - union of two sets 29 - maximum of two values