2 ms·
Vector clocks are typically used to provide total order by using the node id as a tie break on concurrent sequence numbers.
by dboreham 3y ago
Vector clocks are typically used to provide total order by using the node id as a tie break on concurrent sequence numbers.
- josephg 3y agoIf you want a total order over a bunch of events, you don’t need vector clocks. A simple sequence number that everyone increments is usually enough. (Eg each event has max(seen)+1 and tie break on content or agent id or something). Vector clocks are valuable precisely because you can tell when concurrent events occur. Eg [1,2] and [2,1] are concurrent but [1,2] and [2,2] are ordered. You need this info for things like MVRegister CRDTs.
- catlifeonmars 3y agoI’m assuming you mean total order in a synchronized system. As soon as you introduce concurrency, max(seen) followed by a tie break is no longer guaranteed to be eventually consistent. Nodes can disagree on the order of past events; to put it another way, their histories will have diverged.