SlideShare a Scribd company logo
Loosely or Lousily Coupled?
Understanding
Communication Patterns in
Microservices Architectures
@berndruecker
Let‘s talk about food
How does ordering Pizza work?
Pizza
Place
You
Phone Call
Synchronous blocking communication
Feedback loop (ack, confirmation or rejection)
Temporal coupling (e.g. busy, not answering)
Pizza
Place
You
Email
Asynchronous non-blocking communication
No temporal coupling
Pizza
Place
You
A feedback loop might make sense
(ack, confirmation or rejection)
Email
Confirmation Email
Feedback loop != result
Pizza
Place
You
Email
Confirmation Email
Pizza Delivery
Feedback (ACK, confirmation, rejection)
Result
Synchronous blocking behavior for the result?
Bad user experience
Does not scale well
Scalable Coffee Making
https://www.enterpriseintegrationpatterns.com/ramblings/18_starbucks.html
Photo by John Ingle
@berndruecker
Scalable Pizza making
La Pizza Cresci Cannes
https://www.maison-cresci.com/
from http://www.travellingsnail.com/content/la-pizza-cresci-cannes
PUT/order
Synchronous results?
Pizza
Place
You
Pizza Delivery
HTTP 200
The task of
Pizza making is
long running
Only the first communication step is synchronous
Pizza
Place
You
PUT/order
HTTP 200
Pizza Delivery
The task of
Pizza making is
long running
bernd.ruecker@camunda.com
@berndruecker
http://berndruecker.io/
Bernd Ruecker
Co-founder and
Chief Technologist of
Camunda
Making Pizza is long running
A workflow engine provides long running capabilities
Workflow Engine
Scheduler
Durable State
Workflow Definitions
V1
V2
Workflow Engine:
Is stateful
Can wait
Can retry
Can escalate
Can compensate
Provides visibility
Execute Processes
One process instance gets started.
It is persisted in the workflow
engine and „walks“ through the
process model.
@PUT
retrievePayment() {
result = workflowEngine.
startProcessInstance('payment')
if (result.hasEnded())
return 'paymentSucceeded'
else
return 'paymentSucceeded'
}
Your code to provide
a RESTendpoint
Instance
Id
Process
Definition
Current
State
…
…-7454 payment „Charge
Credit
Card“
…
…-4571 payment „Charge
Credit
Card“
…
Process Instance Table
Durable state of
workflow engine
(e.g. via relational database)
Your glue code to
implement the RESTcall
@Task('chargeCreditCard')
chargeCreditCard() {
...
restClient.put(
'http://creditCards/charge/',
requestData)
}
Credit Card
Service
REST
Value Proposition of a Workflow Engine
Value of Visibility
Value of
long running
capabilities
Process
Orchestration
Business Transactions,
Sagas
Solving challenges
with remote communication
Integration Patterns
Graphical Programming
Effort of introducing
a workflow engine
This is orchestration – right?
Command vs. event-based communication
Pizza
Place
You
I order this pizza
OK – got it
Command = Intent
Cannot be ignored
Independant of communication channel
Pizza
Place
You
„Hey – I am hungry!“
Event = Fact
Sender can't control what happens
Events vs. Commands
„Pizza Salmon
is ready!“
I baked this pizza for Andrea.
Please package it immediately and
deliver it while it‘s hot!
Definitions
Event = Something happened in the past. It is a fact.
Sender does not know who picks up the event.
Command = Sender wants s.th. to happen. It has an intent.
Recipient does not know who issued the command.
Choreography
Hey – somebody
ordered
Hey – Pizza is
ready
Orchestrator
Command
Definition
Orchestration = command-driven communication
Choreography = event-driven communication
Let‘s switch examples: Order fulfillment
Checkout
Payment
Inventory
Shipment
Order
placed
Payment
received
Goods
shipped
Goods
fetched
@berndruecker
Event chains
Checkout
Payment
Inventory
Shipment
Order
placed
Payment
received
Goods
shipped
Goods
fetched
@berndruecker
Phil Calcado at QCon NYC 2019
Order
Fulfillment
Orchestration and Choreography
Checkout
Payment
Inventory
Shipment
Payment
received
Order
placed
Retrieve
payment
@berndruecker
This is
choreography
This is
orchestration
Order
Fulfillment
Collaboration style is independant of communication style
Checkout
Payment
Inventory
Shipment
Payment
received
Order
placed
Retrieve
payment
@berndruecker
Choreography
Orchestration
Asynchronous
non-blocking
Asynchronous
non-blocking
Synchronous
blocking
Some code?
https://github.com/berndruecker/flowing-retail/tree/master/kafka
@berndruecker
Sam Newman: Building Microservices
@berndruecker
Mix orchestration and choreography
Orchestration
Orchestration
Orchestration
Choreography
@berndruecker
Want to learn more about choreography vs. orchestration?
https://learning.oreilly.com/library/view/practical-process-automation/9781492061441/
30 days trial: https://learning.oreilly.com/get-learning/?code=PPAER20
Recording from QCon: https://drive.google.com/file/d/1IRWoQCX-gTPs7RVP5VrXaF1JozYWVbJv/view?usp=sharing
Slides: https://www.slideshare.net/BerndRuecker/gotopia-2020-balancing-choreography-and-orchestration
Communication Options – Quick Summary
Communication
Style
Synchronous
Blocking
Asynchronous
Non-Blocking
Collaboration
Style
Command-Driven Event-Driven
Example REST
Messaging
(Queues)
Messaging
(Topics)
Feedback Loop
HTTP
Response
Response
Message
-
Pizza Ordering via Phone Call E-Mail Twitter
This is not the
same!
Coupling
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Temporal Coupling Service depends on
availability of other
services
Synchronous blocking
communication
Reduce or manage
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Temporal Coupling Service depends on
availability of other
services
Synchronous blocking
communication
Reduce or manage
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Temporal Coupling Service depends on
availability of other
services
Synchronous blocking
communication
Reduce or manage
Deployment Coupling Multiple services can only
be deployed together
Release train Typically avoid, but
depends
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Temporal Coupling Service depends on
availability of other
services
Synchronous blocking
communication
Reduce or manage
Deployment Coupling Multiple services can only
be deployed together
Release train Typically avoid, but
depends
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Temporal Coupling Service depends on
availability of other
services
Synchronous blocking
communication
Reduce or manage
Deployment Coupling Multiple services can only
be deployed together
Release train Typically avoid, but
depends
Domain Coupling Business capabilities
require multiple services
Order fulfillment requires
payment, inventory and
shipping
Unavoidable unless you
change business
requirements or service
boundaries
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Temporal Coupling Service depends on
availability of other
services
Synchronous blocking
communication
Reduce or manage
Deployment Coupling Multiple services can only
be deployed together
Release train Typically avoid, but
depends
Domain Coupling Business capabilities
require multiple services
Order fulfillment requires
payment, inventory and
shipping
Unavoidable unless you
change business
requirements or service
boundaries
This is influenced with the communication
or collaboration style
Remote Communication
Messaging?
Patterns To Survive Remote Communication
Service
Consumer
Pattern/Concept Use With
Service
Provider
X Service Discovery Sync (X)
X Circuit Breaker Sync
X Bulkhead Sync
(X) Load Balancing Sync X
X Retry Sync / Async
X Idempotency Sync / Async X
De-duplication Async X
(X) Back Pressure & Rate Limiting Sync / (Async) X
X Await feedback Async
X Sagas Sync / Async (X) …
Circuit
Breaker
Photo by CITYEDV, available under Creative Commons CC0 1.0 license.
Circuit Breaker
Webshop
You
PUT/order Address
Check
Payment
from https://martinfowler.com/bliki/CircuitBreaker.html
Circuit Breaker
Webshop
You
PUT/order Address
Check
Payment
@CircuitBreaker(name = BACKEND, fallbackMethod =
"fallback")
public boolean addressValid(Address a) {
return httpEndpoint.GET(...);
}
private boolean fallback(Address a) {
return true;
}
e.g. Resilience4J:
resilience4j.circuitbreaker:
instances:
BACKEND:
registerHealthIndicator: true
slidingWindowSize: 100
permittedNumberOfCallsInHalfOpenState: 3
minimumNumberOfCalls: 20
waitDurationInOpenState: 50s
failureRateThreshold: 50
https://www.infoworld.com/article/3254777/application-development/
3-common-pitfalls-of-microservices-integrationand-how-to-avoid-them.html
Stateful retry
Webshop
You
PUT/order Address
Check
Payment
Workflow
Engine
Scheduler
Durable State
Loosely or Lousily Coupled?
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
Temporal Coupling Service depends on
availability of other
services
Synchronous blocking
communication
Reduce or manage
Deployment Coupling Multiple services can only
be deployed together
Release train Typically avoid, but
depends
Domain Coupling Business capabilities
require multiple services
Order fulfillment requires
payment, inventory and
shipping
Unavoidable unless you
change business
requirements or service
boundaries
Summary so far…
• Know
• communication styles (sync/async)
• collaboration styles (command/event)
• You can get rid of temporal coupling with asynchronous communication
• Make sure you or your team can handle it
• You will need long running capabilities (you might need it anyway)
• Synchronous communication + correct patterns might also be OK
• Domain coupling does not go away!
Want to learn more…
https://ProcessAutomationBook.com/
Free electronic version available
Featuring code examples:
Thank you!
@berndruecker
mail@berndruecker.io
@berndruecker
https://berndruecker.io
https://medium.com/berndruecker
https://github.com/berndruecker
Contact:
Slides:
Blog:
Code:
https://ProcessAutomationBook.com/

