DDDamn good!
summary
A real subscription-management service for a real-estate product is implemented using DDD with functional Scala, MongoDB and Kafka; aggregates are modeled as immutable state plus a aggregate as reducer function that returns a new state and a list of integration events, letting tests assert both state and emitted events. A critical invariant—delete-email deactivates subscriptions—is enforced inside the aggregate. Cross-service delivery uses an Outbox pattern/CDC to persist state and reliably publish Kafka events; this design ships to production and reduces ambiguity between product and engineering.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 2:15What is DDD and why
- 4:47Use cases and ubiquitous language
- 14:15Event storming for team sync
- 25:09Modeling aggregates in code
- 29:43Aggregates and transactional consistency
- 37:29Bounded context and responsibility
- 47:58Distributed system integration
- 57:11Outbox pattern and data changes
- 1:01:02Recommendations and conclusion
related talks
44mBuilding event-driven microservices with Scala and Functional Domain Models
20mFunctional Design for Reference Architectures
29mApplying (D)DDD and CQ(R)S to Cloud Architectures
40mFrom Monolith to Observable Microservices using DDD
48mImplementing DDD with the Spring Ecosystem
43mKey-Value, Event-Sourcing, Cqrs, Pub/Sub as a Service, Java, Javascript
46mState or events? Which shall I keep?
44mLong-lived microservices
