Short living streams
In Event Sourcing, each record keeps its events in one stream. If a stream lives forever, it keeps growing: loading it gets slower, changing it gets harder, and you keep data nobody needs. Most streams don’t have to live that long, because most business processes have a natural cycle, like a cashier’s shift or an accounting month.
The first article shows how to model that cycle in C#. Each cashier shift gets its own stream. When the shift closes, the last event carries what the next one needs, such as the cash left in the drawer, so no stream holds the whole history of a cash register. Accountants call this closing the books.
The second article covers data without a natural end, like company details or addresses. You’ll see when keeping it as plain state is the better choice, and how to trim old events if you keep them.

Implementing Closing the Books pattern
2024-02-17No one knows who invented Event Sourcing. I overheard that Hammurabi did. Why? Because he standardised the first set of rules of accounting. Event Sourcing works as…
Should you always keep streams short in Event Sourcing?
2024-02-24In the last article and others I did my best explaining why keeping streams short is important in Event Sourcing. I also showed you how. That should take you far enough…