More Related Content

What's hot

Camunda Meetup: Rethink Business Processes and User Experience to Leverage Th...
Camunda Meetup: Rethink Business Processes and User Experience to Leverage Th...Camunda Meetup: Rethink Business Processes and User Experience to Leverage Th...
Camunda Meetup: Rethink Business Processes and User Experience to Leverage Th...Bernd Ruecker
 
Moving beyond request reply - designing smarter APIs
Moving beyond request reply - designing smarter APIsMoving beyond request reply - designing smarter APIs
Moving beyond request reply - designing smarter APIsBernd Ruecker
 
Camunda Con 2019 Keynote - I want my process back #microservices #serverless
Camunda Con 2019 Keynote - I want my process back #microservices #serverlessCamunda Con 2019 Keynote - I want my process back #microservices #serverless
Camunda Con 2019 Keynote - I want my process back #microservices #serverlessBernd Ruecker
 
Destination Automation: Automating Processes in Modern Hipster Architectures
Destination Automation: Automating Processes in Modern Hipster ArchitecturesDestination Automation: Automating Processes in Modern Hipster Architectures
Destination Automation: Automating Processes in Modern Hipster ArchitecturesBernd Ruecker
 
Webinar "Communication Between Loosely Coupled Microservices"
Webinar "Communication Between Loosely Coupled Microservices"Webinar "Communication Between Loosely Coupled Microservices"
Webinar "Communication Between Loosely Coupled Microservices"Bernd Ruecker
 
