Event Modeling Lab
Retrieval Prompts
- State the three non-negotiable properties of an event.
- Give a one-sentence test for "is this an event or a command?"
- Name the three minimum fields every event payload must carry and why.
- Explain why a "correction" to an event is a new event, not a mutation.
- Describe the shift from CRUD to events in one sentence.
Compare and Distinguish
Separate these pairs clearly:
- event vs command (intent, tense, consumer count, reply expectation)
- event vs query (does anyone reply? does the caller wait?)
- CRUD update vs domain event (
UPDATE email = ?vsEmailAddressChanged) - audit log vs event stream (read-only for humans vs consumed by systems)
- event notification vs event-carried state transfer (thin vs fat payload, preview of Cluster 2)
Common Mistake Check
For each statement, name the error and give the corrected form:
- "We publish
SendWelcomeEmailto Kafka because it is an event-driven system." - "Our event is
OrderUpdatedwith a payload of the new order state." - "We republish the same event with a correction when we find a bug in the payload."
- "Every database
UPDATEin our service becomes a domain event." - "Our event payload is just
{'order_id': '...'}because the consumer can query back for details." - "We name our event topic
ordersand put creates, updates, deletes, and queries on it."
Mini Application -- Event Storming a Bounded Context
Pick a bounded context you know (checkout, ride dispatch, support tickets, insurance claims). In 40 minutes:
Step 1 (10 min): Raw brain dump
- list every domain transition (state change that matters to someone) in past tense
- aim for 15-25 candidate events
- do not edit yet; it is a brainstorm
Step 2 (10 min): Rename and prune
For each candidate:
- rewrite in clean past tense (
OrderPlaced, notOrder Was Placed by a User) - delete any that are commands in disguise
- mark those that are really one event split into two, or two events collapsed into one
- end with 10-15 clean events
Step 3 (10 min): Draft payload and metadata
For 5 of the events, write:
event_id,occurred_at,subject_id- 3-6 payload fields
- which service is the producer
- two plausible consumers
Step 4 (10 min): The disguised-command test
For each of the 5 events, apply the checklist from Concept 01:
- past tense?
- fact, not instruction?
- ≥2 plausible consumers?
- producer is authoritative?
- payload is meaningful without a callback (or deliberately notification-style)?
- has
event_idandoccurred_at?
Mark any that fail. Rewrite or discard.
The Disguised Command Drill
Each of the following is disguised as an event. Rewrite each as the fact it should express. Hint: the form is usually X -> XWas[Verb]ed or XHappened.
SendPasswordResetEmail->RetryFailedPayment->NotifyDriverOfNewTrip->RefundCustomer->AllocateWarehouseSlot->RollbackOrderOnError->
Sample expected answers: PasswordResetRequested, PaymentFailed, TripAssigned, RefundIssued, WarehouseSlotAllocated, OrderAborted. Your answers do not have to match exactly -- they just have to be facts, not instructions.
Common Confusions to Surface
After you finish, write one short sentence on each that you now understand better:
- why past-tense naming is not cosmetic
- why two consumers minimum is a useful "is it really an event?" check
- why the event producer must be the authoritative source
- why emitting one fat event carrying three different transitions is a modeling bug
Evidence Check
This page is complete only when:
- You produced an event catalog of 10-15 events with payloads for a real bounded context.
- You correctly relabeled all 6 disguised commands as facts.
- You can articulate, without the checklist, why a given message is an event or a command.
- You identified at least one place in your own or a known system where a command is disguised as an event.