State or Events? Which Shall I Keep?
summary
Live-codes an event-sourced credit-card aggregate (behaviors → events) and proves it works end-to-end: commands emit LimitAssigned, CardWithdrawn, CardRepaid events, events buffer in an in-memory stream then publish to Kafka, a Kafka Streams job folds them into a snapshot in a Kafka Streams state store (read via REST), and a scheduler simulates traffic — the demo runs. Uses Java + Spring Kafka/Kafka Streams; warns about event versioning, eventual consistency and exactly-once tradeoffs.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:15Overview
- 2:13Object Selection
- 3:17Environments
- 6:45Implement
- 10:55Events
- 12:35Query
- 17:25Finding Events
- 23:58Event Streams
- 27:58Folding State
- 31:43Creating Handlers
- 34:18Kafka
- 36:58Demo
- 42:38Kafka Streams
- 44:13Kafka Snapshot
- 50:53Credit Card Controller
- 55:18Event Store
- 56:53State vs Events
related talks
38mEvery Event, Everywhere, All at Once
43mUnraveling the Threads: Event-Sourcing, CQRS, and Event-Driven Architecture
44mReactive Applications with Event-Sourcing and Server-Sent Events
51mThings I Wish I knew Before I Started with Event Sourcing
43mEvent driven development
14mHow not(!) to build real-time apps
54mThinking in Events
45mEvent-based system: Uklon practice