GOTOpia 2020 - Balancing Choreography and Orchestration
GOTOpia 2020 - Balancing Choreography and OrchestrationGOTOpia 2020 - Balancing Choreography and Orchestration
GOTOpia 2020 - Balancing Choreography and OrchestrationBernd Ruecker
 
Serverless Days 2019 - Lost in transaction
Serverless Days 2019 - Lost in transactionServerless Days 2019 - Lost in transaction
Serverless Days 2019 - Lost in transactionBernd Ruecker
 
Kafka Summit 2020: If an event is published to a topic and no one is around t...
Kafka Summit 2020: If an event is published to a topic and no one is around t...Kafka Summit 2020: If an event is published to a topic and no one is around t...
Kafka Summit 2020: If an event is published to a topic and no one is around t...Bernd Ruecker
 
Apache Kafka Meets Workflow Engines | Bernd Ruecker, Camunda
Apache Kafka Meets Workflow Engines | Bernd Ruecker, CamundaApache Kafka Meets Workflow Engines | Bernd Ruecker, Camunda
Apache Kafka Meets Workflow Engines | Bernd Ruecker, CamundaHostedbyConfluent
 
The role of workflows in microservices
The role of workflows in microservicesThe role of workflows in microservices
The role of workflows in microservicesBernd Ruecker
 
Camunda Con Live 2020 Keynote - Microservice Orchestration and Integration
Camunda Con Live 2020 Keynote - Microservice Orchestration and IntegrationCamunda Con Live 2020 Keynote - Microservice Orchestration and Integration
Camunda Con Live 2020 Keynote - Microservice Orchestration and IntegrationBernd Ruecker
 
Automating Processes in Modern Architectures
Automating Processes in Modern ArchitecturesAutomating Processes in Modern Architectures
Automating Processes in Modern ArchitecturesBernd Ruecker
 
3 common pitfalls in microservice integration
3 common pitfalls in microservice integration3 common pitfalls in microservice integration
3 common pitfalls in microservice integrationBernd Ruecker
 
Monitoring and Orchestration of your Microservices Landscape with Kafka and Z...
Monitoring and Orchestration of your Microservices Landscape with Kafka and Z...Monitoring and Orchestration of your Microservices Landscape with Kafka and Z...
Monitoring and Orchestration of your Microservices Landscape with Kafka and Z...Bernd Ruecker
 
2019 DACH Roadshow - Workflow Automation in Microservices Architectures
2019 DACH Roadshow - Workflow Automation in Microservices Architectures2019 DACH Roadshow - Workflow Automation in Microservices Architectures
2019 DACH Roadshow - Workflow Automation in Microservices ArchitecturesBernd Ruecker
 
JAX 2019 - Workflow automation reinvented
JAX 2019 - Workflow automation reinventedJAX 2019 - Workflow automation reinvented
JAX 2019 - Workflow automation reinventedBernd Ruecker
 
Long running processes in DDD
Long running processes in DDDLong running processes in DDD
Long running processes in DDDBernd Ruecker
 
Microservices with Camunda - Talk from Camunda Days 01/2018
Microservices with Camunda - Talk from Camunda Days 01/2018Microservices with Camunda - Talk from Camunda Days 01/2018
Microservices with Camunda - Talk from Camunda Days 01/2018Bernd Ruecker
 
Jfokus 2018: Lost in transaction - Strategies to deal with (in-)consistency ...
Jfokus 2018: Lost in transaction -  Strategies to deal with (in-)consistency ...Jfokus 2018: Lost in transaction -  Strategies to deal with (in-)consistency ...
Jfokus 2018: Lost in transaction - Strategies to deal with (in-)consistency ...Bernd Ruecker
 
Workflow automation with BPMN. Lessons learned.
Workflow automation with BPMN. Lessons learned.Workflow automation with BPMN. Lessons learned.
Workflow automation with BPMN. Lessons learned.Bernd Ruecker
 

What's hot (20)

