I’m coming from a REST + monolithic background (not sure if that is an asset or liability) and am struggling to wrap my head around some fundamental concepts in Axon and CQRS.
Many of the examples I find online, such as: Axon Trader, Event Store Client Example, and PCF Axon CQRS Demo are heavy on create events but slim on update and delete events. I’m not grasping how to include updates and deletes in a DDD/CQRS friendly way (any examples out there?) In this thread, Allard states somewhat passionately that: “CRUD events are the source of all evil…”. What does the alternative look like?
Newb question: Is an aggregate identifier that was used for a create event, also used for updates and deletes on the same aggregate or is it just used to identify the atomic transaction in the event store?
Some musings on UUIDs that relate to the above: It seems advantageous to generate them on the client side. The examples above do this. The aggregate UUIDs flow through to the query side where they are used as primary keys on entities. Is this standard practice? From the reading I’ve done, doing so will cause problems for read side databases because randomly generated UUIDs result in frequent page splits because primary keys are no longer sequential. Sequential, time-based UUIDs generated on the server side can prevent this fragmentation but then it becomes difficult to report the new query side entity id back to the command side REST call that created the aggregate (if trying to implement HATEOS links). How do other folks manage UUIDs between the command-side event store and query-side database(s)?