SlideShare une entreprise Scribd logo
1  sur  55
Télécharger pour lire hors ligne
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
@berndruecker
Feedback loop != result
Pizza
Place
You
Email
Confirmation Email
Pizza Delivery
Feedback (ACK, confirmation, rejection)
Result
@berndruecker
Synchronous blocking behavior for the result?
Bad user experience
Does not scale well
@berndruecker
Scalable Coffee Making
https://www.enterpriseintegrationpatterns.com/ramblings/18_starbucks.html
Photo by John Ingle
@berndruecker
PUT/order
Synchronous results?
Pizza
Place
You
Pizza Delivery
HTTP 200
The task of
Pizza making is
long running
@berndruecker
Only the first communication step is synchronous
Pizza
Place
You
PUT/order
HTTP 200
Pizza Delivery
The task of
Pizza making is
long running
@berndruecker
Example: Build a pizza ordering app
PUT/order
HTTP 200:
„Got your order. Should
be delievered in roughly
41 minutes.“
Pizza Delivery
System
@berndruecker
Example: Build a pizza ordering app using events
PUT/order
HTTP 200:
„Got your order. Should
be delievered in roughly
41 minutes.“
Pizza Delivery
System
Hey – somebody
ordered
Hey – Pizza is
ready
I have a Pizza
for you
@berndruecker
PUT/order
HTTP 200:
„Got your order. Should
be delievered in roughly
41 minutes.“
Pizza Delivery
System
Hey – somebody
ordered
Hey – Pizza is
ready
I have a Pizza
for you
How do I make sure the
Pizza is not forgotten?
Example: Build a pizza ordering app using events
@berndruecker
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
@berndruecker
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.
@berndruecker
Events vs. Commands
„Pizza Salmon
is ready!“
I baked this pizza for Andrea.
Please package it immediately and
deliver it while it‘s hot!
@berndruecker
Orchestrator
Command
@berndruecker
Example: Build a pizza ordering app via orchestration
PUT/order
HTTP 200:
„Got your order. Should
be delievered in roughly
41 minutes.“
Pizza Delivery
System
But how to implement
long-running things?
@berndruecker
bernd.ruecker@camunda.com
@berndruecker
http://berndruecker.io/
Bernd Ruecker
Co-founder and
Chief Technologist of
Camunda
An orchestration engine provides long running capabilities
Orchestration Engine
Scheduler
Durable State
Process Definitions
V1
V2
Orchestration Engine:
Is stateful
Can wait
Can retry
Can escalate
Can compensate
Provides visibility
@berndruecker
A possible process for the Pizza ordering system
@berndruecker
You can still work with events
Pizza xy was picked
up by driver z
Driver z handed over
Pizza successfully
@berndruecker
Your code to provide a REST endpoint
Developer-friendly
orchestration engines
@PutMapping("/pizza-order")
public ResponseEntity<PizzaOrderResponse pizzaOrderReceived(...) {
HashMap<String, Object> variables = new HashMap<String, Object>();
variables.put("orderId", orderId);
ProcessInstanceEvent processInstance = camunda.newCreateInstanceCommand()
.bpmnProcessId("pizza-order")
.latestVersion()
.variables(variables)
.send().join();
return ResponseEntity.status(HttpStatus.ACCEPTED).build();
}
@berndruecker
Orchestration vs. Choreography
@berndruecker
Definition
Orchestration = command-driven communication
Choreography = event-driven communication
@berndruecker
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
Notification
Checkout
Payment
Inventory
Shipment
@berndruecker
Pinball Machine Architecture
@berndruecker
Order
Fulfillment
Orchestration and Choreography
Checkout
Payment
Inventory
Shipment
Payment
received
Order
placed
Retrieve
payment
@berndruecker
This is
choreography
This is
orchestration
Order
Fulfillment
Checkout
Payment
Inventory
Shipment
@berndruecker
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!
@berndruecker
Coupling
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
@berndruecker
Types of Coupling
Type of coupling Description Example Recommendation
Implementation Coupling Service knows internals of
other services
Joined database Avoid
@berndruecker
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
@berndruecker
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
@berndruecker
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
@berndruecker
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
@berndruecker
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
@berndruecker
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
@berndruecker
Messaging?
@berndruecker
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) …
@berndruecker
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
@berndruecker
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
@berndruecker
https://www.infoworld.com/article/3254777/application-development/
3-common-pitfalls-of-microservices-integrationand-how-to-avoid-them.html
@berndruecker
Stateful retry
Webshop
You
PUT/order Address
Check
Payment
Orchestration
Engine
Scheduler
Durable State
@berndruecker
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) …
Summary
• 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!
@berndruecker
Want to learn more…
https://ProcessAutomationBook.com/
Thank you!
@berndruecker