Camunda Meetup: Rethink Business Processes and User Experience to Leverage Th...
Camunda Meetup: Rethink Business Processes and User Experience to Leverage Th...Camunda Meetup: Rethink Business Processes and User Experience to Leverage Th...
Camunda Meetup: Rethink Business Processes and User Experience to Leverage Th...
 
Moving beyond request reply - designing smarter APIs
Moving beyond request reply - designing smarter APIsMoving beyond request reply - designing smarter APIs
Moving beyond request reply - designing smarter APIs
 
Camunda Con 2019 Keynote - I want my process back #microservices #serverless
Camunda Con 2019 Keynote - I want my process back #microservices #serverlessCamunda Con 2019 Keynote - I want my process back #microservices #serverless
Camunda Con 2019 Keynote - I want my process back #microservices #serverless
 
Destination Automation: Automating Processes in Modern Hipster Architectures
Destination Automation: Automating Processes in Modern Hipster ArchitecturesDestination Automation: Automating Processes in Modern Hipster Architectures
Destination Automation: Automating Processes in Modern Hipster Architectures
 
Webinar "Communication Between Loosely Coupled Microservices"
Webinar "Communication Between Loosely Coupled Microservices"Webinar "Communication Between Loosely Coupled Microservices"
Webinar "Communication Between Loosely Coupled Microservices"
 
GOTOpia 2020 - Balancing Choreography and Orchestration
GOTOpia 2020 - Balancing Choreography and OrchestrationGOTOpia 2020 - Balancing Choreography and Orchestration
GOTOpia 2020 - Balancing Choreography and Orchestration
 
Serverless Days 2019 - Lost in transaction
Serverless Days 2019 - Lost in transactionServerless Days 2019 - Lost in transaction
Serverless Days 2019 - Lost in transaction
 
Kafka Summit 2020: If an event is published to a topic and no one is around t...
Kafka Summit 2020: If an event is published to a topic and no one is around t...Kafka Summit 2020: If an event is published to a topic and no one is around t...
Kafka Summit 2020: If an event is published to a topic and no one is around t...
 
Apache Kafka Meets Workflow Engines | Bernd Ruecker, Camunda
Apache Kafka Meets Workflow Engines | Bernd Ruecker, CamundaApache Kafka Meets Workflow Engines | Bernd Ruecker, Camunda
Apache Kafka Meets Workflow Engines | Bernd Ruecker, Camunda
 
The role of workflows in microservices
The role of workflows in microservicesThe role of workflows in microservices
The role of workflows in microservices
 
Camunda Con Live 2020 Keynote - Microservice Orchestration and Integration
Camunda Con Live 2020 Keynote - Microservice Orchestration and IntegrationCamunda Con Live 2020 Keynote - Microservice Orchestration and Integration
Camunda Con Live 2020 Keynote - Microservice Orchestration and Integration
 
Automating Processes in Modern Architectures
Automating Processes in Modern ArchitecturesAutomating Processes in Modern Architectures
Automating Processes in Modern Architectures
 
3 common pitfalls in microservice integration
3 common pitfalls in microservice integration3 common pitfalls in microservice integration
3 common pitfalls in microservice integration
 
Monitoring and Orchestration of your Microservices Landscape with Kafka and Z...
Monitoring and Orchestration of your Microservices Landscape with Kafka and Z...Monitoring and Orchestration of your Microservices Landscape with Kafka and Z...
Monitoring and Orchestration of your Microservices Landscape with Kafka and Z...
 
2019 DACH Roadshow - Workflow Automation in Microservices Architectures
2019 DACH Roadshow - Workflow Automation in Microservices Architectures2019 DACH Roadshow - Workflow Automation in Microservices Architectures
2019 DACH Roadshow - Workflow Automation in Microservices Architectures
 
JAX 2019 - Workflow automation reinvented
JAX 2019 - Workflow automation reinventedJAX 2019 - Workflow automation reinvented
JAX 2019 - Workflow automation reinvented
 
Long running processes in DDD
Long running processes in DDDLong running processes in DDD
Long running processes in DDD
 
Microservices with Camunda - Talk from Camunda Days 01/2018
Microservices with Camunda - Talk from Camunda Days 01/2018Microservices with Camunda - Talk from Camunda Days 01/2018
Microservices with Camunda - Talk from Camunda Days 01/2018
 
Jfokus 2018: Lost in transaction - Strategies to deal with (in-)consistency ...
Jfokus 2018: Lost in transaction -  Strategies to deal with (in-)consistency ...Jfokus 2018: Lost in transaction -  Strategies to deal with (in-)consistency ...
Jfokus 2018: Lost in transaction - Strategies to deal with (in-)consistency ...
 
Workflow automation with BPMN. Lessons learned.
Workflow automation with BPMN. Lessons learned.Workflow automation with BPMN. Lessons learned.
Workflow automation with BPMN. Lessons learned.
 

Similar to JCon 2021 - Loosely or lousily coupled

JAX 2022 - Loosely or lousily coupled
JAX 2022 - Loosely or lousily coupledJAX 2022 - Loosely or lousily coupled
JAX 2022 - Loosely or lousily coupledBernd Ruecker
 
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...Bernd Ruecker
 
