recall

← recall

Lamport clock concept

Each event on a node increments a local counter; messages carry the counter; receivers set their own counter to max(local, received) + 1.

Each event on a node increments a local counter; messages carry the counter; receivers set their own counter to max(local, received) + 1. If event a has timestamp less than event b, then a *might* have happened before b — but Lamport timestamps are a partial order, so concurrent events can get any relative timestamp. Doesn't capture full causality (vector clocks do), but cheap and enough for many ordering needs.

see also

topics: distributed-systems, consensus

references: