Slide 1

Slide 1 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 1/98 MICROSERVICES, MICROSERVICES, MICROSERVICES EVERYWHERE MICROSERVICES EVERYWHERE Jakub Marchwicki [@kubem]

Slide 2

Slide 2 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 2/98 @kubem ~ http://jakub.marchwicki.pl the 5 why’s of microservices the 5 why’s of microservices Microservices? Microservices? Microservices? Microservices? Microservices? Why? Why? Oh, why? Oh dear God, why? Damn it! Why?

Slide 3

Slide 3 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 3/98 Software engineer Chief Mob O cer Jakub Marchwicki <@kubem> http://jakub.marchwicki.pl

Slide 4

Slide 4 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 4/98 @kubem ~ http://jakub.marchwicki.pl microservices, how it all started? microservices, how it all started? All names, characters, and incidents portrayed in this story are ctitious. No identi cation with actual persons (living or deceased), places, and buildings is intended or should be inferred.

Slide 5

Slide 5 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 5/98 @kubem ~ http://jakub.marchwicki.pl on day one there was a lonely architect sitting on day one there was a lonely architect sitting

Slide 6

Slide 6 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 6/98 @kubem ~ http://jakub.marchwicki.pl in a tower made of ivory in a tower made of ivory sitting in an uncertainty and sadness

Slide 7

Slide 7 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 7/98 @kubem ~ http://jakub.marchwicki.pl and the architect said and the architect said

Slide 8

Slide 8 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 8/98 @kubem ~ http://jakub.marchwicki.pl let there be µservices let there be µservices

Slide 9

Slide 9 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 9/98 @kubem ~ http://jakub.marchwicki.pl let there be small modules let there be small modules which have only a single reason to change

Slide 10

Slide 10 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 10/98 @kubem ~ http://jakub.marchwicki.pl let the modules communicate let the modules communicate over well de ned interfaces

Slide 11

Slide 11 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 11/98 @kubem ~ http://jakub.marchwicki.pl let the output of one module let the output of one module becomes the input of the other

Slide 12

Slide 12 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 12/98 @kubem ~ http://jakub.marchwicki.pl and the architect saw it was good and the architect saw it was good

Slide 13

Slide 13 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 13/98 @kubem ~ http://jakub.marchwicki.pl and the architect called it and the architect called it a distributed system

Slide 14

Slide 14 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 14/98 @kubem ~ http://jakub.marchwicki.pl and developers seen it and developers seen it and it was good

Slide 15

Slide 15 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 15/98 @kubem ~ http://jakub.marchwicki.pl and there was evening, and there was morning and there was evening, and there was morning (Genesis. 1, 1-25)

Slide 16

Slide 16 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 16/98

Slide 17

Slide 17 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 17/98 @kubem ~ http://jakub.marchwicki.pl microservices microservices — James Lewis and Martin Fowler “the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API

Slide 18

Slide 18 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 18/98

Slide 19

Slide 19 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 19/98 @kubem ~ http://jakub.marchwicki.pl µservices µservices Small business domain Independent; independently deployed Running in it’s own process Managing it’s data Loosely integrated using common communication protocols

Slide 20

Slide 20 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 20/98

Slide 21

Slide 21 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 21/98 monolith are bad - mmkey?? monolith are bad - mmkey??

Slide 22

Slide 22 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 22/98 @kubem ~ http://jakub.marchwicki.pl microservices are good microservices are good Clean code Single responsibility modules Faster than monoliths Easier to manage Easier to scale Docker, Docker, Docker, Docker potentialy faster to deploy, works faster independent teams, independent codebases at this point we should at least mention Docker

Slide 23

Slide 23 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 23/98 microservices are good - mmmkey? microservices are good - mmmkey?

Slide 24

Slide 24 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 24/98 @kubem ~ http://jakub.marchwicki.pl (… ) collection of task-oriented or dedicated systems that pool their resources and capabilities together to create a new, more complex system which offers more functionality and performance than simply the sum of the constituent systems