Contenu connexe

Tendances

Cloud Reference Architecture - Part 1 Foundation
Cloud Reference Architecture - Part 1 FoundationCloud Reference Architecture - Part 1 Foundation
Cloud Reference Architecture - Part 1 FoundationAmmar Hasayen
 
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDPKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDDevOps.com
 
DevSecOps reference architectures 2018
DevSecOps reference architectures 2018DevSecOps reference architectures 2018
DevSecOps reference architectures 2018Sonatype
 
Security Operation Center - Design & Build
Security Operation Center - Design & BuildSecurity Operation Center - Design & Build
Security Operation Center - Design & BuildSameer Paradia
 
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...QuickBase, Inc.
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference ArchitecturesSonatype
 
Introduction to DevSecOps
Introduction to DevSecOpsIntroduction to DevSecOps
Introduction to DevSecOpsSetu Parimi
 
ABN AMRO DevSecOps Journey
ABN AMRO DevSecOps JourneyABN AMRO DevSecOps Journey
ABN AMRO DevSecOps JourneyDerek E. Weeks
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactAraf Karsh Hamid
 
Microsoft Azure Security Overview
Microsoft Azure Security OverviewMicrosoft Azure Security Overview
Microsoft Azure Security OverviewAlert Logic
 
Platform Engineering - a 360 degree view
Platform Engineering - a 360 degree viewPlatform Engineering - a 360 degree view
Platform Engineering - a 360 degree viewGiulio Roggero
 
Cloud transformation and Evolution of Integration Patterns
Cloud transformation and Evolution of Integration PatternsCloud transformation and Evolution of Integration Patterns
Cloud transformation and Evolution of Integration PatternsSrikanth Prathipati
 
DEVSECOPS: Coding DevSecOps journey
DEVSECOPS: Coding DevSecOps journeyDEVSECOPS: Coding DevSecOps journey
DEVSECOPS: Coding DevSecOps journeyJason Suttie
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Chris Richardson
 
DevSecOps: Key Controls to Modern Security Success
DevSecOps: Key Controls to Modern Security SuccessDevSecOps: Key Controls to Modern Security Success
DevSecOps: Key Controls to Modern Security SuccessPuma Security, LLC
 
The Path to Open Banking
The Path to Open BankingThe Path to Open Banking
The Path to Open BankingMuleSoft
 
Shift Left Security
Shift Left SecurityShift Left Security
Shift Left SecurityBATbern
 
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
 

Tendances (20)

Cloud Reference Architecture - Part 1 Foundation
Cloud Reference Architecture - Part 1 FoundationCloud Reference Architecture - Part 1 Foundation
Cloud Reference Architecture - Part 1 Foundation
 
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDPKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
 
DevSecOps reference architectures 2018
DevSecOps reference architectures 2018DevSecOps reference architectures 2018
DevSecOps reference architectures 2018
 
Security Operation Center - Design & Build
Security Operation Center - Design & BuildSecurity Operation Center - Design & Build
Security Operation Center - Design & Build
 
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
Guiding Principles for the Low Code Revolution – Intuit QuickBase EMPOWER2015...
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures
 
Introduction to DevSecOps
Introduction to DevSecOpsIntroduction to DevSecOps
Introduction to DevSecOps
 
