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.

CamundaCon 2018: The Role of Workflows in Microservices (Camunda)

302 views

Published on

Presented by Bernd Rücker, Co-Founder of Camunda

With microservices (or serverless functions) whole architectures are cut into smaller pieces that are ideally loosely coupled. In this talk I will discuss what this means for business processes that typically span more than one microservice. I will tackle questions like: How can we ensure visibility of cross-microservice flows and provide status and error monitoring? How do we guarantee that overall flows always complete, even if single services fail? How can do this without introducing tight coupling or harming service autonomy? What does this mean for your architecture and the role of workflow automation technology within it?

Published in: Technology
  • Be the first to comment

  • Be the first to like this

CamundaCon 2018: The Role of Workflows in Microservices (Camunda)

  1. 1. @berndruecker The Role of Workflows in Microservices
  2. 2. Microservices… Service B Some Service Some Service Some Service Service C Service A Service D Monolith Functionality A Functionality B Functionality C Functionality D
  3. 3. Some Service Some Service Some Service Some Service Some Service Some Service Some Service Microservices…
  4. 4. Data, data, data, … Source: Microservices orchestration survey, July 2018, 354 responses
  5. 5. 92 %
  6. 6. Why?
  7. 7. Photo by born1945, available under Creative Commons BY 2.0 license.
  8. 8. How to get something out of it? Photo by pxhere, available under Creative Commons CC0 1.0 License.
  9. 9. Sample architecture: De-coupled services with event backbone Checkout Inventory Payment Shipment e.g. Kafka, …
  10. 10. Sample Checkout Payment Inventory Shipment Order Placed Payment Received Goods Fetched
  11. 11. Peer-to-peer communication Checkout Payment Inventory Shipment
  12. 12. 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
  13. 13. 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
  14. 14. 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
  15. 15. Challenges?
  16. 16. What we wanted Photo by Lijian Zhang, available under Creative Commons SA 2.0 License and Pedobear19 / CC BY-SA 4.0
  17. 17. Microservice pioneers have become aware
  18. 18. Workflow automation | orchestration is an essential building block in microservice architectures Of course I am opinioated – but I truly believe this!
  19. 19. Workflow automation | orchestration is an essential building block in microservice architectures Of course I am opinioated – but I truly believe this! Orchestration is not a central thing! „It is not BPEL“
  20. 20. Finding the right balance 22 Observe Microservice Paradigms ● Loose Coupling ● Autonomy ● Event Collaboration Ensure Flow Manageability • End-To-End Visibility • Meet Business Process SLA • Support Continuous Process Improvement
  21. 21. Different levels of leveraging workflow automation Manage the flow Track the flow Non-invasive to event-driven-architecture Additionally to choreography Limited in power Needs to be incorporated Mixture of choreography and orchestration Leverage full potential
  22. 22. Tracking Checkout Inventory Payment Shipment Kafka Workflow Engine
  23. 23. Tracking + BI Checkout Inventory Payment Shipment Kafka Workflow Engine Camunda Optimize Other reporting / BI solutions
  24. 24. Tracking + BI Checkout Inventory Payment Shipment Kafka Workflow Engine Camunda Optimize Other reporting / BIO solutions
  25. 25. Tracking + BI Checkout Inventory Payment Shipment Kafka Workflow Engine Camunda Optimize Other reporting / BI solutions This is totally non-invasive But also limited in power
  26. 26. Start acting upon certain events
  27. 27. Why so shy? Photo by LuidmilaKot, available under Creative Commons CC0 1.0 License.
  28. 28. Changing the flow Checkout Payment Inventory Shipment Fetch the goods before the payment
  29. 29. Changing the flow Checkout Payment Inventory Shipment Fetch the goods before the payment
  30. 30. Photo by born1945, available under Creative Commons BY 2.0 license.
  31. 31. Order Checkout Payment Inventory Shipment Important responsibilities need a home
  32. 32. Order Checkout Payment Inventory Shipment
  33. 33. Distributed systems
  34. 34. Distributed systems
  35. 35. Distributed systems
  36. 36. Order Checkout Payment Inventory Shipment Stateful orchestration This orchestration requires state
  37. 37. BPMN supports integration use cases Aggregator Re-Sequencer Combined with timeouts: Zeebe supports Message TTL
  38. 38. BPMN supports integration use cases Compensation
  39. 39. Order Checkout Payment Inventory Shipment Every service owns its workflow!
  40. 40. Central workflow engine or … Checkout Inventory Payment Shipment Workflow Engine Order Owned heredeployed here Owned here
  41. 41. …decentral workflow engine Checkout Inventory Payment Shipment Workflow Engine OrderWorkflow Engine
  42. 42. Same architecture with REST Checkout Inventory Payment Shipment Workflow Engine Order Workflow Engine
  43. 43. Challenge Monitoring Checkout Inventory Payment Shipment Workflow Engine Order Workflow Engine Monitor e.g. Elastic Links back Optimize
  44. 44. Same architecture with REST Checkout Inventory Payment Shipment Workflow Engine Order Workflow Engine
  45. 45. Work distribution via workflow engine Checkout Inventory Payment Shipment Order Workflow Engine Start Workflow Owns workflow definition External Task Worker
  46. 46. Hybrid architectures Order Credit Card Customer Credit Payment Pub/Sub e.g. Message Bus Pub/Sub Work Distribution e.g. External Task Request/Response e.g. REST
  47. 47. Recap • Microservices have its merits • You need to balance orchestration and chorography • Distributed systems need stateful orchestration • Visibility is essential to survive • Track, monitor or manage the flow – depending on your scenario • Workflow automation is an essential building block, make sure to use BPMN
  48. 48. 1 4 5 Continuous Process Improvement Technical Workflow Implementation Operating mission-critical Processes Broad-scale Adoption of Automation Automated Enterprise Adoption Journey Value Time / Invest 1 2 3 4 5 2 3
  49. 49. Microservices Certified Microservices Certified
  50. 50. Love to see code?
  51. 51. Thank you!
  52. 52. bernd.ruecker@camunda.com @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/

×