Lamport's Happened-Before Relation
"The happened-before relation defines a partial causal order on distributed events using only message sends/receives and each process's own local sequence, with no shared clock."
"The happened-before relation defines a partial causal order on distributed events using only message sends/receives and each process's own local sequence, with no shared clock."
Introduced by Leslie Lamport in his 1978 paper "Time, Clocks, and the Ordering of Events in a Distributed System," happened-before formalises causality among events across processes that communicate only by message passing. Two events not connected by the relation are "concurrent," meaning neither could have causally influenced the other, even though a real-time observer might see one occur before the other.
Without a shared clock, "before" is not a total order. Two events can be genuinely incomparable, and the relation tells you exactly which. Describe the processes and the messages between them.
a -> b if same process and earlier, or a is a send and b its receive, or by transitivity
Everything the relation can know comes from local order and message passing. Any pair it leaves unordered is concurrent, and no observer inside the system can say which happened first. Lamport built vector clocks to carry exactly this information.
Rated Empirical: grounded in studies or measurable evidence. The other 608.
The relation is built from two basic rules plus transitivity: if two events occur in the same process, they are ordered by that process’s own sequence; if event a is the sending of a message and b its receipt, then a happens-before b; and if a happens-before b and b happens-before c, then a happens-before c. Lamport showed this partial order can be captured numerically by logical (Lamport) clocks: counters each process increments locally and updates on receiving a message.
It gave distributed systems a rigorous, physically realisable notion of event ordering without relying on synchronised real-world clocks, underpinning later work on vector clocks, distributed snapshots, causal consistency, and consensus protocols.
Happened-before gives only a partial order, many event pairs are concurrent, so it cannot by itself resolve all ordering questions; total ordering requires tie-breaking rules Lamport also proposed. Lamport timestamps alone cannot detect concurrency, which is why vector clocks were later developed.
It is sometimes conflated with real time ordering; happened-before is a causal, not temporal, relation, so two causally unrelated events can be labelled "concurrent" even if one is recorded at an earlier wall-clock time.
Yes, as far as the evidence goes. Lamport's Happened-Before Relation is rated Empirical here: it rests on studies or measurements rather than on a saying.
Rated from two sources. 609 of the 1,116 entries carry this rating. How the scale works.
The best-known laws are the least likely to rest on measurement.
Introduced by Leslie Lamport in 1978 in "Time, Clocks, and the Ordering of Events in a Distributed System," Communications of the ACM.
Everything above traces to en.wikipedia.org and lamport.azurewebsites.net, two sources in all, one of them the original publication rather than an account of it. Nothing is written from memory, and the method is written down. Spot an error or a better source? Suggest a fix.