Neue Zeiten verlangen nach neuen Paradigmen
Co-founder and developer advocate
If you are not embarrassed by the first version of your product, you’ve launched too late.
Reid Hoffman, Co-Founder LinkedIn (and others)
„
Microservices: It is about speed and agility at scale
• Small components withclear responsibilities
• Isolation
• Autonomy
• Replaceability
• Flexibility
• Experimentation
• Resilience
• Individual scalability
DevOps, polyglott, asynchronous, reactive, message- / event-driven
Example
InventoryPayment ShippingCheckout
Bus
OrderPlaced
Does not know
recepient
Does not know
sender
Event: Fact thathappened in the past,
Immutable fact, 0..n recepients
OrderPlaced
It is not SOA
InventoryPayment ShippingCheckout
Bus
OrderPlaced
Does not know
recepient
Does not know
sender
Event: Fact thathappened in the past,
Immutable fact, 0..n recepients
OrderPlaced
Smart endpoints and dumb pipes
Service A
Challenge: Asynchronous collaboration
Send message
to B
Service B
Wait forresponse
Timeout handling
Message correlation & deduplication
State handling
Parallelism & merging
Challenge: Distributed transactions
1. bookhotel
2. bookcar
3. bookflight
6. cancelhotel
5. cancel
car
4. In case offailure triggercompensations
booktrip
Service A
Car Service Hotel Service Flight Service ACID-Transactions only local in theservice contexts
Distributed transaction via Saga pattern usingcompensatingactivities
Toolbox for distributed systems
Handling of time & timeouts
Retry
Versioning
Compensation & Saga
Message correlation & deduplication
Performance & scalability
The microservice community
*Picture randomly taken from http://wareflo.com/2016/11/from-apis-to-microservices-workflow-orchestration-and-choreography-across-healthcare-organizations/. Not connected to statements on slide.
Orchestration…
…introduces single point offailure…
…leads to god services…
…leads to tight coupling…
„
Example
InventoryPayment ShippingCheckout
Bus
OrderPlaced
Decentral datamanagement
Event: Fact thathappened in the past,
Immutable fact, 0..n recepients
Customer statuschanged
End-to-end processes using eventflows?
InventoryPayment ShippingShop
Order placed
Payment received
Goodsfetched
Goodsshipped
Commanding is important
InventoryPaymentOrder ShippingShop
Bus
OrderPlaced
Event: Fact thathappened in the past,
Immutable fact, 0..n recepients
OrderPlaced
Command: Intend, 1 recipient.
Coupling the otherway round
RetrievePayment
FetchGoods
ShipGoods
End-to-end processes as 1st class citizen
InventoryPaymentOrder ShippingCheckout
Core Capabilities
Support Capabilities
Business Capabilities
OrderOrder
OrderOrder
Architecture
Order
Engine A
Payment
Engine B
MonitoringHuman Task Management
Coarse grained central
monitoring
Fine grained monitoring &
operations (per context)
DevOps
TecOps Biz
Ops
Central
Code:https://github.com/berndruecker
Slides:https://bernd-ruecker.com