Loosely or lousily coupled - Understanding communication patterns in microser...
Loosely or lousily coupled - Understanding communication patterns in microser...Loosely or lousily coupled - Understanding communication patterns in microser...
Loosely or lousily coupled - Understanding communication patterns in microser...Bernd Ruecker
 
Loosely or lousily coupled? Understanding communication patterns in modern ar...
Loosely or lousily coupled? Understanding communication patterns in modern ar...Loosely or lousily coupled? Understanding communication patterns in modern ar...
Loosely or lousily coupled? Understanding communication patterns in modern ar...HostedbyConfluent
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...
WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...
WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...Bernd Ruecker
 
We broke up with the monolith, and started dating #eventSourcing - #symfonyCat
We broke up with the monolith, and started dating #eventSourcing - #symfonyCatWe broke up with the monolith, and started dating #eventSourcing - #symfonyCat
We broke up with the monolith, and started dating #eventSourcing - #symfonyCatJavier Ferrer González
 
Mucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous MicroservicesMucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous MicroservicesChris Richardson
 
Komunikacja oparta o eventy w architekturze mikroserwisowej
Komunikacja oparta o eventy w architekturze mikroserwisowejKomunikacja oparta o eventy w architekturze mikroserwisowej
Komunikacja oparta o eventy w architekturze mikroserwisowejThe Software House
 
Move fast and consumer driven contract test things
Move fast and consumer driven contract test thingsMove fast and consumer driven contract test things
Move fast and consumer driven contract test thingsAlon Pe'er
 
Migrating to Continuous Delivery with TFS 2017 - Liviu Mandras-Iura
 Migrating to Continuous Delivery with TFS 2017 - Liviu Mandras-Iura Migrating to Continuous Delivery with TFS 2017 - Liviu Mandras-Iura
Migrating to Continuous Delivery with TFS 2017 - Liviu Mandras-IuraITCamp
 
Handling Failures with Messaging
Handling Failures with MessagingHandling Failures with Messaging
Handling Failures with MessagingElton Stoneman
 
The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided AdventureThe Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided AdventureVMware Tanzu
 
Saturn 2018: Managing data consistency in a microservice architecture using S...
Saturn 2018: Managing data consistency in a microservice architecture using S...Saturn 2018: Managing data consistency in a microservice architecture using S...
Saturn 2018: Managing data consistency in a microservice architecture using S...Chris Richardson
 
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...Chris Richardson
 
Reactive Streams in the Web
Reactive Streams in the WebReactive Streams in the Web
Reactive Streams in the WebFlorian Stefan
 
Async Tasks with Django Channels
Async Tasks with Django ChannelsAsync Tasks with Django Channels
Async Tasks with Django ChannelsAlbert O'Connor
 
Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements Dr. Fahad Aijaz
 
Performance in business terms
Performance in business termsPerformance in business terms
Performance in business termsStrangeloop
 
Pragmatic Event Driven Microservices
Pragmatic Event Driven MicroservicesPragmatic Event Driven Microservices
Pragmatic Event Driven MicroservicesAllard Buijze
 

Similar to JCon 2021 - Loosely or lousily coupled (20)

JAX 2022 - Loosely or lousily coupled
JAX 2022 - Loosely or lousily coupledJAX 2022 - Loosely or lousily coupled
JAX 2022 - Loosely or lousily coupled
 
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
 
Loosely or lousily coupled - Understanding communication patterns in microser...
Loosely or lousily coupled - Understanding communication patterns in microser...Loosely or lousily coupled - Understanding communication patterns in microser...
Loosely or lousily coupled - Understanding communication patterns in microser...
 
Loosely or lousily coupled? Understanding communication patterns in modern ar...
Loosely or lousily coupled? Understanding communication patterns in modern ar...Loosely or lousily coupled? Understanding communication patterns in modern ar...
Loosely or lousily coupled? Understanding communication patterns in modern ar...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...
WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...
WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...
 
We broke up with the monolith, and started dating #eventSourcing - #symfonyCat
We broke up with the monolith, and started dating #eventSourcing - #symfonyCatWe broke up with the monolith, and started dating #eventSourcing - #symfonyCat
We broke up with the monolith, and started dating #eventSourcing - #symfonyCat
 
Mucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous MicroservicesMucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous Microservices
 
Komunikacja oparta o eventy w architekturze mikroserwisowej
Komunikacja oparta o eventy w architekturze mikroserwisowejKomunikacja oparta o eventy w architekturze mikroserwisowej
Komunikacja oparta o eventy w architekturze mikroserwisowej
 
Move fast and consumer driven contract test things
Move fast and consumer driven contract test thingsMove fast and consumer driven contract test things
Move fast and consumer driven contract test things
 
Migrating to Continuous Delivery with TFS 2017 - Liviu Mandras-Iura
 Migrating to Continuous Delivery with TFS 2017 - Liviu Mandras-Iura Migrating to Continuous Delivery with TFS 2017 - Liviu Mandras-Iura
