|
|
|
|
|
by CGamesPlay
1432 days ago
|
|
So what is needed here is some sort of data type that is replicated, and guaranteed to converge. A convergent, replicated data type… a CRDT! In this case it rather seems like you wanted a regular-old time stamp, not a lamport timestamp, which gives you a “last-write-wins register” CRDT. But perhaps you wanted something that actually handles the conflicts, like for a list of subscribers to an event. In that case you would want to use a vector clock instead of a lamport timestamp, and then when neither clock dominates the other (aka when they are tied), you take both sets and merge them. This is an incomplete outline of the “add-wins set” CRDT. I wish CRDTs were more mainstream :) |
|