27
With an open source workflow engine Decoupling your Spring boot Microservices

Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

With an open source workflow engine

Decoupling your Spring boot Microservices

Page 2: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

With an open source workflow engine

Orchestrating Spring Boot Microservices(In order to get coffee quickly)

Page 3: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

Niall Deehan Grifty Winters

Page 4: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

4

A Classic Distributed System

4

Service One Service TwoRest

Response

Page 5: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

5

A Classic Distributed System

5

Service One Service Two Service ThreeRest

Response

Rest

Response

Page 8: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

8

Page 10: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

Congratulations! You’ve got a coffee

10

Who’s next?

Page 11: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

11

Things to think about?

• Barista takes a break• Order is taking while• “We don’t do mochachinos”

Page 12: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

12

Starbucks does not use two-phase commit

Gregor Hohpehttps://www.enterpriseintegrationpatterns.com/ramblings/18_starbucks.html

Page 15: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

15

The System of Kaffee und Kuchen

15

Cashier:Takes orders

Order Sorter:Can get Cake!

Barista:Makes Coffee

Order

Coffee Ready

Coffee

Complete

Page 16: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

Demo!

16

https://github.com/NPDeehan/kaffee-und-kuchen

Page 17: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

17

Lets Make some changes to our system

Page 18: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

18

What needs to change?

18

Cashier:Takes orders

Order Sorter:Can get Cake!

Barista:Makes Coffee

Order

Coffee Ready

Coffee

Complete

We Need to Hold State

● Retry● Timeout● Callback to Cashier● Versioning● Error Handling

Page 19: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

19

Live coding!

https://github.com/NPDeehan/kaffee-und-kuchen

Page 20: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

20

Lets deal with the issues

• What happens if the barista is taking a quick break?• Hold State until the barista is back

• What happens if the order is taking too long?• Let the customer know we’re still working on it

• What happens if the order can’t be completed for business reasons - not technical reasons?• BPMN Error event!

Page 21: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

21

Things to think about?

• Barista takes a break• Order is taking while• “We don’t do mochachinos”

Page 22: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

22

Live coding!

https://github.com/NPDeehan/kaffee-und-kuchen

Page 23: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

23

What did we Achieve

• Better throughput• Better error handling• Scale better• Visualization• Timer(?)• Saga(?)

Page 24: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

24

What needs to change?

24

Cashier:Takes orders

Order Sorter:Can get Cake!

Barista:Makes Coffee

Order

Coffee Ready

Coffee

Complete

● Retry● Timeout● Callback to Cashier● Versioning● Error Handling

We Need to Hold State

Page 25: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

Visualization!

25

Page 26: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

26

start.camunda.com

Page 27: Microservices Decoupling your Spring boot - QConSF · With an open source workflow engine Orchestrating Spring Boot Microservices (In order to get coffee quickly)

THE END

27