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

From monoliths to microservices

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for Danny Burkes Danny Burkes
September 27, 2018
440

From monoliths to microservices

Avatar for Danny Burkes

Danny Burkes

September 27, 2018
Tweet

Transcript

  1. © Copyright 2018 Pivotal Software, Inc. All rights Reserved. Version

    1.0 Danny Burkes @dburkes Slides available at https://speakerdeck.com/dburkes From monoliths to microservices What, how, and why
  2. • A single codebase- typically, a single repository • Owned

    and maintained by a single, sometimes large, team Characteristics of a monolith
  3. Characteristics of a monolith • A single codebase- typically, a

    single repository • Owned and maintained by a single, sometimes large, team • Built and deployed as a single unit
  4. • A single codebase- typically, a single repository • Owned

    and maintained by a single, sometimes large, team • Built and deployed as a single unit • May be deployed frequently or infrequently Characteristics of a monolith
  5. • A single codebase- typically, a single repository • Owned

    and maintained by a single, sometimes large, team • Built and deployed as a single unit • May be deployed frequently or infrequently • Moderate- to high-risk deployments Characteristics of a monolith
  6. • A single codebase- typically, a single repository • Owned

    and maintained by a single, usually small team Characteristics of a microservice
  7. • A single codebase- typically, a single repository • Owned

    and maintained by a single, usually small team • Independently evolvable Characteristics of a microservice
  8. • A single codebase- typically, a single repository • Owned

    and maintained by a single, usually small team • Independently evolvable • Autonomously deployable Characteristics of a microservice
  9. • A single codebase- typically, a single repository • Owned

    and maintained by a single, usually small team • Independently evolvable • Autonomously deployable • Governs its own state Characteristics of a microservice
  10. • A single codebase- typically, a single repository • Owned

    and maintained by a single, usually small team • Independently evolvable • Autonomously deployable • Governs its own state • Incorporates resiliency patterns Characteristics of a microservice
  11. • A single codebase- typically, a single repository • Owned

    and maintained by a single, usually small team • Independently evolvable • Autonomously deployable • Governs its own state • Incorporates resiliency patterns • Encapsulates a single domain model Characteristics of a microservice
  12. Characteristics of a microservice • A single codebase- typically, a

    single repository • Owned and maintained by a single, usually small team • Independently evolvable • Autonomously deployable • Governs its own state • Incorporates resiliency patterns • Encapsulates a single domain model • May be deployed very frequently
  13. Characteristics of a microservice • A single codebase- typically, a

    single repository • Owned and maintained by a single, usually small team • Independently evolvable • Autonomously deployable • Governs its own state • Incorporates resiliency patterns • Encapsulates a single domain model • May be deployed very frequently • Lower-risk deployments
  14. • Each microservice should be an independent, autonomous, empowered team

    • These teams must collaborate very closely to avoid deadlock Implications of adopting microservices
  15. • Each microservice should be an independent, autonomous, empowered team

    • These teams must collaborate very closely to avoid deadlock • Microservices must adopt things like automated service discovery, circuit breaker patterns, etc., to automate as much of the coordination as possible Implications of adopting microservices
  16. • Each microservice should be an independent, autonomous, empowered team

    • These teams must collaborate very closely to avoid deadlock • Microservices must adopt things like automated service discovery, circuit breaker patterns, etc., to automate as much of the coordination as possible • You need a deployment platform that supports your teams in working like this Implications of adopting microservices
  17. Implications of adopting microservices • Each microservice should be an

    independent, autonomous, empowered team • These teams must collaborate very closely to avoid deadlock • Microservices must adopt things like automated service discovery, circuit breaker patterns, etc., to automate as much of the coordination as possible • You need a deployment platform that supports your teams in working like this • If microservice boundaries aren’t aligned with the change dimensions of the business, you’ll realize little (maybe negative) benefit
  18. Implications of adopting microservices • Each microservice should be an

    independent, autonomous, empowered team • These teams must collaborate very closely to avoid deadlock • Microservices must adopt things like automated service discovery, circuit breaker patterns, etc., to automate as much of the coordination as possible • You need a deployment platform that supports your teams in working like this • If microservice boundaries aren’t aligned with the change dimensions of the business, you’ll realize little (maybe negative) benefit • If you don’t get all of this right, it can be way worse than a monolith
  19. • Use techniques like Domain Driven Design and Event Storming

    • Identify and expose core business domains Existing monolith to microservices
  20. • Use techniques like Domain Driven Design and Event Storming

    • Identify and expose core business domains • Identify bounded contexts, aggregates, and commands Existing monolith to microservices
  21. • Use techniques like Domain Driven Design and Event Storming

    • Identify and expose core business domains • Identify bounded contexts, aggregates, and commands • Identify risks and potential trouble spots Existing monolith to microservices
  22. • Use techniques like Domain Driven Design and Event Storming

    • Identify and expose core business domains • Identify bounded contexts, aggregates, and commands • Identify risks and potential trouble spots • A obvious starting point usually emerges quickly Existing monolith to microservices
  23. • Google “event storming” and “domain driven design” and start

    pulling on some of those threads • Google “Should that be a Microservice?” and find Pivotal’s blog series • Read Domain-Driven Design Distilled, by Vaughn Vernon • Watch this video: http://bit.ly/dburkes-stack2018 • Try these analysis techniques on one of your existing monolithic apps! Next steps
  24. • Use the same techniques to identify the bounded contexts

    of a monolithic application that we are building Towards better monoliths
  25. • Use the same techniques to identify the bounded contexts

    of a monolithic application that we are building • Implement the contexts separately, enforcing the boundaries, but assemble it all into a single monolithic application for deployment Towards better monoliths
  26. • Use the same techniques to identify the bounded contexts

    of a monolithic application that we are building • Implement the contexts separately, enforcing the boundaries, but assemble it all into a single monolithic application for deployment • The quick-start and conceptual simplicity of a monolith, with a clear path to extracting services when the time is right to do so Towards better monoliths
  27. • Google “modular monoliths” and start pulling on some of

    those threads • Visit http://www.appcontinuum.io for a practical approach, including code • Try it on your next greenfield monolithic app! Next steps
  28. Transforming How The World Builds Software Slides available at https://speakerdeck.com/dburkes

    © Copyright 2018 Pivotal Software, Inc. All rights Reserved.