~/talk

Developing Microservices with Aggregates

Talkat Devoxx US 2017 · 2017-03-21..03-23· [microservices, software-architecture]
slides:none on file

Argues that Domain-Driven Design aggregates let a tangled domain model split into services by using one transaction per aggregate and referencing other aggregates by ID only, avoiding object links across services. Replaces distributed two‑phase commits with sagas with compensating transactions driven by events (example: order created -> customer reserves credit -> order approved/rejected). Recommends event sourcing as atomic persist-and-publish and shows a microservice design built on Spring Cloud and an event store that yields eventual consistency and an audit-ready event log.

AI-written summary · about

  1. 0:00Developing Microservices with Aggregates
  2. 0:53About Chris
  3. 4:31Microservice architecture
  4. 5:58Domain model = tangled web of classes
  5. 7:07Reliance on ACID transactions to enforce invariants
  6. 9:46and requires 2PC
  7. 10:112PC is not an option
  8. 11:58Domain Driven Design - building blocks
  9. 14:36About Aggregates
  10. 16:18Aggregate: rule #1
  11. 17:30Domain model = collection of loosely connected aggregates
  12. 17:46Easily partition into microservices
  13. 18:17Aggregate rule #2
  14. 19:01Transaction scope = service
  15. 21:29How to maintain data consistency between aggregates?
  16. 22:20Using event-driven Sagas instead of 2PC
  17. 23:49Saga-based, eventually consistent order processing
  18. 26:53Complexity of compensating transactions
  19. 29:11How atomically update database and publish an event
  20. 29:33Failure = inconsistent system
  21. 31:29Event sourcing = event-centric persistence
  22. 33:25Persists events NOT current state
  23. 36:00Replay events to recreate state
  24. 36:32The Customer aggregate
  25. 37:29Customer command processing
  26. 38:09Customer applying events
  27. 38:57Request handling in an event sourced application
  28. 39:45Event Store publishes events consumed by other services
  29. 40:32Event store = database + message broker
  30. 41:10Benefits of event sourcing
  31. 46:08Drawbacks of event
  32. 48:50Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.