A distributed system has no instant at which one observer can read every process and channel. A global snapshot therefore captures a consistent cut: local states plus messages in transit that could coexist in one execution.
What makes a cut consistent
If a cut contains a receive event, it must also contain the corresponding send. Otherwise the snapshot shows an effect without its cause. A send may be inside while its receive is outside; that message belongs to channel state.
In plain terms: money may be absent from both account snapshots only if the transfer is recorded as still in transit.
Chandy-Lamport markers
Under reliable FIFO channels:
- The initiator records its local state and sends a marker on every outgoing channel.
- A process receiving its first marker records local state, treats that incoming channel as empty, then forwards markers.
- Until a marker arrives on another incoming channel, messages received there are recorded as channel state.
- The snapshot finishes after every process and incoming channel is recorded.
The marker separates messages logically before and after the snapshot without pausing normal messages.
What snapshots are for
- distributed checkpointing and recovery;
- detecting stable properties such as termination or deadlock;
- debugging and auditing;
- measuring global state such as tokens or balances.
The result is not necessarily the state at one physical-clock instant. It is a causally valid state from the execution.
Review card
- Global state contains process state and channel state.
- A consistent cut never includes an effect without its cause.
- In-transit messages explain state crossing the cut.
- Chandy-Lamport relies on FIFO channels in its basic form.
- Markers record boundaries while application traffic continues.