The happens-before relation orders distributed-system events by possible causality. Event a precedes b when a occurs earlier on one component, sends the message that b receives, or reaches b through transitivity. section 2.2.1
Use the relation to distinguish three cases:
- a → b: a happened before b. section 2.2.1
- b → a: b happened before a. section 2.2.1
- a || b: the events are concurrent because neither causally precedes the other. section 2.2.1
A message creates a causal chain
If component A sends a message and component B receives it, the send happened before the receive. Any event after that receive also follows the send, even when the events occur on different components. section 2.2.1
Table 2.2 Happened-before relationships
| Situation |
Notation |
| a happened before b. |
a → b |
| b happened before a. |
b → a |
| a and b are concurrent. |
a || b = b || a |
Compare the notation for precedence and concurrency, alongside diagrams of local, message-based, and transitive ordering. section 2.2.1
Logical time makes happened-before order usable: Lamport clocks timestamp events, while Kafka offsets and etcd sequence numbers provide related ordering within their respective scopes. section 2.2.4




