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

How to disassemble a monolith into microservices (#daje version)

SeeSaw
March 18, 2016

How to disassemble a monolith into microservices (#daje version)

There's a huge interest around microservices and microservice architecture... almost every IT conference has a session about it.
A clear idea of the benefits/pitfalls that this approach brings is crucial for a successful adoption in a project.

In this presentation I share some of the experiences made during the dismantling a monolithic application into microservices.
I analyze some of the reasons justifying the adoption of this type of architecture, talk about the most important issues to consider and reveal some approaches that have been successful in our experience.

Topics (among others): microservices, monolith, communication, async messaging, rabbitmq, circuit breaker, conway law, devops, sacrificial architecture.

Talk presented at Codemotion 2016 in Rome.

Note: This is a adapted version of the presentation, without effects and animations.

SeeSaw

March 18, 2016
Tweet

More Decks by SeeSaw

Other Decks in Programming

Transcript

  1. DISCLAIMER ̣my personal opinion ̣people have different experiences ̣ideas, comment,

    etc contact me @realfuzzy ̣subject is wide, so I’d love to hear your thoughts :-) ̣It’s not a code talk (but you can see some sources)
  2. BUAHAHAHAHA! I AM THE MONOLITH! COME TO THE WORLD TO

    BRING IMMOBILISM AND COMPLEXITY!
  3. WHY MICROSERVICES • suite of small services • running in

    its own process • communicating with lightweight mechanisms • built around business capabilities • independently automated deployable • technology agnostic
  4. - additional complexity of a distributed system - tools/IDEs are

    monolithic applications oriented - testing is more difficult - must implement the inter-service communication - increase memory consumption
  5. AGENDA* ✓ what’s a microservice? ✓ why have I to

    jump in ? • where I can start from ? • how I should be aware of ? * I know, I know, I lied about the agenda
  6. – Martin Fowler, Chief Scientist - ThoughtWorks “…don’t even consider

    microservices unless you have a system that's too complex to manage as a monolith”
  7. – Sam Newman, author of Building Microservices “I remain convinced

    that it is much easier to partition an existing […] system than to do so up front… You have more to work with.”
  8. Q0: HOW TO DECOMPOSE A MONOLITH? 1. Identify business boundaries

    2. start decomposing each into own microservice 3. follow the Single Responsibility Principle 4. goto :2
  9. Sir. Tools A warrior that can use every kind of

    tool as a weapon Strateky Sensei Master renowned for its strategic and tactical ability Workodoo Master The work-force is strong with this one
  10. OUR CHOICE ☛ RABBITMQ • AMPQ message broker • Erlang

    • Fast, reliable, secure • Many clients • Commercial support
  11. 9XL

  12. – Melvin Conway, 1968 “organizations which design systems … are

    constrained to produce designs which are copies of the communication structures of these organizations”
  13. – Martin Fowler, Chief Scientist - ThoughtWorks “For many people

    throwing away a code base is a sign of failure, perhaps understandable …, but still failure.”
  14. The Smith Master craftsman expert in forging anything The Sculptor

    An artist able to give shape to magnificent works The Painter Colors and shapes come to life on her canvas!
  15. TAKEAWAYS ̣ go monolith first ̣ communication (all-around) is strategic

    assets ̣ start simple, then don’t fear the change ̣ take decisions, I-REALLY-MEAN-THAT
  16. …WHAT’S NEXT ? • testing • CQRS + ES •

    log analisys & monitoring • metrics • …