3 common pitfalls in microservice integration and how to avoid … · circuit breaker photo by...
TRANSCRIPT
![Page 1: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/1.jpg)
3 Common Pitfalls inMicroservice Integration andHow to Avoid Them
@berndruecker
![Page 2: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/2.jpg)
Distributed systems
![Page 3: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/3.jpg)
![Page 4: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/4.jpg)
https://www.infoworld.com/article/3254777/application-development/3-common-pitfalls-of-microservices-integrationand-how-to-avoid-them.html
![Page 5: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/5.jpg)
SomeService
SomeService
SomeService
SomeService
SomeService
SomeService
SomeService
Failure will happen. Accept it!
But keep it local! Be resilient.
![Page 6: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/6.jpg)
Let‘s start with a simple example
CreditCard
Payment
REST
![Page 7: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/7.jpg)
Live hacking
https://github.com/berndruecker/flowing-retail
![Page 8: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/8.jpg)
Circuit Breaker
Photo by CITYEDV, available under Creative Commons CC0 1.0 license.
![Page 9: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/9.jpg)
Fail fastis important
![Page 10: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/10.jpg)
Fail fastis important
but not enough!
![Page 11: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/11.jpg)
Photo by Tookapic, available under Creative Commons CC0 1.0 license.
![Page 12: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/12.jpg)
„There was an errorwhile sending your
boarding pass“
![Page 13: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/13.jpg)
Check-in
Web-UI
Me
Current situation
![Page 14: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/14.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Current situation
![Page 15: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/15.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Current situation
![Page 16: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/16.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Current situation
Circuit breaker
![Page 17: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/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 and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/18.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Current situation – the bad part
![Page 19: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/19.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Current situation – the bad part
StatefulRetry
![Page 20: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/20.jpg)
![Page 21: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/21.jpg)
We are having some technicaldifficulties 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 22: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/22.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Possible situation – much better!
![Page 23: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/23.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Possible situation – much better!
StatefulRetry
![Page 24: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/24.jpg)
Persist thing(Entity, Document, Actor, …)
State machine orworkflow engine
Typicalconcerns
DIY = effort, accidentalcomplexity
Complex, proprietary, heavyweight, slow,
don‘t scale,developer adverse
Scheduling, Versioning, operating, visibility, scalability, …
Handling State
![Page 25: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/25.jpg)
Warning:Contains Opinion
![Page 26: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/26.jpg)
Berlin, Germany
http://berndruecker.io/[email protected]@berndruecker
Bernd RueckerCo-founder and Chief Technologist ofCamunda
![Page 27: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/27.jpg)
Workflow engines, state machines
It is
relevantin modern
architectures
![Page 28: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/28.jpg)
CADENCE
Silicon valleyhas recognized
Workflow engines, state machines
![Page 29: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/29.jpg)
CADENCEWorkflow engines, state machines
![Page 30: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/30.jpg)
CADENCE
also at scaleWorkflow engines, state machines
![Page 31: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/31.jpg)
CADENCE
for todays demo
Workflow engines, state machines
![Page 32: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/32.jpg)
Live hacking
https://github.com/berndruecker/flowing-retail
![Page 33: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/33.jpg)
Payment
Now you have a state machine!
CreditCardREST
![Page 34: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/34.jpg)
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
Service A Service B
WF-Engine WF-Engine
Spring Boot Spring Boot
![Page 35: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/35.jpg)
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
Infrastructure
Service A Service B
WF-Engine WF-Engine
Wildfly WildFly
WARWAR
![Page 36: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/36.jpg)
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
Service A
WF-Engine
C#Client
Service B
WF-Engine
Node.jsClient
![Page 37: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/37.jpg)
has to implement
Retryhas to implement
Idempotency
Client Service Provider
![Page 38: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/38.jpg)
![Page 39: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/39.jpg)
![Page 40: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/40.jpg)
Don‘t worry, it will happen safely –even if you loose connection.
Feel free to reload this page any time!
![Page 41: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/41.jpg)
Photo by pixabay, available under Creative Commons CC0 1.0 license.
![Page 42: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/42.jpg)
Requirement: Idempotency of services!
Photo by pixabay, available under Creative Commons CC0 1.0 license.
![Page 43: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/43.jpg)
Requirement: Idempotency of services!
Photo by Chr.Späth, available under Public Domain.
![Page 44: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/44.jpg)
Make every service idempotent!
CreditCard
Payment
Charge Credit CardcardNumber
amount
Charge Credit CardcardNumber
amounttransactionId
Not idempotent
Idempotent
charge
![Page 45: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/45.jpg)
Distributed systems introduce complexity you have to tackle!
CreditCard
PaymentREST
![Page 46: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/46.jpg)
Distributedsystems
![Page 47: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/47.jpg)
It is impossible todifferentiate certain
failure scenarios.
Independant ofcommunication style!
Service Provider
Client
![Page 48: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/48.jpg)
Distributed systems introduce complexity you have to tackle!
CreditCard
PaymentREST
![Page 49: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/49.jpg)
Distributed systems introduce complexity you have to tackle!
CreditCard
PaymentREST
Cancel
charge
![Page 50: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/50.jpg)
Executableand mature Easy to
understand*
ISO Standardwidespread
*(for Biz, Dev, and Ops)
BPMNBusiness Process
Model and Notation
![Page 51: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/51.jpg)
ProperOperations
Visibility + Context
![Page 52: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/52.jpg)
Challenges of asynchronicity
![Page 53: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/53.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Asynchronous communication
You need tomonitor timeouts
![Page 54: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/54.jpg)
Check-in
Barcode Generator
Web-UI
Me
Output Mgmt
Remember…
The failurenever leavesthis scope!
![Page 55: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/55.jpg)
Workflow…
![Page 56: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/56.jpg)
Workflow…
![Page 57: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/57.jpg)
Who uses a message bus?
![Page 58: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/58.jpg)
Who has no problemsoperating a message bus?
Dead messages | No context | Inaccesible payload | Hard to redeliver | Home-grown message hospitals | …
![Page 59: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/59.jpg)
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 60: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/60.jpg)
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 61: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/61.jpg)
Manigfold architecture options
https://blog.bernd-ruecker.com/architecture-options-to-run-a-workflow-engine-6c2419902d91
![Page 62: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/62.jpg)
DistributedTransactionsDistributed
Transactions
![Page 63: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/63.jpg)
Transactions…
Do A
Do B
+ All ornothing
@berndruecker
![Page 64: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/64.jpg)
Distributedsystems
![Page 65: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/65.jpg)
Pat Helland
Grown-Ups Don’t Use Distributed Transactions
“
Distributed Systems Guru Worked at Amazon, Microsoft & Salesforce
![Page 66: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/66.jpg)
Distributed transactions using compensation *
Compensation
![Page 67: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/67.jpg)
„Lost in transaction“
https://vimeo.com/289508460
@berndrueckerhttps://berndruecker.io/lost-in-transaction/
![Page 68: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/68.jpg)
has to implement
Timeout, Retry, Compensation
has to offer
Compensationhas to implement
Idempotency
Client Service Provider
![Page 69: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/69.jpg)
has to implement
Timeout, Retry, Compensation
has to offer
Compensationhas to implement
Idempotency
Client Service ProviderDon‘t forgetabout state
![Page 70: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/70.jpg)
Event-driven example also available
InventoryPaymentOrder ShippingCheckout Monitor
https://github.com/berndruecker/flowing-retail/
Human Tasks
H2 H2
![Page 71: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/71.jpg)
# Be aware of complexity of distributed systems# Know strategies and tools to handle ite.g. Circuit breaker (Hystrix > Resilience4J)
Workflow engine for stateful retry, waiting, timeout and compensation (Camunda)
![Page 72: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/72.jpg)
Thank you!
![Page 73: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/73.jpg)
![Page 74: 3 Common Pitfalls in Microservice Integration and How to Avoid … · Circuit Breaker Photo by CITYEDV, available under Creative Commons CC0 1.0 license](https://reader034.vdocument.in/reader034/viewer/2022042303/5ece2db7ee11c142a623de15/html5/thumbnails/74.jpg)
[email protected]@berndruecker
https://berndruecker.io
https://medium.com/berndruecker
https://github.com/berndruecker
https://www.infoq.com/articles/events-workflow-automation
Contact:
Slides:
Blog:
Code:
https://www.infoworld.com/article/3254777/application-development/3-common-pitfalls-of-microservices-integrationand-how-to-avoid-them.html
https://thenewstack.io/5-workflow-automation-use-cases-you-might-not-have-considered/