Keep the useful bits, human.
Beginner field notes
- State says what is true at a chosen moment. An event records a change that happened, such as a task being completed.
- A task created Open and a task completed then reopened can both be Open now. The current label alone does not tell their histories apart.
- A request to complete a task is not itself a completed event. Check whether the application accepted and recorded the change.
See a worked example
Read the history without confusing it with the final label
Sample only. Nothing here runs on your computer.
Accepted changes for T7, in order:
1. Task created with title “Label seed box” and status Open.
2. Task completed.
3. Task reopened.
Assume these are the only accepted changes.After 1: Open.
After 2: Done.
After 3: Open.
Final state: Open.
History still includes the earlier completion.Reading the final label and reading the change history answer different questions. We are interpreting fictional records, not applying actions to a real task. No ordering, delivery or storage guarantee beyond the stated example is implied.
Visual
The reviewed description and complete diagram source are available here.
More of this diagram is available inside its frame. Focus the frame and use the arrow keys to pan.
Read the complete diagram source
This is the source for the reviewed diagram, not a command to run.
flowchart LR
A["Created: Open"] --> B["Completed: Done"] --> C["Reopened: Open"] Sources and full explanation
Notes sources · Beginner
- Microsoft Azure Architecture Center: Event Sourcing pattern
- Microsoft Azure Architecture Center: CQRS pattern
AI source review · 2026-10-17
Reviewed explanation
State is the information that is true at a chosen moment. An event records a particular change that happened. Lantern Board’s task T7 can be Open now even though someone completed it earlier and then reopened it. The current status answers “What is it now?” The history answers “What happened along the way?” No programming syntax is needed to read that distinction.
Follow the three accepted facts in the worked example from first to last. Task created establishes Open. Task completed changes it to Done. Task reopened changes it back to Open. Another task that was created and never completed could also be Open. The final label alone cannot tell those histories apart. A request to complete a task that was rejected would not belong in this list of accepted changes.
Order and meaning are part of the example: each fact concerns T7, and the numbered list is its actual order, not a guess made by sorting clocks. We assume no fact is missing and interpret each once. A real application might store its current record plus a separate history. The advanced event-sourcing lesson makes a further design choice: use recorded events as the authoritative basis from which state is reconstructed.
- PostgreSQL 18: Updates
Changing stored values and inspecting the resulting state; no SQL syntax is needed in this lesson.
- Microsoft Azure Architecture Center: Event Sourcing pattern
An authoritative append-only event stream, reconstruction/projections, ordering, optimistic concurrency, duplicate delivery and pattern costs.
- Martin Fowler: Event Sourcing (historical draft essay)
Reconstructing state by processing recorded events; replay must control external updates and preserve needed historical inputs. The page identifies its historical draft status.
AI source comparison recorded 2026-10-16. Human learner validation is pending.
Quick quiz · one question
Keep the history when the status changes back
Sample scenario. Synthetic task T7. This is its complete accepted history in the given order, with distinct IDs. Created establishes Open; Completed sets Done and adds one historical completion; Reopened sets Open without erasing history.
- Starting task
No task yet- Duplicate contract
These accepted events all have distinct IDs.- Delivery 1
change-a: created- Delivery 2
change-b: completed- Delivery 3
change-c: reopened
After these accepted changes, what is true now and what historical completion remains?
Why this answer?
Answers stay on this device.
Sources and exercise scope
- Microsoft Azure Architecture Center: Event Sourcing pattern
Reconstructing state from ordered accepted events and handling duplicate delivery; this synthetic trial fixes event meanings and has no external actions.
Original synthetic exercise. AI comparison against the reviewed lesson recorded on 2026-10-17; the references above state their scope. Human learner validation has not been run. A result here records this attempt; it does not establish mastery.
Save or adjust this lesson
Make this lesson yours
Save it for later, or tell your robot what would help.
This correction stays on this browser. Browse all concepts if the topic is missing.
Familiarity is your own assessment. To use it in your coding tool, download your updated learning profile.
Choices are saved on this browser. They do not sync to your account or coding tool.