Functional CQRS in Kotlin
summary
Live-coding shows a Kotlin implementation of CQRS + event sourcing that uses Kotlin coroutines actors and channels, immutable algebraic data types and fold-based state reconstruction. A pizza-order demo on GitHub implements commands → events → event store (timestamped rows) → read-model projections; tests drive adding a new dispatch event and projection, and they pass after wiring executor and query handlers. Claims: functional purity reduces typical event-store bugs but introduces eventual consistency delays (microseconds to seconds).
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:24Functional CQRS
- 5:30Event Source
- 6:34Separation of Query Model
- 8:38Split to Microservices
- 10:30Domain Driven Design
- 11:32Functional Programming
- 12:53Protagonists
- 14:23What is a Fold?
- 16:51Values and Entities
- 17:44Transactional Aggregates
- 21:03Event Store
- 24:33Events Tree
- 29:33Commands emit Events
- 30:32Logic is called by Commands
- 32:03Tests can process C&Q
related talks
32m@Experimental Kotlin coroutines
49mRiding the state flow
51mFunctional fashion for Kotlin projects
48mKotlin & Functional Programming: pick the best, skip the rest
56mKotlin Coroutines And More
41mHandling billions of events per day with Kotlin Coroutines
47mRediscovering gRPC with Kotlin coroutines
28mConcurrency for Imposters
