The 6 Traits of Reactive Microservices
Transcript of The 6 Traits of Reactive Microservices
![Page 1: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/1.jpg)
![Page 2: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/2.jpg)
IT'S A NEW WORLDYESTERDAY VS TODAY
![Page 3: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/3.jpg)
Traditional applicationarchitectures and
platformsare obsolete.
— Gartner
![Page 4: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/4.jpg)
THE REACTIVE ESSENCE OF A MICROSERVICE1. Isolation
2. Asynchronicity3. Autonomicity
4. Single Responsibility5. Exclusive State
6. Mobility
![Page 5: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/5.jpg)
DIVIDEAND
CONQUER
![Page 6: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/6.jpg)
ISOLATIONTHE FOUNDATION
![Page 7: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/7.jpg)
IT WILL SLICE UP YOUR1. ORGANIZATION2. ARCHITECTURE
![Page 8: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/8.jpg)
Organizations which design systems...are
constrained to produce designs which are
copies of the communication
structures of these organizations.
— Melvin Conway
![Page 9: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/9.jpg)
USE BULKHEADING
![Page 10: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/10.jpg)
BUTWHAT ABOUT THE
TITANIC?
![Page 11: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/11.jpg)
RESILIENCEIS THE ABILITY TO SELF-HEAL, AND REQUIRES
COMPARTMENTALIZATIONOF FAILURE
![Page 12: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/12.jpg)
GOASYNCHRONOUS
![Page 13: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/13.jpg)
ASYNC IO—IS ABOUT NOT BLOCKING THREADS
ASYNC COMMUNICATION—IS ABOUT NOT BLOCKING REQUESTS
![Page 14: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/14.jpg)
ASYNCHRONOUS
IO
![Page 15: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/15.jpg)
WHY IS BLOCKING SO BAD?
![Page 16: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/16.jpg)
SYNCHRONOUS DISPATCH
![Page 17: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/17.jpg)
ASYNCHRONOUS DISPATCH
![Page 18: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/18.jpg)
ASYNCHRONOUSCOMMUNICATION
![Page 19: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/19.jpg)
ASYNC COMMUNICATION ALLOWS DECOUPLING IN
SPACEAND
TIME
![Page 20: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/20.jpg)
ASYCHRONOUS MESSAGE-PASSINGEMBRACES THE CONSTRAINTS OFDISTRIBUTED SYSTEMS
![Page 21: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/21.jpg)
THE WORLD IS GOING STREAMING
![Page 22: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/22.jpg)
ACTAUTONOMOUSLY
![Page 23: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/23.jpg)
PROMISE THEORYLEADS THE WAY
![Page 24: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/24.jpg)
THE WORD 'MICROSERVICE'CONSIDERED HARMFUL
![Page 25: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/25.jpg)
A SERVICE SHOULD DODO ONE THING
AND
DO IT WELL
![Page 26: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/26.jpg)
The Unix philosophy:Write programs that do one thing & do it well.
Write programs to work together.
— Doug McIlroy
![Page 27: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/27.jpg)
BUT WHAT ABOUT
STATE?
![Page 28: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/28.jpg)
OWN YOUR STATE, EXCLUSIVELY
![Page 29: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/29.jpg)
THERE IS NO SUCH THING AS A"STATELESS" ARCHITECTUREIT'S JUST SOMEONE ELSE'S PROBLEM
![Page 30: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/30.jpg)
BOUNDEDCONTEXTS
![Page 31: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/31.jpg)
POLYGLOTPERSISTENCE
![Page 32: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/32.jpg)
The truth is the log.The database is a cache of a subset of the log.
— Pat Helland
![Page 33: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/33.jpg)
FAVOR
EVENT LOGGING
![Page 34: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/34.jpg)
GREAT FIT FOR MESSAGE-PASSING SYSTEMS
> Signal Intent: Use Commands> Publish Facts: Use Events
SINGLE WRITER PRINCIPLE> Minimized Contention
> High throughput & Low latency
![Page 35: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/35.jpg)
EVENT SOURCING
WITH CQRS
![Page 36: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/36.jpg)
AVOIDS THE INFAMOUSOBJECT-RELATIONALIMPEDENCE MISMATCH
![Page 37: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/37.jpg)
STAY MOBILE BUT ADDRESSABLE
![Page 38: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/38.jpg)
But I'll take my time anywhere.
I'm free to speak my mind anywhere.And I'll redefine
anywhere.Anywhere I roam.
Where I lay my head is home.
— Wherever I May Roam by Lars Ulrich, James Hetfield (Metallica)
![Page 39: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/39.jpg)
WHY VIRTUAL ADRESSING?
1. Load-balancing between stateless services2. State replication between stateful services
3. Relocation of a stateful service
![Page 40: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/40.jpg)
REFERENCES SHOULD ALWAYS WORK
![Page 41: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/41.jpg)
SO, THERE YOU HAVE IT
THE 6 TRAITS OF A REACTIVE MICROSERVICE1. Isolation
2. Asynchronicity3. Autonomicity
4. Single Responsibility5. Exclusive State
![Page 42: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/42.jpg)
BY NOW WE SHOULD HAVE A PRETTY GOOD UNDERSTANDING OF WHAT
CHARACTERIZES A SINGLEREACTIVE MICROSERVICE
![Page 43: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/43.jpg)
HOWEVERONE MICROSERVICE
IS NOT OF MUCH USETHEY COME IN SYSTEMS
STAY TUNED FOR EPISODE 3
![Page 44: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/44.jpg)
![Page 45: The 6 Traits of Reactive Microservices](https://reader034.fdocuments.net/reader034/viewer/2022042515/586fdc031a28ab18428b6351/html5/thumbnails/45.jpg)