Senior Backend Engineer / Stage 8 · Distributed data
Separate event history from read models
Decide when event sourcing and CQRS repay their cost.
"Already know" meets prerequisites. "Not relevant" removes the topic from your total but leaves what builds on it waiting.
Self-check
- Compare a CRUD order table plus audit log with an event-sourced order aggregate. Rebuild an order-summary projection from five hand-written events, including a cancellation. Explain how you avoid charging a payment again during replay.
- Evidence to include: Identify the authoritative record, projection lag, replay side effects and one event-versioning strategy. State a concrete reason to reject event sourcing for a simpler service.
Try it without the material first, then compare. Save your answer in your notes below. Report a problem with this self-check
Learning activities
2 activities- Not doneEvent Sourcing pattern (opens another site)
Unusually frank about the cost: it says most systems do not need event sourcing, and covers versioning events, snapshots and deleting personal data.
20 min - Not doneCQRS pattern (opens another site)
Separate read and write models, how they are kept in step with an outbox and idempotent consumers, and when the pattern is not worth it.
15 min