Too Long; Didn't Read
An event-sourced system uses snapshots of the current state of an account. The most recent snapshot is Version 22, with a Balance of 60. There have been 3 events since then. There are one snapshot for every 10 rows in the table, to be precise. These snapshots allow me to limit the number of rows I need to fetch on every request. In this case, I have a constant cost of fetching 10 items every time. It means I have to build up the current balance of the account from these events. To rebuild it, I find the most recent snapshots and apply the events since the snapshot was taken.
Share Your Thoughts