Skip to content

Developing microservices with aggregates - Chris Richardson

2017 1 h 10 min SpringDeveloper en YouTube

Recorded at SpringOne Platform 2016. Slides: http://www.slideshare.net/SpringCentral/developing-microservices-with-aggregates The Domain Model pattern is a great way to develop complex business logic. Unfortunately, a typical domain model is a tangled, birds nest of classes. It can’t be decomposed into microservices. Moreover, business logic often relies on ACID transactions to maintain consistency. Fortunately, there is a solution to this problem: aggregates. An aggregate is an often overlooked modeling concept from the must read book Domain Driven Design. In this talk you will learn how aggregates enable you to develop business logic for the modern world of microservices and NoSQL. We will describe how to use aggregates to design modular business logic that can be partitioned into microservices. You will learn how aggregates enable you to use eventual consistency instead of ACID. We will describe the design of a microservice that is built using aggregates, and Spring Cloud.

Chapters

  1. 0:00 Intro
  2. 0:22 Presentation goal
  3. 1:00 About Chris
  4. 5:13 Microservice architecture
  5. 7:57 Domain model = tangled web of classes
  6. 9:19 Reliance on ACID transactions to enforce invariants
  7. 11:31 2PC is not a viable option
  8. 13:26 Domain Driven Design
  9. 15:39 About Aggregates
  10. 17:13 Aggregate: rule #1
  11. 19:23 Aggregate rule #2
  12. 20:43 Transaction scope = service
  13. 22:42 Aggregate granularity
  14. 26:30 Use event-driven, eventually consistent order processing
  15. 28:54 Eventually consistent credit checking
  16. 29:54 Complexity of compensating transactions
  17. 31:37 How atomically update database and publish an event
  18. 33:15 Reliably publish events when state changes
  19. 35:06 Event sourcing = event-centric persistence
  20. 37:05 Persists events NOT current state
  21. 39:13 Replay events to recreate state
  22. 40:14 Application architecture
  23. 42:29 Event Store publishes events consumed by other services
  24. 44:32 Event store = database + message broker
  25. 45:33 Benefits of event sourcing
  26. 48:34 Drawbacks of event
  27. 53:12 Orders and Customers example
  28. 54:05 Customer microservice
  29. 54:56 The Customer aggregate
  30. 55:58 Familiar concepts restructured
  31. 56:43 Customer command processing
  32. 58:20 Customer applying events
  33. 59:21 Customer Controller
  34. 59:35 Creating a Customer
Channel
SpringDeveloper
Views
255

More like this