Technology & platformNew⏱ ~1 min

Event sourcing

Storing everything that has happened as an immutable sequence of events, and deriving current state by replaying them, instead of overwriting.

In an ordinary databaseOrganised collection of structured information stored and accessed electronically - foundation of all digital systems. the value is overwritten when something changes. You are left with the current state and have lost the path to it. Event sourcing inverts this: the events are the truth, and current state is something you compute by replaying them in order. Nothing is overwritten, and the log can be read again.

That yields three properties that are hard to retrofit. You can recreate the state at any point in time. You have an audit trail without building it as a separate mechanism, because the log IS the trail. And you can run history through new logic, replaying what happened against a model that did not exist at the time.

ArchitectureIntegration