micro services, reactive manifesto and 12-factors

46
Micro-Services, the Reactive Manifesto, and 12-Factors Dejan Glozic, IBM Canada ReactiveTO, July 2014

Upload: dejan-glozic

Post on 15-Jul-2015

984 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Micro services, reactive manifesto and 12-factors

Micro-Services, the

Reactive Manifesto, and

12-FactorsDejan Glozic, IBM Canada

ReactiveTO, July 2014

Page 2: Micro services, reactive manifesto and 12-factors

About me

Dejan Glozic, Full-Stack Architect

IBM Canada Toronto Laboratory

@dglozic

http://dejanglozic.com

Page 3: Micro services, reactive manifesto and 12-factors

Meetup reaction

Disambiguation:

• Reactionary

• Reactive pattern

• Reactive.js

Page 4: Micro services, reactive manifesto and 12-factors
Page 5: Micro services, reactive manifesto and 12-factors

We are not exactly

short on manifestosCan you name a few?

Page 6: Micro services, reactive manifesto and 12-factors
Page 7: Micro services, reactive manifesto and 12-factors
Page 8: Micro services, reactive manifesto and 12-factors
Page 9: Micro services, reactive manifesto and 12-factors

Still, why worry?

Page 10: Micro services, reactive manifesto and 12-factors

Manifesto trends

0

15

30

45

60

XVI XVII XVIII XIX XX XXI

Nota

ble

Manifesto

s

Centuries

Artistic Technical Technical (projected) Political

Page 11: Micro services, reactive manifesto and 12-factors

Adding more causes

inflationWe are reducing the value and impact of manifestos

Page 12: Micro services, reactive manifesto and 12-factors

Or even hyper-inflationHow bad can it be?

Page 13: Micro services, reactive manifesto and 12-factors

This badInflation is bad, don’t do inflation… mmm kay?

Page 14: Micro services, reactive manifesto and 12-factors

Another thing to avoidFounders giving up on their own manifestos

Page 15: Micro services, reactive manifesto and 12-factors

Resulting in…Russ Miles blog-blocking the creation of a Micro-service

Manifesto

Page 16: Micro services, reactive manifesto and 12-factors

Microbe-serviceChlamydia is a nasty STD, don’t do Chlamydia…

mmmkay?

Page 17: Micro services, reactive manifesto and 12-factors

Don’t:

• Create too many new manifestos

• Go through them like dirty socks

• Make them compete with each other

Page 18: Micro services, reactive manifesto and 12-factors

Do

• Use manifestos as building blocks

• Make new manifestos add to the growing

understanding

Page 19: Micro services, reactive manifesto and 12-factors

–A Thespian from Utah

“We can have our Kate and Edith too.”

Page 20: Micro services, reactive manifesto and 12-factors

Mental exerciseMerge 12-factors, reactive manifesto and micro-services

Page 21: Micro services, reactive manifesto and 12-factors

The Twelve-Factor

AppAdam Wiggins, Heroku co-founder

Page 22: Micro services, reactive manifesto and 12-factors

12-Factors use Roman

numeralsBecause they make the manifestos sound L% more

effective.

Page 23: Micro services, reactive manifesto and 12-factors

Factors I-IV

I. One codebase, many deploys

II. Declare and isolate dependencies

III. Separate config from code

IV. Treat backing services as attached resources

Page 24: Micro services, reactive manifesto and 12-factors

Factors V-VIII

V. Strictly separate build, release and run stages

VI. Execute apps as share-nothing processes

VII.Export services via port binding

VIII.Scale out via the process model

Page 25: Micro services, reactive manifesto and 12-factors

Factors IX-XII

IX. Fast startup, graceful shutdown

X. Dev/Prod parity

XI. Treat logs as event streams

XII.Run admin/mgmt tasks as one-off processes

Page 26: Micro services, reactive manifesto and 12-factors

12-factors are great……but they only answer ‘How’, not ‘Why’ and ‘What’

Page 27: Micro services, reactive manifesto and 12-factors
Page 28: Micro services, reactive manifesto and 12-factors

Then came Reactive

Manifesto…but Kevin already told you what it is about

Page 29: Micro services, reactive manifesto and 12-factors

Why Reactive?

So that our system can be reactive to:

• Events

• Load

• Failure

• Users

Page 30: Micro services, reactive manifesto and 12-factors

Micro-servicesThe third ingredient

Page 31: Micro services, reactive manifesto and 12-factors

Micro-service frenzyThey even cause Twitter food fights

Page 32: Micro services, reactive manifesto and 12-factors

Sigh…We cannot even agree what it is

Page 33: Micro services, reactive manifesto and 12-factors

Micro-service system

• Many micro-services instead of a monolith

• Do one thing and do it right

• Deploy micro-services independently

• Communicate using message queues

• Cluster locally

Page 34: Micro services, reactive manifesto and 12-factors

Example - feature gridHorizontal - tiers, vertical - features.

Page 35: Micro services, reactive manifesto and 12-factors

Example - eventsRabbitMQ between micro-services, WebSockets for

server push

Page 36: Micro services, reactive manifesto and 12-factors

Example - clusteringRabbitMQ worker queue, round-robin to micro-service

workers

Page 37: Micro services, reactive manifesto and 12-factors

Everything snaps into

focusWe now have our What, Why and How

Page 38: Micro services, reactive manifesto and 12-factors

What?A distributed system based on micro-services that

communicate via message queues

Page 39: Micro services, reactive manifesto and 12-factors

Why?Because we want our system to be reactive to events,

load, failure and users.

Page 40: Micro services, reactive manifesto and 12-factors

How?By implementing micro-services as well-behaved 12-

factor apps

Page 41: Micro services, reactive manifesto and 12-factors

1 4 12CONCEPT TENETS FACTORS

Page 42: Micro services, reactive manifesto and 12-factors
Page 43: Micro services, reactive manifesto and 12-factors

This was funLet’s hope consultants don’t ruin Reactive the way they

did Agile

Page 44: Micro services, reactive manifesto and 12-factors

#!$@*!!

Page 45: Micro services, reactive manifesto and 12-factors

Questions?

Page 46: Micro services, reactive manifesto and 12-factors

Thank you!@dglozic

http://dejanglozic.com