Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Harnessing Domain Driven Design for Distributed Systems

Harnessing Domain Driven Design for Distributed Systems

These are the slides from the session Gayathri Thiyagarajan and I gave at Devoxx UK 2016

Andrew Harmel-Law

June 13, 2016
Tweet

More Decks by Andrew Harmel-Law

Other Decks in Technology

Transcript

  1. @YourTwitterHandle #YourSessionHashtag Gayathri Thiyagarajan & Andrew Harmel-Law, Capgemini UK http://capgemini.github.io

    Harnessing Domain Driven Design for Distributed Systems @gaythu_rajan / @al94781 #harnessing_ddd
  2. Who are we? The image cannot be displayed. Your computer

    may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again. @gaythu_rajan / @al94781 #harnessing_ddd
  3. “Ge;ng service boundaries wrong can result in having to make

    lots of changes in service-service collaboraEon. An expensive operaEon.” from Sam Newman, “Building Microservices” (secEon: When shouldn’t you use Microservices) Boundaries are HARDEST @gaythu_rajan / @al94781 #harnessing_ddd
  4. Microservices LOVE DDD cc: {AndreaRenee} - h-ps://www.flickr.com/photos/30282864@N02 “Despite the hype

    [microservices] probably giv[e] us the best environment we have ever had for doing Domain-Driven Design” (Interview with Eric Evans at 2015 DDD Exchange) @gaythu_rajan / @al94781 #harnessing_ddd
  5. The Core How DDD helps our CODE cc: Laurence Vagner

    - h-ps://www.flickr.com/photos/86078191@N00 @gaythu_rajan / @al94781 #harnessing_ddd
  6. The Misapplied How DDD helps our overall Architecture cc: juhansonin

    - h-ps://www.flickr.com/photos/38869431@N00 @gaythu_rajan / @al94781 #harnessing_ddd
  7. The Important Bits •  Models •  Aggregates •  Contexts • 

    Bounded Contexts •  Context Maps @gaythu_rajan / @al94781 #harnessing_ddd
  8. Shared Payment Services Our Case Study: cc: Khánh Hmoong -

    h-ps://www.flickr.com/photos/7997148@N05 @gaythu_rajan / @al94781 #harnessing_ddd
  9. 1.  Draw a Model and begin to implement it cc:

    Muffet - h-ps://www.flickr.com/photos/53133240@N00 An Approach @gaythu_rajan / @al94781 #harnessing_ddd
  10. 1.  Draw a Model and begin to implement it 2. 

    As you draw it and code it, listen to the Language and culEvate your Model accordingly cc: Muffet - h-ps://www.flickr.com/photos/53133240@N00 An Approach @gaythu_rajan / @al94781 #harnessing_ddd
  11. 1.  Draw a Model and begin to implement it 2. 

    As you draw it and code it, listen to the Language and culEvate your Model accordingly 3.  IdenEfy your Aggregates - these are your starter Microservices cc: Muffet - h-ps://www.flickr.com/photos/53133240@N00 An Approach @gaythu_rajan / @al94781 #harnessing_ddd
  12. cc: Muffet - h-ps://www.flickr.com/photos/53133240@N00 An Approach @gaythu_rajan / @al94781 #harnessing_ddd

    1.  Draw a Model and begin to implement it 2.  As you draw it and code it, listen to the Language and culEvate your Model accordingly 3.  IdenEfy your Aggregates - these are your starter Microservices 4.  When you hit pain points (indicated by the Language) split into different Bounded Contexts to resolve
  13. 1.  Draw a Model and begin to implement it 2. 

    As you draw it and code it, listen to the Language and culEvate your Model accordingly 3.  IdenEfy your Aggregates - these are your starter Microservices 4.  When you hit pain points (indicated by the Language) split into different Bounded Contexts to resolve 5.  Revisit your Bounded Contexts now you know more about how each Aggregate - you may end up spli;ng them cc: Muffet - h-ps://www.flickr.com/photos/53133240@N00 An Approach @gaythu_rajan / @al94781 #harnessing_ddd
  14. The Ignored How DDD helps our Teams Organise cc: aha42

    | tehaha - h-ps://www.flickr.com/photos/31549162@N05 @gaythu_rajan / @al94781 #harnessing_ddd
  15. Shared Kernel Separate Ways An*- Corrup*on Layer Partner- ship Conform-

    ist Open Host Service Customer / Supplier Control Over Associated Teams CommunicaEons Commitment / Capability of Teams @gaythu_rajan / @al94781 #harnessing_ddd
  16. Shared Kernel Separate Ways An*- Corrup*on Layer Partner- ship Conform-

    ist Open Host Service Customer / Supplier Control Over Associated Teams CommunicaEons Commitment / Capability of Teams @gaythu_rajan / @al94781 #harnessing_ddd
  17. Shared Kernel Separate Ways An*- Corrup*on Layer Partner- ship Conform-

    ist Open Host Service Customer / Supplier Control Over Associated Teams CommunicaEons Commitment / Capability of Teams @gaythu_rajan / @al94781 #harnessing_ddd
  18. Take Home Messages cc: Manoj Kengudelu - h-ps://www.flickr.com/photos/11767573@N02 •  Find

    the right Microservices - or you’ll pine for the Monolith @gaythu_rajan / @al94781 #harnessing_ddd
  19. Take Home Messages cc: Manoj Kengudelu - h-ps://www.flickr.com/photos/11767573@N02 •  Find

    the right Microservices - or you’ll pine for the Monolith •  Don’t get confused about BCs - they will fall out if you listen to the Language @gaythu_rajan / @al94781 #harnessing_ddd
  20. Take Home Messages •  Find the right Microservices - or

    you’ll pine for the Monolith •  Don’t get confused about BCs - they will fall out if you listen to the Language •  Organise around your services beger - apply the Strategic Pagerns cc: Manoj Kengudelu - h-ps://www.flickr.com/photos/11767573@N02 @gaythu_rajan / @al94781 #harnessing_ddd
  21. Take Home Messages •  Find the right Microservices - or

    you’ll pine for the Monolith •  Don’t get confused about BCs - they will fall out if you listen to the Language •  Organise around your services beger - apply the Strategic Pagerns •  Be inspired to do more Domain Driven Design cc: Manoj Kengudelu - h-ps://www.flickr.com/photos/11767573@N02 @gaythu_rajan / @al94781 #harnessing_ddd
  22. Oh, and we (Capgemini ) are hiring! (visit bit.ly/cg-jvm-jobs-ddd) cc:

    ptrlx - h-ps://www.flickr.com/photos/58615912@N05 @gaythu_rajan / @al94781 #harnessing_ddd
  23. Read More... •  hgps://capgemini.github.io/architecture/ microservices-reality-check/ •  hgps://capgemini.github.io/architecture/ why-microservices-are-right-for-us-pt1/ •  hgps://capgemini.github.io/architecture/

    microservices-like-change/ •  hgps://capgemini.github.io/architecture/ microservices-gotchas/ cc: Manoj Kengudelu - h-ps://www.flickr.com/photos/11767573@N02 @gaythu_rajan / @al94781 #harnessing_ddd