Computing Library › Data Systems
Data Systems

Event Sourcing and Append-Only Logs

Event sourcing records every change as an immutable event in an append-only log, so current state is derived by replaying history.

State as the sum of events

Most systems store current state and overwrite it as things change, losing the history. Event sourcing inverts this: it records every change as an immutable event appended to a log, and derives current state by replaying those events. The log becomes the source of truth, and the current state is just a view computed from it.

The append-only log

Kronos motion — current ramp

An append-only log is a sequence to which records are only ever added, never modified or deleted. Each event gets a position (offset) and is permanent. Because nothing is overwritten, the full history is preserved and any past state can be reconstructed by replaying the log up to a chosen point.

Benefits

Projections

A projection is a read model built by consuming the log, for example a current-value table or an aggregate. Because projections are derived, they can be discarded and rebuilt from the log at any time, and new projections can be added later to answer questions no one anticipated when the events were recorded.

Relevance to science

The append-only, immutable philosophy is exactly the discipline scientific data wants: measurements and derived changes are recorded permanently and never overwritten, so history is preserved and any result can be reconstructed. Log-based brokers apply the same idea to streaming, and lakehouse time travel applies it to tables. For a fusion program, an immutable record of raw inputs, calibrations, and processing events is what supports reproduction and audit of the published results.