ABN AMRO DevSecOps Journey
ABN AMRO DevSecOps JourneyABN AMRO DevSecOps Journey
ABN AMRO DevSecOps Journey
 
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito PactMicroservices Testing Strategies JUnit Cucumber Mockito Pact
Microservices Testing Strategies JUnit Cucumber Mockito Pact
 
Implementing DevSecOps
Implementing DevSecOpsImplementing DevSecOps
Implementing DevSecOps
 
Microsoft Azure Security Overview
Microsoft Azure Security OverviewMicrosoft Azure Security Overview
Microsoft Azure Security Overview
 
Platform Engineering - a 360 degree view
Platform Engineering - a 360 degree viewPlatform Engineering - a 360 degree view
Platform Engineering - a 360 degree view
 
Cloud transformation and Evolution of Integration Patterns
Cloud transformation and Evolution of Integration PatternsCloud transformation and Evolution of Integration Patterns
Cloud transformation and Evolution of Integration Patterns
 
DEVSECOPS: Coding DevSecOps journey
DEVSECOPS: Coding DevSecOps journeyDEVSECOPS: Coding DevSecOps journey
DEVSECOPS: Coding DevSecOps journey
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...
 
DevSecOps: Key Controls to Modern Security Success
DevSecOps: Key Controls to Modern Security SuccessDevSecOps: Key Controls to Modern Security Success
DevSecOps: Key Controls to Modern Security Success
 
The Path to Open Banking
The Path to Open BankingThe Path to Open Banking
The Path to Open Banking
 
Shift Left Security
Shift Left SecurityShift Left Security
Shift Left Security
 
P2PE - PCI DSS
P2PE - PCI DSSP2PE - PCI DSS
P2PE - PCI DSS
 
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...
 

Similaire à JAX 2022 - Loosely or lousily coupled

JCon 2021 - Loosely or lousily coupled
JCon 2021 - Loosely or lousily coupledJCon 2021 - Loosely or lousily coupled
JCon 2021 - 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
 
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
 
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 Your WordPress Site to HTTPS - Getting it right the first time Word...
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...Paul Thompson
 
Handling Failures with Messaging
Handling Failures with MessagingHandling Failures with Messaging
Handling Failures with MessagingElton Stoneman
 
Hacking websockets
Hacking websocketsHacking websockets
Hacking websocketsTomek Cejner
 
2019 - Lost in transaction
2019 - Lost in transaction2019 - Lost in transaction
2019 - Lost in transactionBernd Ruecker
 
Reactive Summit 2020 - How state helps you to stay reactive
Reactive Summit 2020 - How state helps you to stay reactiveReactive Summit 2020 - How state helps you to stay reactive
Reactive Summit 2020 - How state helps you to stay reactiveBernd Ruecker
 
2015 03 06 lmtv wtf http webcast
2015 03 06 lmtv wtf http webcast2015 03 06 lmtv wtf http webcast
2015 03 06 lmtv wtf http webcastTony Fortunato
 
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
 
Microservices: What's Missing - O'Reilly Software Architecture New York
Microservices: What's Missing - O'Reilly Software Architecture New YorkMicroservices: What's Missing - O'Reilly Software Architecture New York
Microservices: What's Missing - O'Reilly Software Architecture New YorkAdrian Cockcroft
 
Best practices of building data streaming API
Best practices of building data streaming APIBest practices of building data streaming API
Best practices of building data streaming APIConstantine Slisenka
 
Microservices Without the Macrocost
Microservices Without the MacrocostMicroservices Without the Macrocost
Microservices Without the Macrocostfuglylogic
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architectureChris Richardson
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonJAXLondon2014
 
Document-Driven transactions
Document-Driven transactionsDocument-Driven transactions
Document-Driven transactionsPedro Teixeira
 

Similaire à JAX 2022 - Loosely or lousily coupled (20)

