Skip to main content

Event Sourcing

What event sourcing means, why storing events instead of only final state changes the architecture, and where it adds more complexity than value.

Andrews Ribeiro

Andrews Ribeiro

Founder & Engineer

What it is

Event sourcing means storing the history of changes as events.

Instead of saving only “current balance = 50”, you save things like:

  • credit of 100
  • debit of 30
  • debit of 20

The current state becomes the result of replaying that event sequence.

When it matters

This matters when the history itself has real value:

  • auditing
  • replay
  • rebuilding state
  • feeding multiple consumers from the same fact stream

Common mistake

The classic mistake is treating event sourcing as the natural next step for any CRUD system.

In practice, it only pays off when the event history is an important part of the product or the operation.

Short example

In a financial system, knowing the current balance is not enough.

You also want to know which events produced it.

Event sourcing preserves that trail as first-class data.

Why it helps

It helps when the value is in the event trail, not only in the final snapshot.

But it gets expensive in:

  • modeling
  • replay
  • versioning
  • derived reads

Event sourcing is not just a different database. It is a different way to think about state.

You finished this article

Keep exploring

Related articles