3 ms·
This is actually how I do event sourcing in many ways. The entry happens through commands, which can do validations prior to emitting a stream of events to be j
by yrashk 10y ago
This is actually how I do event sourcing in many ways. The entry happens through commands, which can do validations prior to emitting a stream of events to be journaled. I also expose a locking mechanism to commands so that they can ensure the uniqueness or property validations are correct.
In lazy event sourcing, you don't "build the read side at a later time", it's built upon receipt — in a form of indices, as they are THE read side and you pull this data and form domain objects on demand (by querying your indices), just transforming one representation (relevant events) into another (domain objects).
Does this help?
- mamcx 10y agoHow you "expose a locking mechanism to commands"? And how you build the indices?