3 ms·
We used to differentiate between projections and event handlers Projections only create/update/delete views and are idempotent. Event handlers could do side e
by rraghur 8y ago
We used to differentiate between projections and event handlers
Projections only create/update/delete views and are idempotent.
Event handlers could do side effecty things like emails or generate another command that goes back into the system.
While playing back events, just didn't hook up the event handlers at all.
Worked beautifully and it was very liberating to be able to wipe out your entire read side and recreate it either exactly the same way or tweak it to handle evolving requirements.
- dragonwriter 8y agoPresumably, for this to work “event handlers” must not modify views, though they could also produce events (reflecting the fact of completion of their own side effects, if that needs to be noted) of their own that could drive projections or other event handlers.