Francisco Giraldo

Event sourcing

Published 2 min read

Notes taken from the Event Sourcery Youtaube channel.

What is event sourcing?

Event sourcing

Event sourcing is the practice of building application state from only domain events.

Object life cycle

Every interaction with an object triggers an event. Each event contain individual information from the object state.


  1. Check business rules (called Invariants)
  2. Event is raised
  3. Event is applied
  4. Update object state accordingly

Persistance (Event Store)

The events information is persisted. Not the object representation per se. All the events state form the whole object state.



  • All the object instance history is persisted. No data is overwritten (Immutable). (No update SQL statements).
  • Data can be queried on a give time range. (Like having a timemachine)
  • The system flow is similar to the real business flow. It reflects the ideas of the business.
  • The real world is event driven, so it's easier to create a system using events.

When to use


Keep reading other of my blog posts!