Node A
[0, 0, 0]
A:
0
B:
0
C:
0
Node B
[0, 0, 0]
A:
0
B:
0
C:
0
Node C
[0, 0, 0]
A:
0
B:
0
C:
0
Send message (syncs vector clocks):

// event log

No events yet

How It Works

  • Each node maintains a vector of all node counters
  • Local event: increment own counter
  • Send message: increment own, send vector
  • Receive: merge vectors (take max), then increment own

Use Cases

  • Causality tracking in distributed DBs (Dynamo)
  • Conflict detection (CRDTs)
  • Event ordering in distributed tracing
  • Version vectors for replication