Grokking Microservices Design Patterns
Vote
0% completed
Event Sourcing: A Solution
The previous lesson showed what an UPDATE statement destroys. Event sourcing avoids the loss by changing what we store. We stop storing the current state. We store every change as an event instead.
Append, Never Update
Event sourcing writes to an append-only store. Append-only means rows are only ever added, never changed or removed. There is no UPDATE and no DELETE. Every write is a new row at the end.
Each row is one event. An event is a small, immutable record of one fact that happened. Each event carries four things:
.....
.....
.....
Like the course? Get enrolled and start learning!