Projections, snapshots, and upcasting
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
keep an event-sourced system fast, rebuildable, and evolvable.
Planned topics
- A projection is a read model built by consuming events; it must be rebuildable from the log.
- A snapshot stores state at version N so replay starts there, not at zero.
- Upcasting converts old event versions to the current shape when reading.
- Track projection position (checkpoint) and make handlers idempotent.
Draft outline details
Demonstration
outline: ShipmentDelivered v1 (no signature field) upcast to v2 with signature=null on read; a checkpoint table (projection name, last position); snapshot every 100 events.
Check your understanding
Why must projection handlers be idempotent?
Show answer
Because rebuilds and retries deliver the same event more than once.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.