Slide 25

Slide 25 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 25/98 @kubem ~ http://jakub.marchwicki.pl system of systems system of systems (… ) collection of task-oriented or dedicated systems that pool their resources and capabilities together to create a new, more complex system which offers more functionality and performance than simply the sum of the constituent systems

Slide 26

Slide 26 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 26/98

Slide 27

Slide 27 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 27/98 @kubem ~ http://jakub.marchwicki.pl so what can possibly go wrong? so what can possibly go wrong?

Slide 28

Slide 28 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 28/98

Slide 29

Slide 29 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 29/98

Slide 30

Slide 30 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 30/98 // Exibit A +-------------+ | | | Resources | | service | | | +-------------+ //

Slide 31

Slide 31 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 31/98 // Exibit A +------------------+ +-------------+ | | | | | Access control | | Resources | | | | service | +------------------+ | | +-------------+ //

Slide 32

Slide 32 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 32/98 // Exibit A +------------------+ +-------------+ | | | | | Access control | | Resources | | | | service | +------------------+ | | +-------------+ +----------------+ | | | Users | | repository | | | +----------------+ //

Slide 33

Slide 33 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 33/98 // Exibit A +------------------+ +-------------+ | | | | | Access control | | Resources | | | | service | +------------------+ | | +-+-----------+ ^ | | +----------------+ | | | | | Users | | | repository | | | | | +----------------+ (1) + //

Slide 34

Slide 34 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 34/98 // Exibit A +------------------+ +-------------+ | | | | | Access control | | Resources | | | | service | +------------------+ | | +-+-------+---+ ^ | | | | | +----------------+ | | | | | | | Users | | | (2) | repository | | +-----------> | | | +----------------+ (1) + //

Slide 35

Slide 35 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 35/98 // Exibit A +------------------+ +-------------+ | | | | | Access control | | Resources | | | | service | +------------------+ | +<---------+ +-+-------+---+ (3) | ^ | | | | | | | +----------------+ | | | | | | | Users | | | (2) | repository | | +-----------> | | | +----------------+ (1) + //

Slide 36

Slide 36 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 36/98 // Exibit A +------------------+ +-------------+ | | | | (4) | Access control | | Resources +------------>+ | | service | +------------------+ | +<---------+ +-+-------+---+ (3) | ^ | | | | | | | +----------------+ | | | | | | | Users | | | (2) | repository | | +-----------> | | | +----------------+ (1) + //

Slide 37

Slide 37 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 37/98 // Exibit A +------------------+ +-------------+ | | | | (4) | Access control | | Resources +------------>+ | | service | +------------------+ | +<---------+ +-+-------+---+ (3) | ^ | | | | | | | | | | +----------------+ | | | | | | | | | Users | | | | (2) | repository | | | +-----------> | | | | +----------------+ (1) | + | (5) v //

Slide 38

Slide 38 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 38/98 @kubem ~ http://jakub.marchwicki.pl microservices journey microservices journey

Slide 39

Slide 39 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 39/98 @kubem ~ http://jakub.marchwicki.pl microservices journey microservices journey — Christopher Alexander “A Piecemeal Growth is the process of building something a step at a time. Each step consists of evaluating the current system, deciding what should be done next (what should be fixed or improved) and then adding a piece or making a change.

Slide 40

Slide 40 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 40/98 @kubem ~ http://jakub.marchwicki.pl a scoring engine EXIBIT B EXIBIT B -- 2009

Slide 41

Slide 41 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 41/98 +-----------------------------------------------+ | | | +-----------------------------------+ | | | | | | | Boundary: SOAP | | | | | | | +-----------------------------------+ | | | | | | | EJB | | | | | | | +-----------------------------------+ | | | | | | +--------+ +-------+ +----------+ | | | | | | | | | | | JAX-WS | | JPA | | DROOLS | | | | | | | | | | | +--------+ +-------+ +----------+ | | | | | | JBoss 4.2.x | | | +-----------------------------------------------+