Migrating to Continuous Delivery with TFS 2017 - Liviu Mandras-Iura
 
Handling Failures with Messaging
Handling Failures with MessagingHandling Failures with Messaging
Handling Failures with Messaging
 
The Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided AdventureThe Journey from Monolith to Microservices: a Guided Adventure
The Journey from Monolith to Microservices: a Guided Adventure
 
Saturn 2018: Managing data consistency in a microservice architecture using S...
Saturn 2018: Managing data consistency in a microservice architecture using S...Saturn 2018: Managing data consistency in a microservice architecture using S...
Saturn 2018: Managing data consistency in a microservice architecture using S...
 
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
 
Reactive Streams in the Web
Reactive Streams in the WebReactive Streams in the Web
Reactive Streams in the Web
 
Async Tasks with Django Channels
Async Tasks with Django ChannelsAsync Tasks with Django Channels
Async Tasks with Django Channels
 
Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements Protecting Multi-Interfaced Mobile Web Services using Agreements
Protecting Multi-Interfaced Mobile Web Services using Agreements
 
Performance in business terms
Performance in business termsPerformance in business terms
Performance in business terms
 
Pragmatic Event Driven Microservices
Pragmatic Event Driven MicroservicesPragmatic Event Driven Microservices
Pragmatic Event Driven Microservices
 

More from Bernd Ruecker

JCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problemsJCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problemsBernd Ruecker
 
JFall - Process Oriented Integration
JFall - Process Oriented IntegrationJFall - Process Oriented Integration
JFall - Process Oriented IntegrationBernd Ruecker
 
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestrationCamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestrationBernd Ruecker
 
JavaLand 2023 - Process Oriented Integration
JavaLand 2023 - Process Oriented IntegrationJavaLand 2023 - Process Oriented Integration
JavaLand 2023 - Process Oriented IntegrationBernd Ruecker
 
CraftConf: Surviving the hyperautomation low code bubbl
CraftConf: Surviving the hyperautomation low code bubblCraftConf: Surviving the hyperautomation low code bubbl
CraftConf: Surviving the hyperautomation low code bubblBernd Ruecker
 
Mastering Data for Higher Business Impact - at Commerzbank Innovation Summit
Mastering Data for Higher Business Impact - at Commerzbank Innovation SummitMastering Data for Higher Business Impact - at Commerzbank Innovation Summit
Mastering Data for Higher Business Impact - at Commerzbank Innovation SummitBernd Ruecker
 
Camunda Chapter Hamburg - Surviving the hyperautomation low code bubble
Camunda Chapter Hamburg - Surviving the hyperautomation low code bubbleCamunda Chapter Hamburg - Surviving the hyperautomation low code bubble
Camunda Chapter Hamburg - Surviving the hyperautomation low code bubbleBernd Ruecker
 
CamundaCon 2022 Keynote: The Process Orchestration Journey
CamundaCon 2022 Keynote: The Process Orchestration JourneyCamundaCon 2022 Keynote: The Process Orchestration Journey
CamundaCon 2022 Keynote: The Process Orchestration JourneyBernd Ruecker
 
JFS 2021 - The Process Automation Map
JFS 2021 - The Process Automation MapJFS 2021 - The Process Automation Map
JFS 2021 - The Process Automation MapBernd Ruecker
 
CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...
CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...
CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...Bernd Ruecker
 
Process Automation Forum April 2021 - Practical Process Automation
Process Automation Forum April 2021 - Practical Process AutomationProcess Automation Forum April 2021 - Practical Process Automation
Process Automation Forum April 2021 - Practical Process AutomationBernd Ruecker
 
Micronaut Webinar 2021 - Process Automation Introduction
Micronaut Webinar 2021 - Process Automation IntroductionMicronaut Webinar 2021 - Process Automation Introduction
Micronaut Webinar 2021 - Process Automation IntroductionBernd Ruecker
 
CamundaCon 2020 Keynote - The Return of Process Automation
CamundaCon 2020 Keynote - The Return of Process AutomationCamundaCon 2020 Keynote - The Return of Process Automation
CamundaCon 2020 Keynote - The Return of Process AutomationBernd Ruecker
 
Digitalization and Workflow Automation - Camunda Process Automation Forum
Digitalization and Workflow Automation - Camunda Process Automation ForumDigitalization and Workflow Automation - Camunda Process Automation Forum
Digitalization and Workflow Automation - Camunda Process Automation ForumBernd Ruecker
 

More from Bernd Ruecker (14)

JCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problemsJCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problems
 
JFall - Process Oriented Integration
JFall - Process Oriented IntegrationJFall - Process Oriented Integration
JFall - Process Oriented Integration
 
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestrationCamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
 
JavaLand 2023 - Process Oriented Integration
JavaLand 2023 - Process Oriented IntegrationJavaLand 2023 - Process Oriented Integration
JavaLand 2023 - Process Oriented Integration
 
CraftConf: Surviving the hyperautomation low code bubbl
CraftConf: Surviving the hyperautomation low code bubblCraftConf: Surviving the hyperautomation low code bubbl
CraftConf: Surviving the hyperautomation low code bubbl
 
