Avoiding mistakes with events
summary
Checklist of concrete fixes and tradeoffs for event systems: store pivotal events (order paid, checkout completed) in the database for auditability; prefer UUID v4 or composite IDs (paymentId-orderId) and never mix nanoid and UUIDs; test and freeze JSON/Avro/Protobuf serialization and keep backward compatibility; record created/received/processed timestamps and propagate a correlation/trace id for debugging; design idempotent consumers because exactly-once delivery is impossible; use Postgres or managed Kafka (AWS MSK works) only when the use case demands it; avoid multiple delivery brokers and don’t put PII in immutable event logs without legal signoff; consider event sourcing for auditable replay but don’t default to it.
AI-written summary · about
chapters (34)
- 0:00Introduction
- 2:58Why this talk exists
- 4:43Defining events
- 5:46Mistake: no events
- 8:16Solution: capture events
- 10:03Pivotal events
- 11:05Mistake: too many events
- 12:09Event identifiers
- 15:39UUIDs and versions
- 19:35Mistake: overcomplicating delivery
- 21:44Event immutability
- 23:29Event storage duration
- 24:10Mistake: multiple brokers
- 25:13Mistake: bad serialization
- 26:17Testing serialization
- 27:23Event schemas
- 28:49Documenting schemas
- 30:56Delivery guarantees
- 31:38Outbox pattern
- 33:02Event size limits
- 34:03Notification vs state transfer
- 35:30Time in event systems
- 36:11Lamport timestamps
- 37:15Distributed transactions
- 38:42Business 'now'
- 39:24Saga patterns
- 40:29Tracing and correlation
- 41:33Mistake: poor architecture
- 42:37Event storming
- 43:39Internal vs external events
- 44:44Event sourcing
- 46:11Recommended books on domain-driven design
- 47:58Closing remarks
- 48:20Q&A
related talks
49mAvoiding mistakes with events, one at a time
53mAvoiding mistakes with events, an event at a time
48mEvent Sourcing - what could possibly go wrong?
49mData Modeling in an Event Centric World
19mHow to Fail Your Event-Driven System
30mHow Event Driven Architectures Go Wrong & How to Fix Them
56mEvents on the outside, on the inside and at the core
49mDemystifying ‘Event’ Related Software Concepts and Methodologies
