Why architecture matters here

Vector clocks fail on unbounded growth (many transient nodes) and confusion with wall-clock (they're not comparable that way). Architecture matters because bounded size + interpretation + resolution decide usefulness.

Advertisement

The architecture: every piece explained

The top strip is the algorithm. Nodes with counter per node. Increment on event local. Piggyback on messages. Merge (max) on receive.

The middle row is application. Comparison ≤/Version vectors per key. Conflict detection siblings. Resolution LWW / merge / user.

The lower rows are ops. GC of counters. Alternatives — HLC / dotted version vector. Ops — bounded size + fault tolerance.

Vector clocks — causality tracking + version vectors + conflict + GCwho wrote what, when, in a distributed worldNodes with counterper nodeIncrement on eventlocalPiggyback on messagescarry vectorMerge (max)on receiveComparison≤ / < / concurrentVersion vectorsper keyConflict detectionsibling valuesResolutionLWW / merge / userGC of countersavoid unboundedAlternativesHLC / dottedOps — bounded size + fault tolerance + observabilityorderper keydetectresolveboundcomparecompareoperateoperate
Vector clock mechanics + version vectors + conflict.
Advertisement

End-to-end flow

End-to-end: DB replica accepts write; increments its counter. Sends to peers with vector. Peers merge (element-wise max). Conflicting write on another replica produces concurrent vectors; siblings kept until resolution. GC drops old node entries.