JCon 2021 - Loosely or lousily coupled
JCon 2021 - Loosely or lousily coupledJCon 2021 - Loosely or lousily coupled
JCon 2021 - 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...
 
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...
 
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 Your WordPress Site to HTTPS - Getting it right the first time Word...
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...
Migrating Your WordPress Site to HTTPS - Getting it right the first time Word...
 
Handling Failures with Messaging
Handling Failures with MessagingHandling Failures with Messaging
Handling Failures with Messaging
 
Hacking websockets
Hacking websocketsHacking websockets
Hacking websockets
 
2019 - Lost in transaction
2019 - Lost in transaction2019 - Lost in transaction
2019 - Lost in transaction
 
Reactive Summit 2020 - How state helps you to stay reactive
Reactive Summit 2020 - How state helps you to stay reactiveReactive Summit 2020 - How state helps you to stay reactive
Reactive Summit 2020 - How state helps you to stay reactive
 
2015 03 06 lmtv wtf http webcast
2015 03 06 lmtv wtf http webcast2015 03 06 lmtv wtf http webcast
2015 03 06 lmtv wtf http webcast
 
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
 
Cqrs api v2
Cqrs api v2Cqrs api v2
Cqrs api v2
 
Microservices: What's Missing - O'Reilly Software Architecture New York
Microservices: What's Missing - O'Reilly Software Architecture New YorkMicroservices: What's Missing - O'Reilly Software Architecture New York
Microservices: What's Missing - O'Reilly Software Architecture New York
 
Oracle OSB Tutorial 2
Oracle OSB Tutorial 2Oracle OSB Tutorial 2
Oracle OSB Tutorial 2
 
Best practices of building data streaming API
Best practices of building data streaming APIBest practices of building data streaming API
Best practices of building data streaming API
 
Microservices Without the Macrocost
Microservices Without the MacrocostMicroservices Without the Macrocost
Microservices Without the Macrocost
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
Document-Driven transactions
Document-Driven transactionsDocument-Driven transactions
Document-Driven transactions
 

Plus de 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
 
Micronaut Webinar 2021 - Process Automation Introduction
Micronaut Webinar 2021 - Process Automation IntroductionMicronaut Webinar 2021 - Process Automation Introduction
Micronaut Webinar 2021 - Process Automation IntroductionBernd Ruecker
 
Automating Processes in Modern Architectures
Automating Processes in Modern ArchitecturesAutomating Processes in Modern Architectures
Automating Processes in Modern ArchitecturesBernd Ruecker
 
OOP 2021 - Leverage the full potential of your hipster architecture
OOP 2021 - Leverage the full potential of your hipster architectureOOP 2021 - Leverage the full potential of your hipster architecture
OOP 2021 - Leverage the full potential of your hipster architectureBernd 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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 

Plus de Bernd Ruecker (19)

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
 
Micronaut Webinar 2021 - Process Automation Introduction
Micronaut Webinar 2021 - Process Automation IntroductionMicronaut Webinar 2021 - Process Automation Introduction
Micronaut Webinar 2021 - Process Automation Introduction
 
Automating Processes in Modern Architectures
Automating Processes in Modern ArchitecturesAutomating Processes in Modern Architectures
Automating Processes in Modern Architectures
 
OOP 2021 - Leverage the full potential of your hipster architecture
OOP 2021 - Leverage the full potential of your hipster architectureOOP 2021 - Leverage the full potential of your hipster architecture
OOP 2021 - Leverage the full potential of your hipster architecture
 
GOTOpia 2020 - Balancing Choreography and Orchestration
GOTOpia 2020 - Balancing Choreography and OrchestrationGOTOpia 2020 - Balancing Choreography and Orchestration
GOTOpia 2020 - Balancing Choreography and Orchestration
 
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
 
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
 
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...
 
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...
 
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
 
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
 
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
 

Dernier

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 