Mastering Data for Higher Business Impact - at Commerzbank Innovation Summit
Mastering Data for Higher Business Impact - at Commerzbank Innovation SummitMastering Data for Higher Business Impact - at Commerzbank Innovation Summit
Mastering Data for Higher Business Impact - at Commerzbank Innovation Summit
 
Camunda Chapter Hamburg - Surviving the hyperautomation low code bubble
Camunda Chapter Hamburg - Surviving the hyperautomation low code bubbleCamunda Chapter Hamburg - Surviving the hyperautomation low code bubble
Camunda Chapter Hamburg - Surviving the hyperautomation low code bubble
 
CamundaCon 2022 Keynote: The Process Orchestration Journey
CamundaCon 2022 Keynote: The Process Orchestration JourneyCamundaCon 2022 Keynote: The Process Orchestration Journey
CamundaCon 2022 Keynote: The Process Orchestration Journey
 
JFS 2021 - The Process Automation Map
JFS 2021 - The Process Automation MapJFS 2021 - The Process Automation Map
JFS 2021 - The Process Automation Map
 
CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...
CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...
CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...
 
Process Automation Forum April 2021 - Practical Process Automation
Process Automation Forum April 2021 - Practical Process AutomationProcess Automation Forum April 2021 - Practical Process Automation
Process Automation Forum April 2021 - Practical Process Automation
 
Micronaut Webinar 2021 - Process Automation Introduction
Micronaut Webinar 2021 - Process Automation IntroductionMicronaut Webinar 2021 - Process Automation Introduction
Micronaut Webinar 2021 - Process Automation Introduction
 
CamundaCon 2020 Keynote - The Return of Process Automation
CamundaCon 2020 Keynote - The Return of Process AutomationCamundaCon 2020 Keynote - The Return of Process Automation
CamundaCon 2020 Keynote - The Return of Process Automation
 
Digitalization and Workflow Automation - Camunda Process Automation Forum
Digitalization and Workflow Automation - Camunda Process Automation ForumDigitalization and Workflow Automation - Camunda Process Automation Forum
Digitalization and Workflow Automation - Camunda Process Automation Forum
 

Recently uploaded

The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfalexjohnson7307
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsPaul Groth
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...Product School
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 

Recently uploaded (20)

The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 

