SlideShare a Scribd company logo
@berndruecker
Live coding some
(microservice)
integration patterns
Photo by Tookapic, available under Creative Commons CC0 1.0 license.
„There was an error
while sending your
boarding pass“
Check-in
Web-UI
Me
Current situation
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Current situation
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Current situation
Some
Service
Some
Service
Some
Service
Some
Service
Some
Service
Some
Service
Some
Service
Failure will happen.
Accept it!
But keep it local!
Be resilient.
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Current situation – the bad part
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Current situation – the bad part
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Current situation – the bad part
Stateful
Retry
JCon Live 2023 - Lice coding some integration problems
We are having some technical
difficulties and cannot present you
your boarding pass right away.
But we do actively retry ourselves, so
lean back, relax and we will send it
on time.
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Possible situation – much better!
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Possible situation – much better!
Stateful
Retry
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Stateful
Retry
Possible situation – much better!
The failure
never leaves
this scope!
Resulting challenges
Persistent state Asynchronous
communication
We will talk about why this is
a good thing in a minute!
Solve technical challenges
(operating, scheduling,
versioning, visibility,
scalability, …) without
accidential complexity
Change the user experience
Warning:
Contains Opinion
bernd.ruecker@camunda.com
@berndruecker
http://berndruecker.io/
Bernd Ruecker
Co-founder and
Chief Technologist of
Camunda
Check-In
A workflow engine is a durable state machine
Barcode
REST
Stateful
retry
„The customer wants a synchronous response“
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
„Eh – no!“
Simple example for live coding
Credit
Card
Payment
REST
Live hacking
https://github.com/berndruecker/flowing-retail
Payment
Now you have a state machine!
Credit
Card
REST
Do you have to program
all integration
logic?
26
JCon Live 2023 - Lice coding some integration problems
@berndruecker
Connectors Modeling
Experience
Low-code
Forms
Human Task
Orchestration
CAMUNDA
Low-code Pro-code
Process Orchestration
Kopfhörer
@berndruecker
@OutboundConnector(
type = "io.camunda:http-json:1", inputVariables = {"method", ...},
)
public class HttpJsonFunction implements OutboundConnectorFunction {
public Object execute(final OutboundConnectorContext context) throws Exception {
final var json =;
final var request = createRequest(context);
return httpService.executeConnectorRequest(request);
}
} {
"name": "REST Connector",
"properties": [
{
"type": "Hidden",
"value": "io.camunda:http-json:1",
"binding": {
"type": "zeebe:taskDefinition:type"
}
},
{
"id": "method",
"label": "REST Method",
"group": "endpoint",
"type": "Dropdown",
"value": "get",
"choices": [
https://github.com/camunda/connectors-bundle/tree/main/connectors/http-json
@berndruecker
Runs anywhere
Multiple connector runtime options,
including SaaS, self-managed, co-
located, and local installations
@berndruecker
JCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problems
Criticality,
value,
complexity…
Use Cases
@berndruecker
or
enable
@berndruecker
Criticality,
value,
complexity…
Use Cases
@berndruecker
Payment
But back to integration logic…
Credit
Card
REST
has to implement
Retry
has to implement
Idempotency
Client Service Provider
Make every service idempotent!
Credit
Card
Payment
Charge Credit Card
cardNumber
amount
Charge Credit Card
cardNumber
amount
transactionId
Not idempotent
Idempotent
charge
JCon Live 2023 - Lice coding some integration problems
JCon Live 2023 - Lice coding some integration problems
Don‘t worry, it will happen safely –
even if you loose connection.
Feel free to reload this page any time!
Distributed systems introduce complexity you have to tackle!
Credit
Card
Payment
REST
Distributed
systems
It is impossible to
differentiate certain
failure scenarios.
Independant of
communication style!
Service
Provider
Client
Distributed systems introduce complexity you have to tackle!
Credit
Card
Payment
REST
Distributed systems introduce complexity you have to tackle!
Credit
Card
Payment
REST
Cancel
charge
retrievePayment
HTTP 200 OK
HTTP 202 ACCEPTED
Payment
Happy case: Synchronous response
Otherwise: asynchronous
Embrace asynchronicity
Live hacking
https://github.com/berndruecker/flowing-retail/blob/master/rest/java/payment/
src/main/java/io/flowing/retail/payment/rest/PaymentRestHacksControllerV4.java
Long running capabilities
are essential to design
good service boundaries
(= a good architecture)
@berndruecker
Example
Order
Fulfillment
Payment
Retrieve
Payment
@berndruecker
Example
Order
Fulfillment
Payment
Credit
Card
Retrieve
Payment
@berndruecker
Example
Order
Fulfillment
Payment
Credit
Card
Retrieve
Payment
Rejected
@berndruecker
Example
Order
Fulfillment
Payment
If the credit
card was
rejected, the
customer can
provide new
details
Credit
Card
Retrieve
Payment
Rejected
Rejected
@berndruecker
Example
Order
Fulfillment
Payment
If the credit
card was
rejected, the
customer can
provide new
details
Credit
Card
Retrieve
Payment
Rejected
Rejected
@berndruecker
A few
smart god services
tell
anemic CRUD services
what to do
Sam Newmann
Payment
failed
Who is responsible to deal with problems?
Order
Fulfillment
Payment
If the credit
card was
rejected, the
customer can
provide new
details
Credit
Card
Retrieve
Payment
Rejected
Payment
received
@berndruecker
Payment
failed
(Potentially) long running services
Order
Fulfillment
Payment
Credit
Card
Retrieve
Payment
Rejected
Payment
received
@berndruecker
Long running capabilities
are essential to design
good service boundaries
(= a good architecture)
@berndruecker
You need to redesign
your customer journeys
to leverage your
hipster architecture!
Shutterstock
Did you just say “hipster”?
Let‘s talk about messaging.
Who uses a message bus?
Who has no problems
operating a message bus?
Dead messages | No context | Inaccesible payload | Hard to redeliver |
Home-grown message hospitals | …
Using messaging
Credit
Card
Request
Dead letter queue
(DLQ)
Using messaging
Credit
Card
Request
Dead letter queue
(DLQ)
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
Did you just say “hipster”?
Order
Placed
Payment
Received
Goods
Shipped
Notification
Event-driven & Reactive
@berndruecker
Checkout
Payment
Inventory
Shipment
Peer-to-peer event chains
Checkout
Payment
Inventory
Shipment
Order
placed
Payment
received
Goods
shipped
Goods
fetched
@berndruecker
Peer-to-peer 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
„What the hell just happened?“
@berndruecker
What we wanted
Photo by Lijian Zhang, available under Creative Commons SA 2.0 License and Pedobear19 / CC BY-SA 4.0
The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
losing sight of that larger-scale flow, and
thus set yourself up for trouble in future
years.
https://martinfowler.com/articles/201701-event-driven.html
The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
losing sight of that larger-scale flow, and
thus set yourself up for trouble in future
years.
https://martinfowler.com/articles/201701-event-driven.html
The danger is that it's very easy to make
nicely decoupled systems with event
notification, without realizing that you're
losing sight of that larger-scale flow, and
thus set yourself up for trouble in future
years.
https://martinfowler.com/articles/201701-event-driven.html
Extract Orchestration logic
Orchestration logic live inside service boundaries
Event-driven example
Inventory
Payment
Order Shipping
Checkout Monitor
https://github.com/berndruecker/flowing-retail/
Human
Tasks
H2 H2
Code
https://github.com/berndruecker/flowing-retail
Summary
Thank you!

More Related Content

PDF
Moving beyond request reply - designing smarter APIs
PDF
Jfokus 2018: Lost in transaction - Strategies to deal with (in-)consistency ...
PDF
Microservies Vienna - Lost in transactions
PDF
Communication between (micro-)services - Bernd Rücker - Codemotion Amsterdam ...
PDF
JAX 2017 talk: Orchestration of microservices
PDF
Felix Müller: Microservices Integration: Challenges and Solutions - Camunda D...
PDF
OSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall Deehan
PDF
Long running processes in DDD
Moving beyond request reply - designing smarter APIs
Jfokus 2018: Lost in transaction - Strategies to deal with (in-)consistency ...
Microservies Vienna - Lost in transactions
Communication between (micro-)services - Bernd Rücker - Codemotion Amsterdam ...
JAX 2017 talk: Orchestration of microservices
Felix Müller: Microservices Integration: Challenges and Solutions - Camunda D...
OSDC 2019 | The Benefits of Orchestration in Distributed Systems by Niall Deehan
Long running processes in DDD

Similar to JCon Live 2023 - Lice coding some integration problems (20)

PDF
Goto meetup Stockholm - Let your microservices flow
PDF
O'Reilly SA NYC 2018: Complex event flows in distributed systems
PDF
MuCon London 2017: Break your event chains
PDF
Automating Processes in Modern Architectures
PDF
Serverless Design Patterns (London Dev Community)
KEY
Modular Web Applications With Netzke
PDF
Serveless design patterns
PDF
vidhi talk.pdf
PDF
Crossroads of Asynchrony and Graceful Degradation
PDF
Bernd Ruecker - 3 Common Pitfalls in Microservice Integration - Codemotion Be...
PDF
Bernd Ruecker - 3 Common Pitfalls in Microservice Integration - Codemotion Be...
PDF
WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...
PDF
Serverless Design Patterns
PDF
Camunda Con 2019 Keynote - I want my process back #microservices #serverless
PDF
I want my process back! #microservices #serverless
PDF
QCon London 2018: 3 common pitfalls in microservice integration and how to av...
PDF
Micro-service architectures with Gilmour
PDF
Comet from JavaOne 2008
PDF
Catching Wire; An introduction to CBWire 4
PDF
Complex event flows in distributed systems
Goto meetup Stockholm - Let your microservices flow
O'Reilly SA NYC 2018: Complex event flows in distributed systems
MuCon London 2017: Break your event chains
Automating Processes in Modern Architectures
Serverless Design Patterns (London Dev Community)
Modular Web Applications With Netzke
Serveless design patterns
vidhi talk.pdf
Crossroads of Asynchrony and Graceful Degradation
Bernd Ruecker - 3 Common Pitfalls in Microservice Integration - Codemotion Be...
Bernd Ruecker - 3 Common Pitfalls in Microservice Integration - Codemotion Be...
WeAreDevelopers Live 2024 - Mastering long-running processes in modern archit...
Serverless Design Patterns
Camunda Con 2019 Keynote - I want my process back #microservices #serverless
I want my process back! #microservices #serverless
QCon London 2018: 3 common pitfalls in microservice integration and how to av...
Micro-service architectures with Gilmour
Comet from JavaOne 2008
Catching Wire; An introduction to CBWire 4
Complex event flows in distributed systems
Ad

More from Bernd Ruecker (20)

PDF
QCon London: Mastering long-running processes in modern architectures
PDF
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
PDF
JFall - Process Oriented Integration
PDF
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
PDF
JavaLand 2023 - Process Oriented Integration
PDF
CraftConf: Surviving the hyperautomation low code bubbl
PDF
Mastering Data for Higher Business Impact - at Commerzbank Innovation Summit
PDF
Camunda Chapter Hamburg - Surviving the hyperautomation low code bubble
PDF
Loosely or lousily coupled - Understanding communication patterns in microser...
PDF
CamundaCon 2022 Keynote: The Process Orchestration Journey
PDF
JAX 2022 - Loosely or lousily coupled
PDF
JFS 2021 - The Process Automation Map
PDF
JCon 2021 - Loosely or lousily coupled
PDF
CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...
PDF
Kafka Summit 2021 - Apache Kafka meets workflow engines
PDF
Process Automation Forum April 2021 - Practical Process Automation
PDF
Micronaut Webinar 2021 - Process Automation Introduction
PDF
Webinar "Communication Between Loosely Coupled Microservices"
PDF
OOP 2021 - Leverage the full potential of your hipster architecture
PDF
GOTOpia 2020 - Balancing Choreography and Orchestration
QCon London: Mastering long-running processes in modern architectures
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
JFall - Process Oriented Integration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
JavaLand 2023 - Process Oriented Integration
CraftConf: Surviving the hyperautomation low code bubbl
Mastering Data for Higher Business Impact - at Commerzbank Innovation Summit
Camunda Chapter Hamburg - Surviving the hyperautomation low code bubble
Loosely or lousily coupled - Understanding communication patterns in microser...
CamundaCon 2022 Keynote: The Process Orchestration Journey
JAX 2022 - Loosely or lousily coupled
JFS 2021 - The Process Automation Map
JCon 2021 - Loosely or lousily coupled
CamundaCon 2021 Keynote :From Human Workflow to High-Throughput Process Autom...
Kafka Summit 2021 - Apache Kafka meets workflow engines
Process Automation Forum April 2021 - Practical Process Automation
Micronaut Webinar 2021 - Process Automation Introduction
Webinar "Communication Between Loosely Coupled Microservices"
OOP 2021 - Leverage the full potential of your hipster architecture
GOTOpia 2020 - Balancing Choreography and Orchestration
Ad

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
KodekX | Application Modernization Development
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
Teaching material agriculture food technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MIND Revenue Release Quarter 2 2025 Press Release
KodekX | Application Modernization Development
Reach Out and Touch Someone: Haptics and Empathic Computing
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Teaching material agriculture food technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
Understanding_Digital_Forensics_Presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

JCon Live 2023 - Lice coding some integration problems