Event Sourcing

Event Sourcing is a software architecture pattern in which all changes to an application's state are stored as a sequence of events. Instead of saving only the current state in a database, every state change is recorded as an immutable event. The current state can always be reconstructed by replaying the event history.

# Origin The concept of persisting events rather than state has deep roots in computer science, but the modern architectural pattern was formalized by Greg Young around 2007. His work, influenced by Eric Evans’s *Domain-Driven Design* (2003), framed Event Sourcing as a practical way to model evolving systems with clear histories and explicit intent.

# Key Ideas - **Event Log**: Every change to the system is captured as a domain event and appended to an event store. - **Reconstruction**: The system’s current state can be rebuilt at any time by replaying past events. - **Immutability**: Events are never updated or deleted—only new events are added. - **Auditability**: Since every change is recorded, the full history of a system is always available. - **CQRS Relationship**: Often paired with CQRS (Command Query Responsibility Segregation), another pattern popularized by Greg Young.

# Notable Contributors - Greg Young — Originator and principal author of the modern pattern. - Martin Fowler — Documented and popularized the idea in his 2005 article on *martinfowler.com*. - Eric Evans — Provided the conceptual foundation through Domain-Driven Design. - Udi Dahan — Early advocate and co-evangelist of CQRS and Event Sourcing in distributed systems.