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

Microservices

 Microservices

What is the microservices architecture and how it compares to other popular architectural styles?

Julian Espinel

February 14, 2015
Tweet

More Decks by Julian Espinel

Other Decks in Programming

Transcript

  1. Agenda 1. A few software architectural styles (fast!) 2. Microservices

    architecture a. What is it? b. How old is this style? c. Why to use microservices? 3. Comparison between styles a. Monolithic b. SOA c. Microservices
  2. Agenda 4. Benefits and challenges a. Technical b. Management 5.

    Should I use microservices? a. Yes, if you love challenges! b. Yes, if you want to learn and have fun! 6. Advice to implement microservices a. Technical b. Management
  3. 1. A few software architectural styles (fast!) What are we

    going to evaluate? 1. Development 2. Tracing (debugging) 3. Testing 4. Deployment 5. Scalability 6. Maintainability
  4. 1. A few software architectural styles (fast!) Monolithic 1. Development

    2. Tracing (debugging) 3. Testing 4. Deployment 5. Scalability 6. Maintainability
  5. 1. A few software architectural styles (fast!) SOA 1. Development

    2. Tracing (debugging) 3. Testing 4. Deployment 5. Scalability 6. Maintainability
  6. 1. A few software architectural styles (fast!) Microservices 1. Development

    2. Tracing (debugging) 3. Testing 4. Deployment 5. Scalability 6. Maintainability
  7. 2. Microservices architecture Each service: 1. Responsible for a business

    capability. 2. Run in its own process. 3. Independently deployable.
  8. 2. Microservices architecture What does a piece of software need

    in order to be independently deployable?
  9. 2. Microservices architecture Each service: 1. Responsible for a business

    capability. 2. Run in its own process. 3. Independently deployable.
  10. 2. Microservices architecture How to communicate your services? As always

    in software architecture it depends on your needs. But...
  11. 2. Microservices architecture Ask yourself these questions: 1. Am I

    designing to scale? 2. Are my microservices fault tolerant? 3. Does my architecture have SPOFs? 4. Will the architecture be maintainable over the time? 5. Could I evolve the system without breaking clients?
  12. Monolithic 1. Development 2. Tracing (debugging) 3. Testing 4. Deployment

    5. Scalability 6. Maintainability 3. Comparison between styles
  13. SOA 1. Development 2. Tracing (debugging) 3. Testing 4. Deployment

    5. Scalability 6. Maintainability 3. Comparison between styles
  14. Microservices 1. Development 2. Tracing (debugging) 3. Testing 4. Deployment

    5. Scalability 6. Maintainability 3. Comparison between styles
  15. 4. Benefits and challenges Benefits -> Technical 1. Design for

    scale. 2. Improve system availability. 3. Pick the best languages and tools according to the task. 4. Build a service once, then reuse it.
  16. 4. Benefits and challenges Benefits -> Technical 5. Small services,

    less code per service, improve maintainability per service.
  17. 4. Benefits and challenges Benefits -> Management 1. Develop services

    independently. 2. Create interdisciplinary teams. 3. Work in small teams.
  18. 4. Benefits and challenges Challenges -> Technical 1. How to

    test integration between services? 2. How to test integration between services and clients? 3. How to deploy? Centralized or Distributed? 4. CAP theorem.
  19. 4. Benefits and challenges Challenges -> Technical 5. Service discoverability?

    6. How to maintain systems written in different programming languages? Do you have devs for that?
  20. 5. Should I use microservices? Again: as always in software

    architecture it depends on your needs and everything is a tradeoff.
  21. 6. Advice to implement microservices Design your system (set of

    microservices) by business responsibility.
  22. 6. Advice to implement microservices Make sure you have a

    reasonable unit tests coverage and CI. "Only then you will go home and rest in peace."
  23. 6. Advice to implement microservices Measure, measure, measure! Are your

    systems up? Do we need to scale now? May be in 15 minutes?
  24. 8. References 1. http://martinfowler.com/articles/microservices.html 2. http://www.thoughtworks.com/insights/blog/microservices-nutshell 3. http://sanderhoogendoorn.com/blog/index.php/microservices-the-good-the- bad-and-the-ugly/ 4.

    http://microservices.io/patterns/monolithic.html 5. https://msdn.microsoft.com/en-us/library/ee658117.aspx 6. https://msdn.microsoft.com/en-us/library/aa480021.aspx 7. http://www.javaworld.com/article/2071889/soa/what-is-service-oriented-arc hitecture.html