Slide 42

Slide 42 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 42/98 @kubem ~ http://jakub.marchwicki.pl Can you visualize this? A UI? Webservices are so hard to sell. business value? business value?

Slide 43

Slide 43 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 43/98 +-----------------------------------------------+ | | | +--------------------+--------------+ | | | | | | | | Boundary: SOAP | JSF | | | | | | | | +--------------------+--------------+ | | | | | | | EJB | | | | | | | +-----------------------------------+ | | | | | | +--------+ +-------+ +----------+ | | | | | | | | | | | JAX-WS | | JPA | | DROOLS | | | | | | | | | | | +--------+ +-------+ +----------+ | | | | | | JBoss 4.2.x | | | +-----------------------------------------------+

Slide 44

Slide 44 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 44/98 +-----------------------------------------------+ | | | +-----------------+-----------------+ | +---------------+ | | | | | | | | | Boundary: SOAP | REST endpoint | <--------------+ | Dedicated | | | | | | | mobile | | +-----------------+-----------------+ | | Single Page | | | | | | Application | | | EJB | | | | | | | | | | | +-----------------------------------+ | +---------------+ | | | | | +--------+ +-------+ +----------+ | | | | | | | | | | | JAX+WS | | JPA | | DROOLS | | | | | | | | | | | +--------+ +-------+ +----------+ | | | | | | JBoss 4.2.x | | | +-----------------------------------------------+

Slide 45

Slide 45 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 45/98 @kubem ~ http://jakub.marchwicki.pl Keep separate things separately NOTE TO SELF NOTE TO SELF

Slide 46

Slide 46 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 46/98 @kubem ~ http://jakub.marchwicki.pl microservices checklist microservices checklist Small business domain Independent; independently deployed Running in it’s own process Managing it’s data Loosely integrated using common communication protocols     

Slide 47

Slide 47 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 47/98 @kubem ~ http://jakub.marchwicki.pl microservices checklist microservices checklist Small business domain Independent; independently deployed Running in it’s own process Managing it’s data Loosely integrated using common communication protocols     

Slide 48

Slide 48 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 48/98 @kubem ~ http://jakub.marchwicki.pl retrospective retrospective

Slide 49

Slide 49 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 49/98 @kubem ~ http://jakub.marchwicki.pl — James Lewis “ We define libraries as components that are linked into a program and called using in-memory calls, while services are out-of-process components who communicate with remote procedure calls

Slide 50

Slide 50 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 50/98 @kubem ~ http://jakub.marchwicki.pl consumer driven contracts consumer driven contracts (… ) drives the development of the Provider from its Consumers point of view, which means consumer describes what and how it wants to receive the information (in a form of a contract) and then provider implements the service following the given contract.

Slide 51

Slide 51 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 51/98 @kubem ~ http://jakub.marchwicki.pl huge image repository EXIBIT C EXIBIT C -- 2007

Slide 52

Slide 52 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 52/98 +--------------------------------------+ | | | web / controllers | | | +-----------+--------------------------+ | | (1) ^ | | v | (5) | +-------------------------------------+ | | | application logic | | | +--+-------------------------+--------+ | | | (2) ^ | (4) | | | v | (3) v | +----------+--+ +------------------+ | | | | | MySQL | | filesystem | | | | | +-------------+ +------------------+

Slide 53

Slide 53 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 53/98 @kubem ~ http://jakub.marchwicki.pl can’t work with it The search function is unbelievably slow business value? business value?

Slide 54

Slide 54 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 54/98 @kubem ~ http://jakub.marchwicki.pl business as usual There is no such thing as legacy — what can’t be killed, becomes

Slide 55

