Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building reliable applications with messaging

1,319 views

Published on

The slidedeck for the session presented on October 15th, 2015 with Blaak Selection & Betabit in Rotterdam.

Published in: Technology

Building reliable applications with messaging

  1. 1. Dennis van der Stelt and building better & more reliable systems Dennis van der Stelt Software Architect http://dennis.bloggingabout.net/ dennis@bloggingabout.net NServiceBus Community Champ MESSAGING @dvdstelt #blaak
  2. 2. Dennis van der Stelt YOUR PRESENTER Dennis van der Stelt http://dennis.bloggingabout.net/ Software Architect Professional Services Provides coaching & training About Dennis Innovative software architect Almost 20 years of experience in development of distributed systems. Has a continuous drive to learn and improve knowledge in different architectural styles, including quality in software development. Highly motivated to share his knowledge via articles, presentations and his blog. Awards NServiceBus Champ Typemock MVP Certified Trainer • Presentations • Software & Architecture audits • SOA & Microservices advice • Unit Testing training • NServiceBus training
  3. 3. Dennis van der Stelt AGENDA
  4. 4. Dennis van der Stelt “You know nothing, Jon Snow”
  5. 5. Dennis van der Stelt5 Messaging concepts What is it about & why is it important?
  6. 6. Dennis van der Stelt
  7. 7. Dennis van der Stelt
  8. 8. Dennis van der Stelt synchronous asynchronousvs
  9. 9. Dennis van der Stelt
  10. 10. Dennis van der Stelt
  11. 11. Dennis van der Stelt
  12. 12. Dennis van der Stelt Separation of concerns Flexibility & Reusability Scalability why all the layers?
  13. 13. Dennis van der Stelt A monolithic design is characterized by such tight coupling among modules that they really have no independent existence. monolithic
  14. 14. Dennis van der Stelt MONOLITHIC DESIGN How does my clean code become a big ball of mud? Database
  15. 15. Dennis van der Stelt MONOLITHIC DESIGN How does my clean code become a big ball of mud? Database
  16. 16. Dennis van der Stelt
  17. 17. Dennis van der Stelt
  18. 18. Dennis van der Stelt
  19. 19. Dennis van der Stelt
  20. 20. Dennis van der Stelt COUPLING Which layer has the worst coupling?
  21. 21. Dennis van der Stelt
  22. 22. reduce coupling
  23. 23. Dennis van der Stelt SpatialTemporalPlatform coupling aspects
  24. 24. Dennis van der Stelt PLATFORM Also known as ‘interoperability’ http, json, xml, xsd, etc…
  25. 25. Dennis van der Stelt TEMPORAL Store Front End Shipping Service
  26. 26. Dennis van der Stelt TEMPORAL Store Front End Shipping ServiceShipping Service
  27. 27. Dennis van der Stelt TEMPORAL Store Front End Shipping ServiceOrder Queue
  28. 28. Dennis van der Stelt TEMPORAL Store Front End Shipping ServiceOrder Queue
  29. 29. Dennis van der Stelt TEMPORAL Store Front End Shipping ServiceOrder Queue
  30. 30. Dennis van der Stelt SPATIAL
  31. 31. Dennis van der Stelt SPATIAL .net application .net application ShipOrder AssignTask
  32. 32. Dennis van der Stelt Messaging  Reduces spatial coupling  XML/JSON for platform coupling  Asynchronous for temporal coupling
  33. 33. demo Messaging using WCF
  34. 34. Dennis van der Stelt PERFORMANCE RPC versus Messaging
  35. 35. Dennis van der Stelt36 Architecture We do microservices, ‘cause this time it is the silver bullet!
  36. 36. Dennis van der Stelt
  37. 37. Dennis van der Stelt SERVICE ORIENTATION AT RUNTIME
  38. 38. Dennis van der Stelt Don’t do request/reply
  39. 39. Dennis van der Stelt
  40. 40. Dennis van der Stelt Don’t use asynchronous messaging to query a datastore for displaying purposes! Everything has its place. Messaging isn’t a silver bullet you use for everything.
  41. 41. demo NServiceBus Demo
  42. 42. Dennis van der Stelt CAP Theorem Eric Brewer, PODC Conference 2000
  43. 43. Dennis van der Stelt CAP THEOREM You can only pick 2
  44. 44. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability
  45. 45. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability
  46. 46. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability distributed system partition tolerantconsistencyavailability
  47. 47. Dennis van der Stelt CAP THEOREM You can only pick 2 centralized system partition tolerantconsistencyavailability distributed system partition tolerantconsistencyavailability when there’s network partition, which do you sacrifice?
  48. 48. Dennis van der Stelt Match the business perspective
  49. 49. Dennis van der Stelt
  50. 50. Dennis van der Stelt
  51. 51. Dennis van der Stelt
  52. 52. Dennis van der Stelt But I can’t drop consistency!
  53. 53. Dennis van der Stelt Basically Available BASE What is BASE? Soft state Eventually consistent
  54. 54. Dennis van der Stelt Eventual Consistency Because 100% consistency isn’t the only option
  55. 55. Dennis van der Stelt
  56. 56. Dennis van der Stelt Eventual Consistency
  57. 57. Dennis van der Stelt Eventual Consistency
  58. 58. Dennis van der Stelt Eventual Consistency your “enterprise” is already eventual consistent with reality
  59. 59. Dennis van der Stelt Eventual Consistency your “enterprise” is already eventual consistent with reality
  60. 60. Dennis van der Stelt “Allow things to be inconsistent and find ways to compensate for mistakes, versus trying to prevent mistakes altogether.” EVENTUAL CONSISTENCY Eric Brewer VP of Infrastructure at Google, Professor at UC Berkeley
  61. 61. Dennis van der Stelt Some ideas on messaging
  62. 62. Dennis van der Stelt 100% synchronized that‘s eventual consistency. Udi Dahanin 2010
  63. 63. Dennis van der Stelt Sagas Long running processes
  64. 64. Dennis van der Stelt Death to the batchjob
  65. 65. Dennis van der Stelt
  66. 66. Dennis van der Stelt
  67. 67. Dennis van der Stelt
  68. 68. Dennis van der Stelt
  69. 69. Dennis van der Stelt
  70. 70. Dennis van der Stelt
  71. 71. Dennis van der Stelt
  72. 72. Dennis van der Stelt
  73. 73. Dennis van der Stelt
  74. 74. Dennis van der Stelt
  75. 75. Dennis van der Stelt
  76. 76. Dennis van der Stelt
  77. 77. Dennis van der Stelt
  78. 78. Dennis van der Stelt
  79. 79. demo NServiceBus Saga demo
  80. 80. Dennis van der Stelt Asynchronous messaging helps achieve decoupling at design- & runtime There’s a lot to think about, designing an eventual consistent distributed system. Everyone needs to think about the CAP Theorem, etc, with or without async messaging Conclusion
  81. 81. Dennis van der Stelt
  82. 82. Dennis van der Stelt find me. http://dennis.bloggingabout.net dvdstelt@outlook.com

×