JCon 2021 - Loosely or lousily coupled

  • 1. Loosely or Lousily Coupled? Understanding Communication Patterns in Microservices Architectures @berndruecker
  • 3. How does ordering Pizza work? Pizza Place You Phone Call Synchronous blocking communication Feedback loop (ack, confirmation or rejection) Temporal coupling (e.g. busy, not answering) Pizza Place You Email Asynchronous non-blocking communication No temporal coupling Pizza Place You A feedback loop might make sense (ack, confirmation or rejection) Email Confirmation Email
  • 4. Feedback loop != result Pizza Place You Email Confirmation Email Pizza Delivery Feedback (ACK, confirmation, rejection) Result
  • 5. Synchronous blocking behavior for the result? Bad user experience Does not scale well
  • 7. Scalable Pizza making La Pizza Cresci Cannes https://www.maison-cresci.com/ from http://www.travellingsnail.com/content/la-pizza-cresci-cannes
  • 8. PUT/order Synchronous results? Pizza Place You Pizza Delivery HTTP 200 The task of Pizza making is long running
  • 9. Only the first communication step is synchronous Pizza Place You PUT/order HTTP 200 Pizza Delivery The task of Pizza making is long running
  • 11. Making Pizza is long running
  • 12. A workflow engine provides long running capabilities Workflow Engine Scheduler Durable State Workflow Definitions V1 V2 Workflow Engine: Is stateful Can wait Can retry Can escalate Can compensate Provides visibility
  • 13. Execute Processes One process instance gets started. It is persisted in the workflow engine and „walks“ through the process model. @PUT retrievePayment() { result = workflowEngine. startProcessInstance('payment') if (result.hasEnded()) return 'paymentSucceeded' else return 'paymentSucceeded' } Your code to provide a RESTendpoint Instance Id Process Definition Current State … …-7454 payment „Charge Credit Card“ … …-4571 payment „Charge Credit Card“ … Process Instance Table Durable state of workflow engine (e.g. via relational database) Your glue code to implement the RESTcall @Task('chargeCreditCard') chargeCreditCard() { ... restClient.put( 'http://creditCards/charge/', requestData) } Credit Card Service REST
  • 14. Value Proposition of a Workflow Engine Value of Visibility Value of long running capabilities Process Orchestration Business Transactions, Sagas Solving challenges with remote communication Integration Patterns Graphical Programming Effort of introducing a workflow engine
  • 15. This is orchestration – right?
  • 16. Command vs. event-based communication Pizza Place You I order this pizza OK – got it Command = Intent Cannot be ignored Independant of communication channel Pizza Place You „Hey – I am hungry!“ Event = Fact Sender can't control what happens
  • 17. Events vs. Commands „Pizza Salmon is ready!“ I baked this pizza for Andrea. Please package it immediately and deliver it while it‘s hot!
  • 18. Definitions Event = Something happened in the past. It is a fact. Sender does not know who picks up the event. Command = Sender wants s.th. to happen. It has an intent. Recipient does not know who issued the command.
  • 21. Definition Orchestration = command-driven communication Choreography = event-driven communication
  • 22. Let‘s switch examples: Order fulfillment Checkout Payment Inventory Shipment Order placed Payment received Goods shipped Goods fetched @berndruecker
  • 24. Phil Calcado at QCon NYC 2019
  • 26. Order Fulfillment Collaboration style is independant of communication style Checkout Payment Inventory Shipment Payment received Order placed Retrieve payment @berndruecker Choreography Orchestration Asynchronous non-blocking Asynchronous non-blocking Synchronous blocking
  • 28. Sam Newman: Building Microservices @berndruecker
  • 29. Mix orchestration and choreography Orchestration Orchestration Orchestration Choreography @berndruecker
  • 30. Want to learn more about choreography vs. orchestration? https://learning.oreilly.com/library/view/practical-process-automation/9781492061441/ 30 days trial: https://learning.oreilly.com/get-learning/?code=PPAER20 Recording from QCon: https://drive.google.com/file/d/1IRWoQCX-gTPs7RVP5VrXaF1JozYWVbJv/view?usp=sharing Slides: https://www.slideshare.net/BerndRuecker/gotopia-2020-balancing-choreography-and-orchestration
  • 31. Communication Options – Quick Summary Communication Style Synchronous Blocking Asynchronous Non-Blocking Collaboration Style Command-Driven Event-Driven Example REST Messaging (Queues) Messaging (Topics) Feedback Loop HTTP Response Response Message - Pizza Ordering via Phone Call E-Mail Twitter This is not the same!
  • 33. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid
  • 34. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid
  • 35. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid Temporal Coupling Service depends on availability of other services Synchronous blocking communication Reduce or manage
  • 36. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid Temporal Coupling Service depends on availability of other services Synchronous blocking communication Reduce or manage
  • 37. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid Temporal Coupling Service depends on availability of other services Synchronous blocking communication Reduce or manage Deployment Coupling Multiple services can only be deployed together Release train Typically avoid, but depends
  • 38. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid Temporal Coupling Service depends on availability of other services Synchronous blocking communication Reduce or manage Deployment Coupling Multiple services can only be deployed together Release train Typically avoid, but depends
  • 39. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid Temporal Coupling Service depends on availability of other services Synchronous blocking communication Reduce or manage Deployment Coupling Multiple services can only be deployed together Release train Typically avoid, but depends Domain Coupling Business capabilities require multiple services Order fulfillment requires payment, inventory and shipping Unavoidable unless you change business requirements or service boundaries
  • 40. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid Temporal Coupling Service depends on availability of other services Synchronous blocking communication Reduce or manage Deployment Coupling Multiple services can only be deployed together Release train Typically avoid, but depends Domain Coupling Business capabilities require multiple services Order fulfillment requires payment, inventory and shipping Unavoidable unless you change business requirements or service boundaries This is influenced with the communication or collaboration style
  • 43. Patterns To Survive Remote Communication Service Consumer Pattern/Concept Use With Service Provider X Service Discovery Sync (X) X Circuit Breaker Sync X Bulkhead Sync (X) Load Balancing Sync X X Retry Sync / Async X Idempotency Sync / Async X De-duplication Async X (X) Back Pressure & Rate Limiting Sync / (Async) X X Await feedback Async X Sagas Sync / Async (X) …
  • 44. Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license.
  • 45. Circuit Breaker Webshop You PUT/order Address Check Payment from https://martinfowler.com/bliki/CircuitBreaker.html
  • 46. Circuit Breaker Webshop You PUT/order Address Check Payment @CircuitBreaker(name = BACKEND, fallbackMethod = "fallback") public boolean addressValid(Address a) { return httpEndpoint.GET(...); } private boolean fallback(Address a) { return true; } e.g. Resilience4J: resilience4j.circuitbreaker: instances: BACKEND: registerHealthIndicator: true slidingWindowSize: 100 permittedNumberOfCallsInHalfOpenState: 3 minimumNumberOfCalls: 20 waitDurationInOpenState: 50s failureRateThreshold: 50
  • 49. Loosely or Lousily Coupled? Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid Temporal Coupling Service depends on availability of other services Synchronous blocking communication Reduce or manage Deployment Coupling Multiple services can only be deployed together Release train Typically avoid, but depends Domain Coupling Business capabilities require multiple services Order fulfillment requires payment, inventory and shipping Unavoidable unless you change business requirements or service boundaries
  • 50. Summary so far… • Know • communication styles (sync/async) • collaboration styles (command/event) • You can get rid of temporal coupling with asynchronous communication • Make sure you or your team can handle it • You will need long running capabilities (you might need it anyway) • Synchronous communication + correct patterns might also be OK • Domain coupling does not go away!
  • 51. Want to learn more… https://ProcessAutomationBook.com/ Free electronic version available Featuring code examples: