35
Neue Zeiten verlangen nach neuen Paradigmen [email protected] Co-founder and developer advocate

Neue zeiten verlangen nach neuen Paradigmen - Bernd Rücker

Embed Size (px)

Citation preview

Neue Zeiten verlangen nach neuen Paradigmen

[email protected]

Co-founder and developer advocate

Neue Zeiten verlangen nach neuen Paradigmen

…und nach englischen Folien…

Software is eating the world.

Marc Andreessen, Entrepreneur & Investor

ApplicationsPlatforms & collaborating

systems

Do you knowGame Neverending?

But youprobably know

flickr?

to pivot | pivoted, pivoted | [Tech]

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

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

Distributed systems

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

BPMN can help

BPMN can help

BPMN can help

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

The case for orchestration

The end-to-end order process?

End-to-end processes cross microservice boundaries

Order

InventoryPayment

For execution: respect boundaries and distribute ownership

Pa

ym

en

t

Processes are “implementation detail” of servicesO

rde

r

Distributed orchestration

And that‘sgood?

End-to-end processes as 1st class citizen

InventoryPaymentOrder ShippingCheckout

Core Capabilities

Support Capabilities

Business Capabilities

Finally!

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