The 6 Traits of Reactive Microservices

  • Published on
    07-Jan-2017

  • View
    4.170

  • Download
    0

Embed Size (px)

Transcript

  • IT'S A NEW WORLDYESTERDAY VS TODAY

  • Traditional applicationarchitectures and

    platformsare obsolete.

    Gartner

  • THE REACTIVE ESSENCE OF A MICROSERVICE1. Isolation

    2. Asynchronicity3. Autonomicity

    4. Single Responsibility5. Exclusive State

    6. Mobility

  • DIVIDEAND

    CONQUER

  • ISOLATIONTHE FOUNDATION

  • IT WILL SLICE UP YOUR1. ORGANIZATION2. ARCHITECTURE

  • Organizations which design systems...are

    constrained to produce designs which are

    copies of the communication

    structures of these organizations.

    Melvin Conway

  • USE BULKHEADING

  • BUTWHAT ABOUT THE

    TITANIC?

  • RESILIENCEIS THE ABILITY TO SELF-HEAL, AND REQUIRES

    COMPARTMENTALIZATIONOF FAILURE

  • GOASYNCHRONOUS

  • ASYNC IOIS ABOUT NOT BLOCKING THREADS

    ASYNC COMMUNICATIONIS ABOUT NOT BLOCKING REQUESTS

  • ASYNCHRONOUS

    IO

  • WHY IS BLOCKING SO BAD?

  • SYNCHRONOUS DISPATCH

  • ASYNCHRONOUS DISPATCH

  • ASYNCHRONOUSCOMMUNICATION

  • ASYNC COMMUNICATION ALLOWS DECOUPLING IN

    SPACEAND

    TIME

  • ASYCHRONOUS MESSAGE-PASSINGEMBRACES THE CONSTRAINTS OFDISTRIBUTED SYSTEMS

  • THE WORLD IS GOING STREAMING

  • ACTAUTONOMOUSLY

  • PROMISE THEORYLEADS THE WAY

  • THE WORD 'MICROSERVICE'CONSIDERED HARMFUL

  • A SERVICE SHOULD DODO ONE THING

    AND

    DO IT WELL

  • The Unix philosophy:Write programs that do one thing & do it well.

    Write programs to work together.

    Doug McIlroy

  • BUT WHAT ABOUT

    STATE?

  • OWN YOUR STATE, EXCLUSIVELY

  • THERE IS NO SUCH THING AS A"STATELESS" ARCHITECTUREIT'S JUST SOMEONE ELSE'S PROBLEM

  • BOUNDEDCONTEXTS

  • POLYGLOTPERSISTENCE

  • The truth is the log.The database is a cache of a subset of the log.

    Pat Helland

  • FAVOR

    EVENT LOGGING

  • GREAT FIT FOR MESSAGE-PASSING SYSTEMS

    > Signal Intent: Use Commands> Publish Facts: Use Events

    SINGLE WRITER PRINCIPLE> Minimized Contention

    > High throughput & Low latency

  • EVENT SOURCING

    WITH CQRS

  • AVOIDS THE INFAMOUSOBJECT-RELATIONALIMPEDENCE MISMATCH

  • STAY MOBILE BUT ADDRESSABLE

  • 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)

  • WHY VIRTUAL ADRESSING?

    1. Load-balancing between stateless services2. State replication between stateful services

    3. Relocation of a stateful service

  • REFERENCES SHOULD ALWAYS WORK

  • SO, THERE YOU HAVE IT

    THE 6 TRAITS OF A REACTIVE MICROSERVICE1. Isolation

    2. Asynchronicity3. Autonomicity

    4. Single Responsibility5. Exclusive State

  • BY NOW WE SHOULD HAVE A PRETTY GOOD UNDERSTANDING OF WHAT

    CHARACTERIZES A SINGLEREACTIVE MICROSERVICE

  • HOWEVERONE MICROSERVICE

    IS NOT OF MUCH USETHEY COME IN SYSTEMS

    STAY TUNED FOR EPISODE 3

Recommended

View more >