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.
Automating Processes
in Modern Architectures
@berndruecker
https://www.theguardian.com/technology/2018/apr/
24/amazon-jeff-bezos-customer-data-industries
Change is the only constant
„ We don‘t know what we will need tomorrow.
But we do know that we will need something.
We hav...
And you?
Credit Card
Handling
Payment
REST
Order
Fulfillment
REST
DB
PaymentId Amount Status
1 100 $ Collected
2 125 $ Open
Reporti...
8
Using a workflow engine instead
Workflow Engine
Scheduler
Durable State
Glue Code Credit Card
Service
REST
Workflow Defi...
Warning:
Contains Opinion
@berndruecker
mail@berndruecker.io
@berndruecker
http://berndruecker.io/
Bernd Ruecker
Co-founder and
Chief Technologist of
Camunda
Camunda
• Source-Available & Developer Friendly
• Supports BPMN
• Mature tooling, widely adopted
• On-prem or cloud
• http...
Live hacking
https://github.com/berndruecker/flowing-retail/blob/master/rest/java/payment-
camunda/src/main/java/io/flowing/retail/paym...
Service
A
Microservices
@berndruecker
Monolith
Service
B
Service
C
C
B
A
D
Service
A
Autonomous Microservices
@berndruecker
Service
B
Service
C
The era of APIs
API
API
API
API
API
API
API
API
@berndruecker
The era of APIs
API
API
API
API
API
API
API
External Services
Standard Software
API
Functions
@berndruecker
Connecting the dots…
API
API
API
API
API
API
API
Microservices
External Services
Standard Software
API
Functions
@berndrue...
Going hipster!
https://www.reactivemanifesto.org/
Example
Checkout
Payment
Inventory
Shipment
@berndruecker
Order
Placed
Payment
Received
Goods
Shipped
Notification
Event-driven & Reactive
@berndruecker
Checkout
Payment
Inventory
...
But there is also trouble in the event-driven land!
Event chains that
implement processes
Implementing
long running behavi...
Peer-to-peer event chains
Checkout
Payment
Inventory
Shipment
Order
placed
Payment
received
Goods
shipped
Goods
fetched
@b...
Peer-to-peer event chains
Checkout
Payment
Inventory
Shipment
Order
placed
Payment
received
Goods
shipped
Goods
fetched
@b...
The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
...
The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
...
The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
...
Phil Calcado at QCon NYC 2019
Notification
Checkout
Payment
Inventory
Shipment
Pinball Machine Architecture
„What the hell
just
happened?“
@berndruecker
Peer-to-peer event chains
Checkout
Payment
Inventory
Shipment
Order
placed
Payment
received
Goods
shipped
Goods
fetched
Fe...
Peer-to-peer event chains
Checkout
Payment
Inventory
Shipment
Fetch the goods
before the
payment
Goods
fetched
Order
place...
What we wanted
Photo by Lijian Zhang, under Creative Commons SA 2.0 License and Wikimedia Commons / CC BY-SA 4.0
@berndrue...
Why is it so tempting?
Service
A
Event Bus
A
B
Service
B
C
Service
C
D
E
F
Service
D
G
Service
…
Service
…
Service …
Servi...
Why is it so tempting?
Service
A
Event Bus
A
B
Service
B
C
Service
C
D
E
F
Service
D
G
Service
…
Service
…
Service …
Servi...
Order
Decide about responsibility
Checkout
Payment
Inventory
Shipment
Payment
received
Order
placed
Retrieve
payment
@bern...
Order
Decide about responsibility
Checkout
Payment
Inventory
Shipment
Payment
received
Order
placed
Retrieve
payment
@bern...
Order
Decide about responsibility
Checkout
Payment
Inventory
Shipment
Order
placed
Retrieve
payment
It can still be messag...
Order
Checkout
Payment
Inventory
Shipment
Stateful orchestration
This orchestration
requires state
@berndruecker
Order
Checkout
Payment
Inventory
Shipment
@berndruecker
Glue code (e.g. Java)
https://github.com/berndruecker/flowing-
retail/blob/master/kafka/java/order-
zeebe/src/main/java/io...
Now it is easy to change the process flow
@berndruecker
No BPM(N) monoliths
https://blog.bernd-ruecker.com/avoiding-the-bpm-monolith-when-using-bounded-contexts-d86be6308d8
@bern...
Order
Checkout
Payment
Inventory
Shipment
@berndruecker
The workflow is domain logic as part of the service
@berndruecker
Summary
• Use a workflow engine to automate long running processes
• Visibility is vital for business agility
• Event-driv...
62
Recap: Workflow engines orchestrate anything
Straight through processing
Human Task Management
Orchestrate …
Microservi...
63
Recap: The challenge are long running tasks = waiting
64
Recap: A workflow engine persists state
23
79
51
65
Recap: A workflow engine can be operated decentralized
66
Many use cases (real-life examples)
Industry Pilot Lighthouse Broadscale Sample Clients
Cross-Industry
Approvals
Employ...
Code, code, code…
@berndruecker
Get Started
https://docs.camunda.org/get-started/
Thank you!
@berndruecker
mail@berndruecker.io
@berndruecker
https://berndruecker.io
https://medium.com/berndruecker
https://github.com/berndruecker...
Automating Processes in Modern Architectures
Upcoming SlideShare
Loading in …5
×

