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.

Effective Microservices Design using Events and Event Sourcing

681 views

Published on

Highlight various pressures on Microservice architectures, how "Microservices" is not a design style and what we can do about that.
This presentation covers the use of events, event sourcing and how that can be applied to testing, security, audit and many other areas.

Published in: Software
  • Be the first to comment

Effective Microservices Design using Events and Event Sourcing

  1. 1. EffectiveEffective MicroserviceMicroservice DesignDesign
  2. 2. David Dawson CEO GoMicro.Services (and Simplicity Itself) david.dawson@gomicro.services @davidthecoder
  3. 3. What is Design?
  4. 4. What is Architecture?
  5. 5. Architecture vs Design
  6. 6. Limitless Options For Design
  7. 7. Only a few Architectures
  8. 8. What is Architecture?
  9. 9. Architecture Is Philosophy
  10. 10. What is your Philosophy?
  11. 11. Microservices Philosophy?
  12. 12. The path toThe path to MicroservicesMicroservices
  13. 13. The path toThe path to MicroservicesMicroservices
  14. 14. ThisThis SucksSucks
  15. 15. What are Microservices?
  16. 16. Isolation
  17. 17. Aspiration
  18. 18. “Microservices” are not about design
  19. 19. What will make Microservices Awesome?
  20. 20. Mid 2014 ….
  21. 21. Mid 2014 ….
  22. 22. Mid 2014 ….
  23. 23. other design disciplines apply below
  24. 24. The brave new world of DDD Microservices
  25. 25. What do we care about?
  26. 26. Events
  27. 27. Events The One True Ubiquitous Language
  28. 28. Events The Stream is the Only Truth that Matters
  29. 29. Messaging Is Cool
  30. 30. Event Sourced Microservices
  31. 31. Event Sourced Microservices Upgrades!
  32. 32. Event Sourced Microservices Replay!
  33. 33. Entity
  34. 34. Entity Many Representations
  35. 35. Hand Waving Consultant
  36. 36. Real World ExampleTM
  37. 37. Company Analysis
  38. 38. Company Analysis Social analysis Anomoly Detection Introspect an Enterprise
  39. 39. Audient.ly
  40. 40. Groups 'Source' Pipeline Event Store WordCloud Map View Gender Detection Sentiment Analysis Etc... Users Event Store Gateway Users
  41. 41. Microservice microservice Microservice Event Store Microservice Microservice Microservicemicroservice Microservice Microservice Event Store Gateway Microservice
  42. 42. Event Store Event Store Gateway
  43. 43. Function Event Store Event Store Gateway
  44. 44. Source Function Event Store ServiceService Service Event Store Gateway
  45. 45. View Source Function Event Store View View ServiceService Service Event Store Gateway
  46. 46. View Source Function Event Store View View ServiceService Service Function Event Store Gateway Function
  47. 47. View Source Function Event Store View View ServiceService Service Function Event Store Gateway Function
  48. 48. Gateway?
  49. 49. View Function Event Store View View ServiceService Service Function Event Store Gateway Function
  50. 50. Gateway
  51. 51. Gateway
  52. 52. Gateway Adapt world views
  53. 53. Gateway Adapt world views Events Messaging HTTP REST
  54. 54. What else?
  55. 55. View Function Event Store View View ServiceService Service Function Event Store Gateway Function
  56. 56. Function FunctionFunction Function
  57. 57. 'Chatter' Sentiment Analysis Gender Detection Etc...
  58. 58. Microservice MicroserviceMicroservice MIcroservice
  59. 59. What else?
  60. 60. View Functions Event Store View View ServiceService Service Function Event Store Gateway Function
  61. 61. View View View Gateway
  62. 62. View View View Gateway●Eventually Consistent
  63. 63. View View View Gateway●Eventually Consistent ●No Database!
  64. 64. View View View Gateway●Eventually Consistent ●No Database! ●Totally Isolated
  65. 65. Event Sourcing!
  66. 66. View View View Gateway
  67. 67. Product Gateway
  68. 68. Product Gateway
  69. 69. Router Gateway Product Product Product
  70. 70. Router Gateway Product Product Product Event Store
  71. 71. Upgrade?
  72. 72. Router Gateway Product Product Product Event Store
  73. 73. Router Gateway Product Product Product Event Store Product
  74. 74. Router Gateway Product Product Product Event Store Product REPLAY
  75. 75. Router Gateway Product Product Product Event Store Product REPLAY
  76. 76. Scaling?
  77. 77. Event Streams
  78. 78. Router Gateway Product Product Product
  79. 79. Router Gateway Product
  80. 80. Router Gateway Product
  81. 81. Router Gateway Product
  82. 82. Router Gateway Product 1 .. 200
  83. 83. What does an event look like?
  84. 84. Action The intent behind the event What does an event look like?
  85. 85. Action The intent behind the event Event ID A unique identifier What does an event look like?
  86. 86. Action The intent behind the event Event ID A unique identifier Parent ID The event that 'caused' this one What does an event look like?
  87. 87. Action The intent behind the event Event ID A unique identifier Parent ID The event that 'caused' this one Service ID The service or process that created it What does an event look like?
  88. 88. Action The intent behind the event Event ID A unique identifier Parent ID The event that 'caused' this one Service ID The service or process that created it Payload Your Stuff What does an event look like?
  89. 89. Fun stuff this gives you
  90. 90. Chains of Events
  91. 91. Order Stream Notification Stream Payment Stream
  92. 92. Order Stream Notification Stream Payment Stream
  93. 93. Order Stream Notification Stream Payment Stream
  94. 94. Order Stream Notification Stream Payment Stream
  95. 95. Order Stream Notification Stream Payment Stream
  96. 96. Order Placed Payment Taken Email Sent Email Sent
  97. 97. Dependencies
  98. 98. Dependencies Order Placed Payment Taken Email Sent Email Sent
  99. 99. Dependencies Order Placed Order Creation Service Payment Taken Payment Processor Email Sent Email Gateway Email Sent Email Gateway
  100. 100. Audit
  101. 101. Audit Order Placed Payment Taken Email Sent Email Sent
  102. 102. Audit Order Placed User = X Payment Taken Email Sent Email Sent
  103. 103. Testing Microservices is Hard!
  104. 104. Testing Microservices is Hard?
  105. 105. The Network
  106. 106. Process Management in a Test The Network
  107. 107. Process Management in a Test The Network Coupling between services
  108. 108. Process Management in a Test The Network Coupling between services The Network
  109. 109. Testing! Order Placed Payment Taken Email Sent Email Sent
  110. 110. Testing! Order Placed Payment Taken Email Sent Email Sent A TEST
  111. 111. Testing! Order Placed Email Sent A TEST Mock Payment Service?
  112. 112. Order Stream Notification Stream Payment Stream
  113. 113. Testing! Order Placed Payment Taken Email Sent Email Sent A TEST
  114. 114. Testing! Order Placed Payment Taken Email Sent Email Sent
  115. 115. How can you do this?
  116. 116. Event Store Event Distribution Projections Security Event chain materialisation Client replay Checkpoints Scaling Testing Serialisation Schema Change Service Upgrade …..
  117. 117. Want to help us make it easy?
  118. 118. david.dawson@gomicro.services http://gomicro.services Want to help us make it easy?
  119. 119. David Dawson @davidthecoder Questions?
  120. 120. David Dawson @davidthecoder Thanks! http://www.slideshare.net/DavidDawson9
  121. 121. µCon 2015µCon 2015 Stockholm - 5th /6th Nov London - 9th /10th Nov
  122. 122. Next Time!Next Time! Deployment Options for Microservices 4th November

×