3 common pitfalls in microservice integration (bonus : and ... · 3 common pitfalls in microservice...
TRANSCRIPT
![Page 1: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/1.jpg)
3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker
Patricio Zambrano
Technical Consultant, Camunda Inc.
![Page 2: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/2.jpg)
2
Microservices Agenda
• Introduction
• 3 Common Challenges and How to Avoid Them
• Conclusion
![Page 3: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/3.jpg)
Raise your hand
• REST
• Microservices
• Java
![Page 4: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/4.jpg)
Distributed systems
![Page 5: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/5.jpg)
Distributed systems
Challenges of
asynchronicity
Distributed
Transactions
Communication is
complex
![Page 6: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/6.jpg)
7
Some Microservices….
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.
![Page 7: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/7.jpg)
Let‘s start with a simple example
Credit
CardPayment
REST
Payment Requestor Application
What happens if the Credit Card Service is Super Slow?
![Page 8: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/8.jpg)
Live hacking
https://github.com/flowing/flowing-retail/blob/master/payment-
rest/src/main/java/io/flowing/retail/payment/port/resthacks/PaymentRestHacksControllerV2.java
![Page 9: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/9.jpg)
Circuit
Breaker
Photo by CITYEDV, available under Creative Commons CC0 1.0 license.
![Page 10: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/10.jpg)
Failing Fast is important….
..but not enough
![Page 11: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/11.jpg)
Photo by https://www.archdaily.com/560641/liverpool-insurgentes-department-store-rojkind-arquitectos
![Page 12: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/12.jpg)
![Page 13: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/13.jpg)
Check-in
Web-UI
You
Current situation
![Page 14: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/14.jpg)
Check-in
Barcode
Generator
Web-UI
You
Output
Mgmt
Current situation
![Page 15: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/15.jpg)
Current situation
Check-in
Barcode
Generator
Web-UI
You
Output
Mgmt
Circuit breaker
![Page 16: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/16.jpg)
Another screenshot
![Page 17: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/17.jpg)
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Current situation – the bad part
![Page 18: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/18.jpg)
Current situation – the bad part
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
![Page 19: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/19.jpg)
Current situation – the bad part
Check-in
Barcode
Generator
Web-UI
Me
Output
MgmtStateful
Retry
![Page 20: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/20.jpg)
Another Example
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.
![Page 21: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/21.jpg)
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Possible Solution – Much better?
Stateful
Retry
The failure
never leaves
this scope!
![Page 22: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/22.jpg)
Persist thing
(Entity, Document, Actor,
…)
State machine
or workflow
engine
Typical
concerns
DIY = effort,
accidental
complexity
Complex, proprietary,
heavyweight, slow,
don‘t scale,
developer adverseScheduling, Versioning,
operating, visibility, scalability,
…
Handling State
Typical
concerns
![Page 23: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/23.jpg)
Current Players in the State Machine Market
• AWS Step Function
• UBER Cadence
• Netflix Conductor
• Camunda
• Zeebe
• jBPM
• Activiti
![Page 24: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/24.jpg)
Performance: Zeebe vs. Kafka
Vs. Apache Kafka
![Page 25: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/25.jpg)
Current Players in the State Machine Market
• AWS Step Function
• UBER Cadence
• Netflix Conductor
• Camunda (Raise of hand?)
• Zeebe
• jBPM
• Activiti
![Page 26: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/26.jpg)
In the previous demo….
Credit
CardPayment
REST
Payment Requestor Application
What if I want my Payment to be Asynchronous and
Retry itself when my Credit Card Service Slow?
![Page 27: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/27.jpg)
Live hacking
https://github.com/flowing/flowing-retail/blob/master/payment-
rest/src/main/java/io/flowing/retail/payment/port/resthacks/PaymentRestHacksControllerV3.java
![Page 28: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/28.jpg)
Demo
Credit
CardPayment
REST
Payment Requestor Application
What if I want a Synchronous response when
everything is fast?
![Page 29: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/29.jpg)
Live hacking
https://github.com/flowing/flowing-retail/blob/master/payment-
rest/src/main/java/io/flowing/retail/payment/port/resthacks/PaymentRestHacksControllerV3.java
![Page 30: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/30.jpg)
Payment
Now you have a state machine!
Credit
CardREST
![Page 31: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/31.jpg)
has to implement
Retryhas to implement
Idempotency
Client Service
Provider
Most important factors to consider in distributed systems (so far.. )
![Page 32: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/32.jpg)
We are processing your payment.
Do not leave this page.
And for god sake – do not reload!
It is a business problem anyway!
Bad Example..
![Page 33: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/33.jpg)
We are processing your payment.
Do not leave this page.
And for god sake – do not reload!
It is a businessproblem anyway!
We are currently processing your
request. Don‘t worry, it will happen
safely –
even if you loose connection.
Feel free to reload this page any
time!
Better…
![Page 34: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/34.jpg)
It is impossible todifferentiate certain
failurescenarios(and
Code Exceptions).
Independant ofcommunication style!
Service
Provider
Client
![Page 35: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/35.jpg)
Distributed systems introduce complexity you have to tackle!
Credit
CardPayment
REST
![Page 36: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/36.jpg)
Distributed systems introduce complexity you have to tackle!
Credit
CardPayment
REST
Do it reliably
![Page 37: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/37.jpg)
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Workflows live within service boundaries
![Page 38: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/38.jpg)
Different Architecture Options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 39: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/39.jpg)
Different architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 40: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/40.jpg)
Different architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 41: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/41.jpg)
Different architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 42: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/42.jpg)
generateBoardingPass
HTTP 200 OK
HTTP 202 ACCEPTED
Check-in
A synchronous response is possible in
the happy case, otherwise it is switched
to asynchronous processing.
First Sync then Async
![Page 43: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/43.jpg)
The customer wants a synchronous response…
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
!Eh – no!
![Page 44: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/44.jpg)
Synchronous communicationis the crystal meth of
distributed programming
Todd Montgomery and Martin Thompson in “How did we end up here” at GOTO Chicago 2015
![Page 45: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/45.jpg)
Challenges of
asynchronicity
![Page 46: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/46.jpg)
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Asynchronous communication
You need to
monitor
timeouts
![Page 47: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/47.jpg)
Check-in
Barcode
Generator
Web-UI
Me
Output
Mgmt
Remember…
The failure
never
leaves
this
scope!
![Page 48: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/48.jpg)
Workflow…
![Page 49: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/49.jpg)
Workflow…
![Page 50: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/50.jpg)
has to implement
Timeout, Retryhas to implement
Idempotency
Client Service
Provider
![Page 51: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/51.jpg)
Who uses a message bus?
![Page 52: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/52.jpg)
Who has no problemsoperating a message bus?
Dead messages | No context | Inaccesible payload | Hard to redeliver
|
Home-grown message hospitals | …
![Page 53: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/53.jpg)
Other Architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 54: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/54.jpg)
Other Architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 55: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/55.jpg)
Other Architecture Options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 56: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/56.jpg)
Distributed
Transactions
Distributed
Transactions
![Page 57: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/57.jpg)
Distributedsystems
• ACID Transactions
• Scalability
• Troubleshooting TM
• Still Required!!
![Page 58: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/58.jpg)
Distributed transactions using compensation *
Compensation
![Page 59: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/59.jpg)
Eventual consistency
Temporarily
inconsistent
state
But only
temporarily!
![Page 60: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/60.jpg)
Demo Time
Payment Requestor Application
Node.js App
![Page 61: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/61.jpg)
Live hacking
https://github.com/flowing/flowing-retail/blob/master/payment-
rest/src/main/java/io/flowing/retail/payment/port/resthacks/PaymentRestHacksControllerV6.java
![Page 62: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/62.jpg)
has to implement
Timeout, Retry,
Compensation
has to offer
Compensationhas to implement
Idempotency
Client Service
Provider
![Page 63: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/63.jpg)
has to implement
Timeout, Retry,
Compensation
has to offer
Compensationhas to implement
Idempotency
Client Service
ProviderDon‘t forget
about state
![Page 64: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/64.jpg)
Before mapping processes explicitly
with BPMN and DMN, the truth was
buried in the code and nobody knew
what was going on.
Jimmy Floyd, 24 Hour Fitnesse
![Page 65: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/65.jpg)
Event-driven example also available
InventoryPaymentOrder ShippingCheckout Monitor
https://github.com/flowing/flowing-retail/
Kafka
Human
Tasks
H2 H2
https://github.com/flowing/flowing-
retail/tree/master/zeebe
![Page 66: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/66.jpg)
Workflows live inside service boundaries
Ka
fka
or
Ze
eb
e
![Page 67: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/67.jpg)
Sales-Order & Order-Fulfillment
via Camunda
for every order worldwide
(Q2 2017: 22,2 Mio)
![Page 68: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/68.jpg)
Camunda Value Technical Use Cases Business Process
Examples
Improving development,
operations and visibility
of automated workflows
and decisions.
Straight-Through
Processing
Microservice Orchestration
Human Workflow
Management
Business Rule Automation
E-Commerce: Order
Execution
Finance: Stock Trading
Insurance: Claim
Settlement
Telco: OSS/BSS
……..
Some of the Workflow Engine Use Cases and… what we talked about
72
![Page 69: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/69.jpg)
# Be aware of complexity of distributed systems# Know strategies and tools to handle ite.g. Circuit breaker (Hystrix)
Workflow engine for stateful retry, waiting, timeout and compensation (Camunda)
![Page 70: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/70.jpg)
https://www.infoworld.com/article/3254777/application-development/
3-common-pitfalls-of-microservices-integrationand-how-to-avoid-them.html
![Page 71: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/71.jpg)
Where to learn more
#6
![Page 72: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/72.jpg)
Contact Us
• Andreas Stange | International Sales
• +49-172-862-2730 | Berlin
• Mauricio Bitencourt | Customer Delivery & Success
• +55 51 984.087.798 | Sao Paulo
![Page 73: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/73.jpg)
Q&A ?
![Page 74: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/74.jpg)
Camunda Ecosystem
Model > Execute > Improve
![Page 75: 3 Common Pitfalls in Microservice Integration (Bonus : And ... · 3 Common Pitfalls in Microservice Integration (Bonus : And how to avoid them ) credit to Bernd Ruecker Patricio Zambrano](https://reader034.vdocuments.us/reader034/viewer/2022042220/5ec63557efbf28749963b012/html5/thumbnails/75.jpg)
What is ZEEBE?
• Zeebe scales orchestration of workers and microservices using visual workflows. Zeebe is horizontally scalable and fault tolerant so that you can reliably process all your transactions as they happen.