4 ms·
You write the 'add item' event regardless, and when building the 'cart' view you handle the limit.
by cwalv 2y ago
You write the 'add item' event regardless, and when building the 'cart' view you handle the limit.
- dagss 2y agoWell, assume the non-overdraftable bank account example instead then, what do you do then?
- philbo 2y agoAlternatively "invalid cart" could itself become an event.
- RedShift1 2y agoSounds like an easy way to run out of storage space
- eyads 2y agoadd_item is not an event, rather a command/ request that is yet to be validated. item_added is the event = a fact that was 'allowed to happen' by the system. Keeping commands in a persistent store is a matter of choice but not necessary. I've seen people doing command sourcing and calling it event sourcing.