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.

2019 DACH Roadshow - Workflow Automation in Microservices Architectures

385 views

Published on

Slides from my talk at the Camunda DACH Roadshow in January of 2019 about how to apply workflow automation when doing microservices

Published in: Technology
  • Be the first to comment

2019 DACH Roadshow - Workflow Automation in Microservices Architectures

  1. 1. @berndruecker Workflow Automation in Microservice Architectures
  2. 2. What? Why? Microservices & Workflow Automation How? t
  3. 3. What? Why? Microservices & Workflow Automation How? t
  4. 4. Microservices… Service B Some Service Some Service Some Service Service C Service A Service D Monolith Functionality A Functionality B Functionality C Functionality D
  5. 5. Photo by born1945, available under Creative Commons BY 2.0 license.
  6. 6. What we wanted Photo by Lijian Zhang, available under Creative Commons SA 2.0 License and Pedobear19 / CC BY-SA 4.0
  7. 7. https://blog.bernd-ruecker.com/the-microservice-workflow-automation-cheat-sheet-fc0a80dc25aa
  8. 8. Example: http://github.com/berndruecker/flowing-retail Checkout Payment Inventory Shipment ?
  9. 9. Order Checkout Payment Inventory Shipment An „orchestration process“?
  10. 10. Every workflow must be owned by one microservice. No exceptions!
  11. 11. Order Checkout Payment Inventory Shipment
  12. 12. Otherwise you end up with SOA again! Checkout Payment Inventory Shipment Order
  13. 13. No BPM(N) monoliths https://blog.bernd-ruecker.com/avoiding-the-bpm-monolith-when-using-bounded-contexts-d86be6308d8
  14. 14. Workflows live inside service boundaries
  15. 15. Order Placed Payment Received Goods Fetched Notification Order Checkout Payment Inventory Shipment Event-driven architecture
  16. 16. Peer-to-peer event chains Checkout Payment Inventory Shipment Order placed Payment received Goods shipped Goods fetched
  17. 17. Peer-to-peer event chains Checkout Payment Inventory Shipment Order placed Payment received Goods shipped Goods fetched
  18. 18. The danger is that it's very easy to make nicely decoupled systems with event notification, without realizing that you're losing sight of that larger-scale flow, and thus set yourself up for trouble in future years. https://martinfowler.com/articles/201701-event-driven.html
  19. 19. The danger is that it's very easy to make nicely decoupled systems with event notification, without realizing that you're losing sight of that larger-scale flow, and thus set yourself up for trouble in future years. https://martinfowler.com/articles/201701-event-driven.html
  20. 20. The danger is that it's very easy to make nicely decoupled systems with event notification, without realizing that you're losing sight of that larger-scale flow, and thus set yourself up for trouble in future years. https://martinfowler.com/articles/201701-event-driven.html
  21. 21. Finding the right balance 31 Observe Microservice Paradigms ● Loose Coupling ● Autonomy ● Event Collaboration Ensure Flow Manageability • End-To-End Visibility • Meet Business Process SLA • Support Continuous Process Improvement
  22. 22. Tracking Checkout Inventory Payment Shipment Event Bus Workflow Engine https://www.confluent.io/kafka-summit-sf18/the_big_picture
  23. 23. Tracking + BI Checkout Inventory Payment Shipment Event Bus Workflow Engine Camunda Optimize Other reporting / BIO solutions
  24. 24. But you can start acting upon certain events
  25. 25. Order Checkout Payment Inventory Shipment Orchestration
  26. 26. Orchestration makes it easy to change the flow
  27. 27. Peer-to-peer event chains Checkout Payment Inventory Shipment Order placed Payment received Goods shipped Goods fetched Fetch the goods before the payment
  28. 28. Peer-to-peer event chains Checkout Payment Inventory Shipment Fetch the goods before the payment Goods fetched Order placed Payment received Goods shipped
  29. 29. Order Commands vs. Events Checkout Payment Inventory Shipment Order placed Retrieve payment
  30. 30. Order It is about where to decide about the coupling! Checkout Payment Inventory Shipment Order placed Retrieve payment Order decides . to listen to the event . to issue the command
  31. 31. Microservices = Distributed systems
  32. 32. Order Checkout Payment Inventory Shipment Stateful orchestration This orchestration requires state
  33. 33. Order Checkout Payment Inventory Shipment Orchestration Orchestration is independant of communication channel! This might be REST, Messaging, Event-Bus, …
  34. 34. Workflow Engine Typical ways of communication Checkout Payment Order Shipment Checkout Payment Order Shipment Checkout PaymentOrder Shipment Message/Event Bus REST-ish
  35. 35. Workflow Engine Typical ways of communication Checkout Payment Order Shipment Checkout Payment Order Shipment Checkout PaymentOrder Shipment Message/Event Bus REST-ish Pub/SubOwnership
  36. 36. Checkout Payment Order Shipment Workflow Engine Workflow Engine Monitoring Checkout Payment Order Shipment Workflow Engine Monitoring How many workflow engines?
  37. 37. Monitoring Checkout Inventory Payment Shipment Workflow Engine Order Workflow Engine Monitor e.g. Elastic Links back Optimize
  38. 38. Example https://github.com/berndruecker/flowing-retail/tree/master/kafka/java/monitor
  39. 39. Recap • Microservices have its merits • You need to balance orchestration and chorography • Track, monitor or manage the flow – depending on your scenario • Distributed systems need stateful orchestration • Visibility is essential to survive • Workflow automation is an essential building block, make sure to use BPMN
  40. 40. Microservices & Workflow Automation http://berndruecker.io/
  41. 41. Thank you!
  42. 42. mail@berndruecker.io @berndruecker https://berndruecker.io https://medium.com/berndruecker https://github.com/berndruecker https://www.infoq.com/articles/events- workflow-automation Contact: Slides: Blog: Code: https://www.infoworld.com/article/3254777/ application-development/ 3-common-pitfalls-of-microservices- integrationand-how-to-avoid-them.html https://thenewstack.io/5-workflow-automation- use-cases-you-might-not-have-considered/

×