micro services, reactive manifesto and 12-factors
TRANSCRIPT
![Page 1: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/1.jpg)
Micro-Services, the
Reactive Manifesto, and
12-FactorsDejan Glozic, IBM Canada
ReactiveTO, July 2014
![Page 2: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/2.jpg)
About me
Dejan Glozic, Full-Stack Architect
IBM Canada Toronto Laboratory
@dglozic
http://dejanglozic.com
![Page 3: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/3.jpg)
Meetup reaction
Disambiguation:
• Reactionary
• Reactive pattern
• Reactive.js
![Page 4: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/4.jpg)
![Page 5: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/5.jpg)
We are not exactly
short on manifestosCan you name a few?
![Page 6: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/6.jpg)
![Page 7: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/7.jpg)
![Page 8: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/8.jpg)
![Page 9: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/9.jpg)
Still, why worry?
![Page 10: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/10.jpg)
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](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/11.jpg)
Adding more causes
inflationWe are reducing the value and impact of manifestos
![Page 12: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/12.jpg)
Or even hyper-inflationHow bad can it be?
![Page 13: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/13.jpg)
This badInflation is bad, don’t do inflation… mmm kay?
![Page 14: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/14.jpg)
Another thing to avoidFounders giving up on their own manifestos
![Page 15: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/15.jpg)
Resulting in…Russ Miles blog-blocking the creation of a Micro-service
Manifesto
![Page 16: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/16.jpg)
Microbe-serviceChlamydia is a nasty STD, don’t do Chlamydia…
mmmkay?
![Page 17: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/17.jpg)
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](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/18.jpg)
Do
• Use manifestos as building blocks
• Make new manifestos add to the growing
understanding
![Page 19: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/19.jpg)
–A Thespian from Utah
“We can have our Kate and Edith too.”
![Page 20: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/20.jpg)
Mental exerciseMerge 12-factors, reactive manifesto and micro-services
![Page 21: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/21.jpg)
The Twelve-Factor
AppAdam Wiggins, Heroku co-founder
![Page 22: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/22.jpg)
12-Factors use Roman
numeralsBecause they make the manifestos sound L% more
effective.
![Page 23: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/23.jpg)
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](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/24.jpg)
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](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/25.jpg)
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](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/26.jpg)
12-factors are great……but they only answer ‘How’, not ‘Why’ and ‘What’
![Page 27: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/27.jpg)
![Page 28: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/28.jpg)
Then came Reactive
Manifesto…but Kevin already told you what it is about
![Page 29: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/29.jpg)
Why Reactive?
So that our system can be reactive to:
• Events
• Load
• Failure
• Users
![Page 30: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/30.jpg)
Micro-servicesThe third ingredient
![Page 31: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/31.jpg)
Micro-service frenzyThey even cause Twitter food fights
![Page 32: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/32.jpg)
Sigh…We cannot even agree what it is
![Page 33: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/33.jpg)
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](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/34.jpg)
Example - feature gridHorizontal - tiers, vertical - features.
![Page 35: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/35.jpg)
Example - eventsRabbitMQ between micro-services, WebSockets for
server push
![Page 36: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/36.jpg)
Example - clusteringRabbitMQ worker queue, round-robin to micro-service
workers
![Page 37: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/37.jpg)
Everything snaps into
focusWe now have our What, Why and How
![Page 38: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/38.jpg)
What?A distributed system based on micro-services that
communicate via message queues
![Page 39: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/39.jpg)
Why?Because we want our system to be reactive to events,
load, failure and users.
![Page 40: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/40.jpg)
How?By implementing micro-services as well-behaved 12-
factor apps
![Page 41: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/41.jpg)
1 4 12CONCEPT TENETS FACTORS
![Page 42: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/42.jpg)
![Page 43: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/43.jpg)
This was funLet’s hope consultants don’t ruin Reactive the way they
did Agile
![Page 44: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/44.jpg)
#!$@*!!
![Page 45: Micro services, reactive manifesto and 12-factors](https://reader031.vdocuments.net/reader031/viewer/2022020208/55a644141a28ab98518b4907/html5/thumbnails/45.jpg)
Questions?