Slide 55 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 55/98 Proxy +-----+ +------------------+ | | /* | | +----------------+--------------------------> | | | | | | The Old stuff | | | | | +--------+ | | | | | | | | | +------------------+ | | | | | | | | | Elastic Search | | | | data push | | | | | | | | | | | +------------------+ | | | | /search | | | | | +--------------------------> | | <------+ | | | Elastic Search | | | | index | | | | | +-----+ +------------------+

Slide 56

Slide 56 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 56/98 @kubem ~ http://jakub.marchwicki.pl microservices checklist microservices checklist Small business domain Independent; independently deployed Running in it’s own process Managing it’s data Loosely integrated using common communication protocols     

Slide 57

Slide 57 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 57/98 @kubem ~ http://jakub.marchwicki.pl retrospective retrospective

Slide 58

Slide 58 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 58/98 @kubem ~ http://jakub.marchwicki.pl Andrew Tanenbaum — Distributed Systems (2007) - Principles & Paradigms “(… ) as every parent of a small child knows, converting a large object into small fragments is considerably easier than the reverse process.

Slide 59

Slide 59 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 59/98 Write through update query +--------------------------+ +----------------------------------+ -------------------->| update denormalized view |-------->| update persistent (master) store | +--------------------------+ +----------------------------------+ Write behind update query +----------------------------------+ +---------------------------+ ---------------->| update persistent (master) store |----------->| update denormalized views | +----------------------------------+ +---------------------------+ Read through read query +--------------------------+ +---------------------------+ <---------------------| update denormalized view |<--------------| read persistent store | +--------------------------+ +---------------------------+

Slide 60

Slide 60 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 60/98 @kubem ~ http://jakub.marchwicki.pl lessons learned lessons learned from all these projects

Slide 61

Slide 61 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 61/98 @kubem ~ http://jakub.marchwicki.pl start small start small

Slide 62

Slide 62 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 62/98 @kubem ~ http://jakub.marchwicki.pl slightly less distributed systems monoliths are

Slide 63

Slide 63 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 63/98 @kubem ~ http://jakub.marchwicki.pl don’t diagram - trace and visualize don’t diagram - trace and visualize

Slide 64

Slide 64 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 64/98 @kubem ~ http://jakub.marchwicki.pl let the application tell you where it spends time

Slide 65

Slide 65 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 65/98 @kubem ~ http://jakub.marchwicki.pl automate, automate, automate automate, automate, automate

Slide 66

Slide 66 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 66/98 @kubem ~ http://jakub.marchwicki.pl event a single WAR cannot be deployed manually

Slide 67

Slide 67 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 67/98 @kubem ~ http://jakub.marchwicki.pl but we’ve already started! but we’ve already started! what do our services do when nobody watches?

Slide 68

Slide 68 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 68/98

Slide 69

Slide 69 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 69/98 @kubem ~ http://jakub.marchwicki.pl distributed computing distributed computing Leslie Lamport — Microsoft mailing list 1987 A distributed system is one in which the failure of a computer you didn’t even know existed can render your own computer unusable.

Slide 70

Slide 70 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 70/98 @kubem ~ http://jakub.marchwicki.pl distributed computing distributed computing

Slide 71

Slide 71 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 71/98 @kubem ~ http://jakub.marchwicki.pl fallacies of distributed computing fallacies of distributed computing — 1994 - 1998 (is) a set of assertions made by L Peter Deutsch and others at Sun Microsystems describing false assumptions that programmers new to distributed applications invariably make

Slide 72

Slide 72 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 72/98 @kubem ~ http://jakub.marchwicki.pl

Slide 73

Slide 73 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 73/98 @kubem ~ http://jakub.marchwicki.pl in other words in other words

Slide 74

Slide 74 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 74/98 @kubem ~ http://jakub.marchwicki.pl network sucks

Slide 75

Slide 75 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 75/98 @kubem ~ http://jakub.marchwicki.pl load balance load balance all the things

Slide 76

Slide 76 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 76/98 @kubem ~ http://jakub.marchwicki.pl … before choosing a load balancer … before choosing a load balancer

Slide 77

Slide 77 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 77/98 @kubem ~ http://jakub.marchwicki.pl AWS Elastic Load Balancer nginx Ribbon + Eureka Ribbon + Consul Kubernetes

Slide 78

Slide 78 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 78/98 @kubem ~ http://jakub.marchwicki.pl load balancing load balancing

Slide 79

Slide 79 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 79/98 @kubem ~ http://jakub.marchwicki.pl server-side load balancing server-side load balancing

Slide 80

Slide 80 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 80/98 @kubem ~ http://jakub.marchwicki.pl client-side load balancing client-side load balancing

Slide 81

Slide 81 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 81/98 @kubem ~ http://jakub.marchwicki.pl Client-Side Service Discovery / Load balancing Service registers itself in a central repository. The repository also provides an information about other services availability. Other services request the information and autonomously decide which instances are called. Server-Side Service Discovery / Load balancing Service registers itself in a central repository. Other services access the repository (single address), which internally forwards the request to an available instance.

Slide 82

Slide 82 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 82/98 @kubem ~ http://jakub.marchwicki.pl … before choosing a load balancer … before choosing a load balancer

Slide 83

Slide 83 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 83/98 @kubem ~ http://jakub.marchwicki.pl brewer’s theorem (cap theorem) brewer’s theorem (cap theorem) — 1998 (… ) it is impossible for a distributed computer system to simultaneously provide all three of the following guarantees: Consistency, Availability and Partition tolerance.

Slide 84

Slide 84 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 84/98 @kubem ~ http://jakub.marchwicki.pl Consistency Every read receives the most recent write or an error Availability Every request receives a (non-error) response – without the guarantee that it contains the most recent write Partition tolerance The system continues to operate despite an arbitrary number of messages being dropped (or delayed) by the network between nodes

Slide 85

Slide 85 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 85/98 @kubem ~ http://jakub.marchwicki.pl cap + network fallacies cap + network fallacies

Slide 86

Slide 86 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 86/98 @kubem ~ http://jakub.marchwicki.pl either Consistent or Available when Partitioned

Slide 87

Slide 87 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 87/98 @kubem ~ http://jakub.marchwicki.pl consistency vs availability consistency vs availability CP All data is consistent (single store)

Slide 88

Slide 88 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 88/98 @kubem ~ http://jakub.marchwicki.pl consistency vs availability consistency vs availability AP Data is distributed

Slide 89

Slide 89 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 89/98

Slide 90

Slide 90 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 90/98 @kubem ~ http://jakub.marchwicki.pl … before choosing a load balancer … before choosing a load balancer

Slide 91

Slide 91 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 91/98 @kubem ~ http://jakub.marchwicki.pl cap + network latencies cap + network latencies

Slide 92

Slide 92 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 92/98 @kubem ~ http://jakub.marchwicki.pl in the absence of partitions, one has to choose between

Slide 93

Slide 93 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 93/98 @kubem ~ http://jakub.marchwicki.pl pacelc theorem pacelc theorem — Daniel J. Abadi 2012 Ignoring the consistency/latency tradeoff of replicated systems is a major oversight [in CAP], as it is present at all times during system operation, whereas CAP is only relevant in the arguably rare case of a network partition.

Slide 94

Slide 94 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 94/98 @kubem ~ http://jakub.marchwicki.pl … before choosing a load balancer … before choosing a load balancer

Slide 95

Slide 95 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 95/98 microservices are simple… microservices are simple…

Slide 96

Slide 96 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 96/98 … but ain’t easy … but ain’t easy

Slide 97

Slide 97 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 97/98 questions? questions?

Slide 98

Slide 98 text

3/28/2019 Microservices, microservices everywhere file:///home/jakub/workspaces/slides/microservices-microservice_everything/slides.html?print-pdf#/ 98/98 @kubem ~ http://jakub.marchwicki.pl @kubem ~ http://jakub.marchwicki.pl @kubem . http://speakerdeck.com/kubamarchwicki/microservice-everything-redux-eng [email protected] http://jakub.marchwicki.pl/