3 ms·
The text-book example for event-sourcing is accounting. To calculate the current balance of an account, you add up all past transactions. You don't need to stor
by treve 8y ago
The text-book example for event-sourcing is accounting. To calculate the current balance of an account, you add up all past transactions. You don't need to store the balance (state) because you can deduce it by replaying all events.
This gives a few nice advantages. For example, with this system in hand you can now also ask "What was the balance 30 days ago".