Dernier (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

JAX 2022 - 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 @berndruecker
  • 4. Feedback loop != result Pizza Place You Email Confirmation Email Pizza Delivery Feedback (ACK, confirmation, rejection) Result @berndruecker
  • 5. Synchronous blocking behavior for the result? Bad user experience Does not scale well @berndruecker
  • 7. PUT/order Synchronous results? Pizza Place You Pizza Delivery HTTP 200 The task of Pizza making is long running @berndruecker
  • 8. Only the first communication step is synchronous Pizza Place You PUT/order HTTP 200 Pizza Delivery The task of Pizza making is long running @berndruecker
  • 9. Example: Build a pizza ordering app PUT/order HTTP 200: „Got your order. Should be delievered in roughly 41 minutes.“ Pizza Delivery System @berndruecker
  • 10. Example: Build a pizza ordering app using events PUT/order HTTP 200: „Got your order. Should be delievered in roughly 41 minutes.“ Pizza Delivery System Hey – somebody ordered Hey – Pizza is ready I have a Pizza for you @berndruecker
  • 11. PUT/order HTTP 200: „Got your order. Should be delievered in roughly 41 minutes.“ Pizza Delivery System Hey – somebody ordered Hey – Pizza is ready I have a Pizza for you How do I make sure the Pizza is not forgotten? Example: Build a pizza ordering app using events @berndruecker
  • 12. 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 @berndruecker
  • 13. 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. @berndruecker
  • 14. Events vs. Commands „Pizza Salmon is ready!“ I baked this pizza for Andrea. Please package it immediately and deliver it while it‘s hot! @berndruecker
  • 16. Example: Build a pizza ordering app via orchestration PUT/order HTTP 200: „Got your order. Should be delievered in roughly 41 minutes.“ Pizza Delivery System But how to implement long-running things? @berndruecker
  • 18. An orchestration engine provides long running capabilities Orchestration Engine Scheduler Durable State Process Definitions V1 V2 Orchestration Engine: Is stateful Can wait Can retry Can escalate Can compensate Provides visibility @berndruecker
  • 19. A possible process for the Pizza ordering system @berndruecker
  • 20. You can still work with events Pizza xy was picked up by driver z Driver z handed over Pizza successfully @berndruecker
  • 21. Your code to provide a REST endpoint Developer-friendly orchestration engines @PutMapping("/pizza-order") public ResponseEntity<PizzaOrderResponse pizzaOrderReceived(...) { HashMap<String, Object> variables = new HashMap<String, Object>(); variables.put("orderId", orderId); ProcessInstanceEvent processInstance = camunda.newCreateInstanceCommand() .bpmnProcessId("pizza-order") .latestVersion() .variables(variables) .send().join(); return ResponseEntity.status(HttpStatus.ACCEPTED).build(); } @berndruecker
  • 23. Definition Orchestration = command-driven communication Choreography = event-driven communication @berndruecker
  • 24. Let‘s switch examples: Order fulfillment Checkout Payment Inventory Shipment Order placed Payment received Goods shipped Goods fetched @berndruecker
  • 26. Phil Calcado at QCon NYC 2019
  • 30. 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
  • 32. Sam Newman: Building Microservices @berndruecker
  • 33. Mix orchestration and choreography Orchestration Orchestration Orchestration Choreography @berndruecker
  • 34. 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
  • 35. 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! @berndruecker
  • 37. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid @berndruecker
  • 38. Types of Coupling Type of coupling Description Example Recommendation Implementation Coupling Service knows internals of other services Joined database Avoid @berndruecker
  • 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 @berndruecker
  • 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 @berndruecker
  • 41. 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 @berndruecker
  • 42. 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 @berndruecker
  • 43. 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 @berndruecker
  • 44. 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 @berndruecker
  • 46. 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) … @berndruecker
  • 47. Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license.
  • 48. Circuit Breaker Webshop You PUT/order Address Check Payment from https://martinfowler.com/bliki/CircuitBreaker.html @berndruecker
  • 49. 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 @berndruecker
  • 52. 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) …
  • 53. Summary • 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! @berndruecker
  • 54. Want to learn more… https://ProcessAutomationBook.com/