Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From Microliths To Microsystems

Jonas Bonér
February 08, 2017

From Microliths To Microsystems

Everyone is talking about microservices, and there is more confusion than ever about what the promise of microservices really means and how to deliver on it. To address this we will explore microservices from first principles, distilling their essence and putting them in their true context: distributed systems.

What many people forget is that microservices are distributed and collaborative by nature and only make sense as systems—one collaborator is no collaborator. It is in between the microservices that the most interesting and rewarding, and also challenging, problems arise—enter the world of distributed systems.

Distributed systems are by definition complex, and we system developers have been spoiled by centralized servers for too long to easily understand what this really means. Slicing an existing system into various REST services and wiring them back together again with synchronous protocols and traditional enterprise tools—designed for monolithic architectures—will set us up for failure.

As if that wasn’t enough, we can’t just think about systems of microservices. In order to make each microservice resilient and elastic in and of itself, we have to design each individual microservice as a distributed system—a «microsystem»—architected from the ground up using the reactive principles.

Jonas Bonér

February 08, 2017
Tweet

More Decks by Jonas Bonér

Other Decks in Programming

Transcript

  1. AS SOON AS WE EXIT THE SERVICE WE ENTER A

    WILD OCEAN OF NON-DETERMINISM THE WORLD OF DISTRIBUTED SYSTEMS
  2. The contents of a message are always from the past!

    They are never “now.” — Pat Helland
  3. In a distributed system, you can know where the work

    is done or you can know when the work is done but you can’t know both — Pat Helland
  4. Words are very unnecessary. They can only do harm. Enjoy

    the silence. — Enjoy the Silence by Martin Gore (Depeche Mode)
  5. INSIDE DATA: OUR CURRENT PRESENT (STATE) OUTSIDE DATA: BLAST FROM

    THE PAST (FACTS) BETWEEN SERVICES: HOPE FOR THE FUTURE (COMMANDS) — PAT HELLAND, DATA ON THE INSIDE VS DATA ON THE OUTSIDE
  6. ASYNCHRONOUS & NON-BLOCKING - MORE EFFICIENT USE OF RESOURCES -

    MINIMIZES CONTENTION ON SHARED RESOURCES
  7. WE NEED TO EXTEND OUR MODELS OF COMMUNICATION 1. ASYNCHRONOUS

    MESSAGING (N-M) 2. STREAMING (1-1) 3. SYNCHRONOUS REQUEST/REPLY (1-1)
  8. WE'RE GETTING THERE, BUT WE STILL HAVE A SINGLE INSTANCE

    MICROSERVICE 㱺 NOT SCALABLE 㱺 NOT RESILIENT
  9. ALLOWS FOR LOCATION TRANSPARENCY ONE COMMUNICATION ABSTRACTION ACROSS ALL DIMENSIONS

    OF SCALE CORE 㱺 SOCKET 㱺 CPU 㱺 CONTAINER 㱺 SERVER 㱺 RACK 㱺 DATA CENTER 㱺 SYSTEM
  10. 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)
  11. The truth is the log. The database is a cache

    of a subset of the log. — Pat Helland
  12. THE LOG IS A DATABASE OF THE PAST NOT JUST

    A DATABASE OF THE PRESENT
  13. In general, application developers simply do not implement large scalable

    applications assuming distributed transactions. — Pat Helland
  14. IN SUMMARY 1. Don't build Microliths 2. Microservices come in

    (distributed) systems 3. Microservices come as (micro)systems 4. Embrace the Reactive principles 5. Embrace Event-first DDD & Persistence 6. Profit!