Slide 1

Slide 1 text

Monolith Microservices ready™ @Lilobase

Slide 2

Slide 2 text

accidental mandatory Complexity essential

Slide 3

Slide 3 text

Coupling Module complexity Module complexity Module complexity X X

Slide 4

Slide 4 text

Complexity is non-linear Complexity System size

Slide 5

Slide 5 text

Distributed doghouse

Slide 6

Slide 6 text

-Simon Brown « If you can’t build a monolith, what makes you think micro-services are the answer ? »

Slide 7

Slide 7 text

Monolith Microservices -Alvaro Sanchez

Slide 8

Slide 8 text

-Melvin Conway « organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations »

Slide 9

Slide 9 text

-Simon Brown

Slide 10

Slide 10 text

The problem has never been the monolith, but having a single coupled model

Slide 11

Slide 11 text

Multiple models lives in your application Invoice Catalog Payment Product Product Product This is not the same product

Slide 12

Slide 12 text

The primary coupling in software architecture is when concepts from separate contexts are entangled

Slide 13

Slide 13 text

Software architecture is about boundaries Boundaries between business domain contexts are semantic boundaries. These boundaries are crossed when concepts with the same name have different meaning and/or purpose.

Slide 14

Slide 14 text

Software architecture is about boundaries Collaborators with the same lifecycle should be persisted as a single unit Collaborators with different lifecycle shouldn’t be coupled at the persistence level (which mean no join between them)

Slide 15

Slide 15 text

Multiple models lives in your application Invoice Catalog Payment Product Product Product

Slide 16

Slide 16 text

We usually don’t get our models right on the first try. This is where having a single code base & deployment unit helps with the requested refactoring

Slide 17

Slide 17 text

« Two micro services and their shared database » -Mathias Verraes

Slide 18

Slide 18 text

implicit couplings are the root of all evil Most of the Implicit couplings comes from shared data sources

Slide 19

Slide 19 text

Messages brokers are also datasources

Slide 20

Slide 20 text

-Cyrille Dupuydauby « Years of fight against ‘DB as a MoM’ anti- pattern have finally paid off: I am now fighting against ‘MoM as a DB’ anti-pattern. »

Slide 21

Slide 21 text

Events are not created equal Invoice Catalog Payment Inventory

Slide 22

Slide 22 text

All events shouldn’t be globally broadcasted Invoice Catalog Payment Inventory

Slide 23

Slide 23 text

Align team with context Invoice Catalog Payment Inventory Team B Team A

Slide 24

Slide 24 text

Consumer / producer relationship

Slide 25

Slide 25 text

The micro services iceberg

Slide 26

Slide 26 text

-Graham Lea « They can be hard to see, and they can sink your app »

Slide 27

Slide 27 text

Distributed transaction

Slide 28

Slide 28 text

The saga pattern

Slide 29

Slide 29 text

A time bomb for the optimists

Slide 30

Slide 30 text

Dependencies, even more chances to get failures

Slide 31

Slide 31 text

Fault tolerance Circuit-breaker, rate-limiter, automatic retrying with exponential backoff, response caching, … Hystrix, Resilience4j

Slide 32

Slide 32 text

accidental mandatory Complexity essential

Slide 33

Slide 33 text

Micro-services are a deployment option

Slide 34

Slide 34 text

Going further • Applying the Saga Pattern • Caitie McCaffrey • Distributed Transactions: The Icebergs of Microservices • Graham Lea • Application Resilience Engineering & Operations at Netflix • Ben Christensen • arpinum/alexandria-api