The event sourcing pattern
In a typical approach, an application changes the state of data when a user works with it. However, this approach can often slow down performance and responsiveness and can also generate other concurrent updates. Unless we use an additional mechanism, we don't have a mechanism to audit and log operations or generate history.
Event sourcing is a pattern that maintains the current data state and saves data update events in an event repository. This repository works as an append-only store, and when the data is accessed by a consumer, it receives the event and applies the update on the domain. Using this pattern promotes performance by decoupling the event logic and scalability and by auditing all actions applied to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access