Forward operation
A deterministic state transition f(s, e) → s' that advances the system from state s to s' by applying event e.
A reference architecture for systems that can undo — rollback databases, event-sourced ledgers, version control engines, and fault-tolerant pipelines.
A deterministic state transition f(s, e) → s' that advances the system from state s to s' by applying event e.
A paired transition f-1(s', e) → s that recovers the prior state. Existence of f-1 defines reversibility.
Directed acyclic ordering ei ≺ ej identifying the dependency closure that must be undone alongside any reverted event.
The four atomic constructs from which every reversible system is composed. A complete implementation must specify each.
Periodic snapshot of the full state vector. Recovery distance bounded by checkpoint cadence Δtc.
checkpoint(s) → σ
Append-only log of intent records. Replayable in either direction; the foundation of write-ahead and event-sourced systems.
append(j, e) → j'
Causal dependency graph connecting events. A revert must include the transitive closure of dependents to remain consistent.
deps(e) → G′
Forward-only inverse for non-reversible side effects (network calls, payments). Records a counteracting transaction rather than rewinding.
comp(e) → e′
An isometric view of the canonical write-and-replay pipeline. Boxes are subsystems; dashed lines are pending or asynchronous channels.
A specification table of the four dominant rollback strategies. Cells are indicative; constants depend on workload.
| Approach | Granularity | Recovery cost | Storage | Reversible | State |
|---|---|---|---|---|---|
checkpoint & restart |
full state | O(σ) | O(n · |s|) | partial | committed |
WAL replay (ARIES) |
page | O(j) | O(j) | full | committed |
event sourcing |
event | O(j) + projection | O(j) | full | pending |
compensation (sagas) |
transaction | O(k) | O(k) | logical | pending |
copy-on-write |
page/object | O(1) ptr swap | O(Δ) | full | committed |
shadow paging |
page tree | O(log n) | O(Δ) | full | deprecated |
A trace through ten ordered events. Click an event to highlight its transitive lineage.
Reversibility is only meaningful under a defined failure envelope. The matrix below enumerates supported and unsupported faults.
Recoverable via journal replay from the last checkpoint σ. Bounded recovery time O(j).
Durable WAL guarantees no committed transition is lost. Re-attach and redo.
Quorum-based coordinator stalls writes; reads degrade gracefully under chosen consistency level.
Compensating transactions emitted; cannot fully rewind external state, but ledger reaches consistency.
Out of scope. Requires cryptographic lineage and external attestation.
Unrecoverable without off-host replica. Mitigation: synchronous replication to remote journal.
Selected literature establishing the formal basis of reversibility in distributed systems.