Modeling · demo 9
CQRS: eventual consistency
One model to write, another to read, linked by events. The command answers "202 Accepted" at once; the read view will only be up to date once the synchronizer has gone by.
Reduced motion: the scene is paused; use "Step" or "Play".
What to watch
- Right after a transfer, the read returns the old balance (amber answer): the event is in the journal, not yet in the view. The demo deliberately slows the projection by 2 s (
Projections:DelayMs). - The journal numbers the events; they turn green once
Projector.Applyhas applied them, always in order. - Delay 0 s: the gap shrinks without disappearing; Delay 5 s: it grows. That is the price of two separate models.