2 + - ry 4 5 Sunday, July 1, 12 Ryan is added to the set on the left, added and then removed on the right, which is how we got into the current conflict.
5 + - ry 5 2 + - ry 4 5 Sunday, July 1, 12 Ryan is added to the set on the left, added and then removed on the right, which is how we got into the current conflict.
4, 5 4 Sunday, July 1, 12 each element is a 2P-set of additions and removals to remove ryan from the set, we put the corresponding removal in the “removed” part of his 2P-set
4, 5 4, 5 Sunday, July 1, 12 each element is a 2P-set of additions and removals to remove ryan from the set, we put the corresponding removal in the “removed” part of his 2P-set
4, 5 4, 5 Sunday, July 1, 12 we can use this to implement a list of users that have responded to a social event: they add to the “+” set when they say yes, and to the “-” set when they say no
4, 5 4, 5 I was indecisive! Sunday, July 1, 12 we can use this to implement a list of users that have responded to a social event: they add to the “+” set when they say yes, and to the “-” set when they say no
4, 5 4, 5 I was indecisive! Of course! Sunday, July 1, 12 we can use this to implement a list of users that have responded to a social event: they add to the “+” set when they say yes, and to the “-” set when they say no
4, 5 4, 5 I was indecisive! Of course! I have to do my hair that day :( Sunday, July 1, 12 we can use this to implement a list of users that have responded to a social event: they add to the “+” set when they say yes, and to the “-” set when they say no
r(f) to the payload in order to deal cleanly with operations concurrent with f. As an example, in the Add-Remove Partial Order of Section 3.4.2, remove leaves a tombstone in order to allow addBetweens to proceed. Once f is stable, i.e., all operations concurrent with f have been delivered, r(f) serves no useful purpose. A GC opportunity exists to detect this condition and discard r(f). Liveness of Φ requires that the set of replicas be known and that they not crash per- manently (undetectably). Under these assumptions, the stability algorithm of Wuu and Bernstein [44] can be adapted. The algorithm assumes causal delivery. An update g has an associated vector clock v(g). Replica xi maintains the last vector clock value received from every other replica x , noted V min(j), which identifies all updates that x knows to have been delivered by x . Replica must periodically propagate its vector clock to update V min values, possibly by sending empty messages. With this information, (∀j : V min(j) ≥ v(f)) 㱺 Φ (f). Importantly, the information required is typically already used by a reliable delivery mech- anism, and GC can be performed in the background. Sunday, July 1, 12
r(f) to the payload in order to deal cleanly with operations concurrent with f. As an example, in the Add-Remove Partial Order of Section 3.4.2, remove leaves a tombstone in order to allow addBetweens to proceed. Once f is stable, i.e., all operations concurrent with f have been delivered, r(f) serves no useful purpose. A GC opportunity exists to detect this condition and discard r(f). Liveness of Φ requires that the set of replicas be known and that they not crash per- manently (undetectably). Under these assumptions, the stability algorithm of Wuu and Bernstein [44] can be adapted. The algorithm assumes causal delivery. An update g has an associated vector clock v(g). Replica xi maintains the last vector clock value received from every other replica x , noted V min(j), which identifies all updates that x knows to have been delivered by x . Replica must periodically propagate its vector clock to update V min values, possibly by sending empty messages. With this information, (∀j : V min(j) ≥ v(f)) 㱺 Φ (f). Importantly, the information required is typically already used by a reliable delivery mech- anism, and GC can be performed in the background. tl; dr: garbage collection is necessary but can be dicey! Sunday, July 1, 12
If you’re lucky, your app will grow bigger than you can handle with a single-machine database. Distributed databases make compromises that CRDTs can work
r1n5 r1n1 r1n2 r1n3 r1n4 r1n5 Sunday, July 1, 12 If you’re really spectacularly lucky, your app will grow beyond one datacenter. Distributed databases are the only way to handle this.