Event sourcing is a different way to think about data. Instead of storing only the latest state and throwing the past away, every change in the system is captured as an immutable event. The result is a complete, verifiable history of what actually happened.
Facts instead of state
A classic table stores that a customer lives in Gotham. An event store stores that the customer registered, moved to Metropolis and moved back to Gotham. The current state is derived from these facts, and so is any other view you need later.
What it gives you
- Auditability. Every change is recorded with its time and origin. Nothing is overwritten.
- Debugging. Replay the events that led to a problem and see exactly how the system got there.
- Time travel. Reconstruct the state at any point in the past.
- New views for free. Build projections, reports and read models from the existing history, even for questions nobody asked when the events were written.
- Clear domain logic. Business rules work on explicit facts like
order-placedandpayment-receivedinstead of on mutable rows.
Where GenesisDB fits
GenesisDB is the storage for those events. It appends them atomically, guards commits with preconditions, keeps the history tamper evident with a hash chain, and lets you read, subscribe to and query the events. Projections and read models live in your application.