Automating Processes in Modern Architectures

Slides from a talk held at JAX London, GOTOpia and some other occasions

  • Be the first to comment

  • Be the first to like this

Automating Processes in Modern Architectures

  1. 1. Automating Processes in Modern Architectures @berndruecker
  2. 2. https://www.theguardian.com/technology/2018/apr/ 24/amazon-jeff-bezos-customer-data-industries
  3. 3. Change is the only constant „ We don‘t know what we will need tomorrow. But we do know that we will need something. We have to be able to move quickly! CIO of a German insurance company in 2019
  4. 4. And you?
  5. 5. Credit Card Handling Payment REST Order Fulfillment REST DB PaymentId Amount Status 1 100 $ Collected 2 125 $ Open Reporting of overdue payments {script} Fixing open payments Scheduler to process open payments Damn it – we need a date! …to be continued…
  6. 6. 8 Using a workflow engine instead Workflow Engine Scheduler Durable State Glue Code Credit Card Service REST Workflow Definition Scope of your solution, application or microservice Workflow Engine: Is stateful Can wait Can retry Can escalate Can compensate Provides visibility
  7. 7. Warning: Contains Opinion @berndruecker
  8. 8. mail@berndruecker.io @berndruecker http://berndruecker.io/ Bernd Ruecker Co-founder and Chief Technologist of Camunda
  9. 9. Camunda • Source-Available & Developer Friendly • Supports BPMN • Mature tooling, widely adopted • On-prem or cloud • http://camunda.com/
  10. 10. Live hacking
  11. 11. https://github.com/berndruecker/flowing-retail/blob/master/rest/java/payment- camunda/src/main/java/io/flowing/retail/payment/resthacks/PaymentRestHacksControllerV3.java
  12. 12. Service A Microservices @berndruecker Monolith Service B Service C C B A D
  13. 13. Service A Autonomous Microservices @berndruecker Service B Service C
  14. 14. The era of APIs API API API API API API API API @berndruecker
  15. 15. The era of APIs API API API API API API API External Services Standard Software API Functions @berndruecker
  16. 16. Connecting the dots… API API API API API API API Microservices External Services Standard Software API Functions @berndruecker
  17. 17. Going hipster! https://www.reactivemanifesto.org/
  18. 18. Example Checkout Payment Inventory Shipment @berndruecker
  19. 19. Order Placed Payment Received Goods Shipped Notification Event-driven & Reactive @berndruecker Checkout Payment Inventory Shipment
  20. 20. But there is also trouble in the event-driven land! Event chains that implement processes Implementing long running behavior
  21. 21. Peer-to-peer event chains Checkout Payment Inventory Shipment Order placed Payment received Goods shipped Goods fetched @berndruecker
  22. 22. Peer-to-peer event chains Checkout Payment Inventory Shipment Order placed Payment received Goods shipped Goods fetched @berndruecker
  23. 23. 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 @berndruecker
  24. 24. 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 @berndruecker
  25. 25. 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 @berndruecker
  26. 26. Phil Calcado at QCon NYC 2019
  27. 27. Notification Checkout Payment Inventory Shipment Pinball Machine Architecture „What the hell just happened?“ @berndruecker
  28. 28. Peer-to-peer event chains Checkout Payment Inventory Shipment Order placed Payment received Goods shipped Goods fetched Fetch the goods before the payment @berndruecker
  29. 29. Peer-to-peer event chains Checkout Payment Inventory Shipment Fetch the goods before the payment Goods fetched Order placed Payment received Goods shipped @berndruecker
  30. 30. What we wanted Photo by Lijian Zhang, under Creative Commons SA 2.0 License and Wikimedia Commons / CC BY-SA 4.0 @berndruecker Choreography
  31. 31. Why is it so tempting? Service A Event Bus A B Service B C Service C D E F Service D G Service … Service … Service … Service … Service … Service … Service … @berndruecker
  32. 32. Why is it so tempting? Service A Event Bus A B Service B C Service C D E F Service D G Service … Service … Service … Service … Service … Service … Service … Adding is easy! You can „buy“ a shorter initial time-to-value by choreography. It yields in technical debt. @berndruecker
  33. 33. Order Decide about responsibility Checkout Payment Inventory Shipment Payment received Order placed Retrieve payment @berndruecker
  34. 34. Order Decide about responsibility Checkout Payment Inventory Shipment Payment received Order placed Retrieve payment @berndruecker This is choreography This is orchestration
  35. 35. Order Decide about responsibility Checkout Payment Inventory Shipment Order placed Retrieve payment It can still be messaging! @berndruecker
  36. 36. Order Checkout Payment Inventory Shipment Stateful orchestration This orchestration requires state @berndruecker
  37. 37. Order Checkout Payment Inventory Shipment @berndruecker
  38. 38. Glue code (e.g. Java) https://github.com/berndruecker/flowing- retail/blob/master/kafka/java/order- zeebe/src/main/java/io/flowing/retail/kafka/or der/flow/FetchGoodsAdapter.java
  39. 39. Now it is easy to change the process flow @berndruecker
  40. 40. No BPM(N) monoliths https://blog.bernd-ruecker.com/avoiding-the-bpm-monolith-when-using-bounded-contexts-d86be6308d8 @berndruecker
  41. 41. Order Checkout Payment Inventory Shipment @berndruecker The workflow is domain logic as part of the service @berndruecker
  42. 42. Summary • Use a workflow engine to automate long running processes • Visibility is vital for business agility • Event-driven choreography is not a magic cure • Orchestration • Helps to avoid chaos • Can be handled within one service (decentral) • Does not mean synchronous communication
  43. 43. 62 Recap: Workflow engines orchestrate anything Straight through processing Human Task Management Orchestrate … Microservices RPA bots Functions, Code, … Decisions (e.g. DMN Tables)
  44. 44. 63 Recap: The challenge are long running tasks = waiting
  45. 45. 64 Recap: A workflow engine persists state 23 79 51
  46. 46. 65 Recap: A workflow engine can be operated decentralized
  47. 47. 66 Many use cases (real-life examples) Industry Pilot Lighthouse Broadscale Sample Clients Cross-Industry Approvals Employee Onboarding Credit Check Microservices Orchestration Centralized Workflow Platform High Throughput E2E Process Automation Legacy BPM Replacement Cloud Native Applications IT Service Orchestration Banking & Finance Asset Management Customer Onboarding Loan Origination & Decisioning ATM Provisioning Enterprise Platform Development Trading Risk Management / Fraud Detection Insurance Audit Customer Onboarding Claim Service & Settlement Policy Underwriting & Contracts Integrated KYC Core System Automation Risk Management / Fraud Detection Telecommunication Online Systems Integration New Product Delivery Cell Tower Provisioning Order Management Contracting, Upgrading, Termination OSS & BSS Open Network Automation Platform (ONAP) Media & Entertainment Website Content Delivery System Process Fallout Subscription Management Licensing Content Distribution Digital Supply Chain New Product Development Fraud Management Manufacturing & High Tech Application prototype Order Execution Payments Servicing Research & Development Embedded Workflow Automation Customer Service Supply Chain
  48. 48. Code, code, code… @berndruecker
  49. 49. Get Started https://docs.camunda.org/get-started/
  50. 50. Thank you! @berndruecker
  51. 51. 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/

×