Vol. I a living index of named laws · est. mmxxvi no ads · no account
The Law Tomeindex of named laws

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."
In plain English

What does Lamport's Happened-Before Relation mean?

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.

Build one

Lamport's Happened-Before Relation solver

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

P1: a b c
A process and its events, in local order
b->d
Event b sends a message received at d

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.

Reliability

Rated Empirical: grounded in studies or measurable evidence. The other 608.

Lineage
1978COINED
How it works

How does Lamport's Happened-Before Relation work?

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.

Where you'll see it

What are examples of Lamport's Happened-Before Relation?

Message causality If process P sends a message (event a) and process Q receives it (event b), the relation guarantees a happens-before b regardless of the processes’ physical clock readings.
Concurrent events Two events in different processes with no causal chain of messages connecting them are "concurrent," meaning their relative order is undefined and either could be considered first without contradiction.
Lamport timestamps The paper derives a logical-clock algorithm giving each event an integer timestamp such that happened-before implies a smaller timestamp: the basis for later vector clocks used in conflict detection.
Why it matters

Why does Lamport's Happened-Before Relation matter?

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.

Where it breaks down

What are the limits of Lamport's Happened-Before Relation?

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.

What it doesn't say

What are common misconceptions about Lamport's Happened-Before Relation?

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.

Is it real?

Is Lamport's Happened-Before Relation real?

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.

36 of 69entries in software & systems carry the same rating

The best-known laws are the least likely to rest on measurement.

Origin

Where did Lamport's Happened-Before Relation come from?

Introduced by Leslie Lamport in 1978 in "Time, Clocks, and the Ordering of Events in a Distributed System," Communications of the ACM.

Sources

Sources & further reading

  1. 1Happened-before, Wikipedia. — the three defining rules, the partial-order properties, and the link to Lamport and vector clocks.secondary
  2. 2Lamport, "Time, Clocks, and the Ordering of Events in a Distributed System," Communications of the ACM (1978). — the origin and its role in freeing distributed systems from physical-clock synchronisation.primary

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.

What we checked

  • 1,116entries in the tomeListed one by one on the browse page.
  • 1,116of them citing a sourceOpen any entry: its sources sit at the foot of the page.
  • 2,489source references in allEach is named, and linked wherever the source is online.