Skip to main content

Module vclock

Module vclock 

Source
Expand description

Vector clock for causal ordering in distributed agent systems.

§Responsibility

Provide a per-node logical timestamp that allows agents to establish causal ordering of events without relying on synchronized wall clocks.

§Guarantees

  • Merge is commutative, associative, and idempotent.
  • tick is non-blocking and O(1).
  • compare is O(n) in the number of distinct nodes.

Structs§

VectorClock
A vector clock: maps node_id to logical timestamp.

Enums§

ClockOrder
The causal ordering relationship between two vector clocks.