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

Divide and Conquer: Send Forth The Microservices

Divide and Conquer: Send Forth The Microservices

Have you ever had one of those uneasy nights hoping you don’t get a call saying that some part of an application brought a system down? So have I. Monolithic applications can be a powerful strategy in technical systems, but can crumble against certain opponents. Microservices combat those weaknesses using division and multiplication.
We will explore how microservices divide functionality and responsibility and multiply their forces to handle load and complexity. We will look at the pros and cons of this structure and evaluate it for real business use, then take our plans to the field through live coding and see whether our solution is a viable strategy.

Code repository: https://github.com/JMHReif/nodes-microservices-demo

Jennifer Reif

November 17, 2022
Tweet

More Decks by Jennifer Reif

Other Decks in Technology

Transcript

  1. Divide and Conquer:
    Send Forth the Microservices
    Jennifer Reif
    Email: [email protected]
    Twitter: @JMHReif
    LinkedIn: linkedin.com/in/jmhreif
    Github: github.com/JMHReif
    Website: jmhreif.com

    View full-size slide

  2. Who Am I?
    • Developer + Advocate

    • Continuous learner

    • Technical content writer

    • Conference speaker
    Jennifer Reif
    Email: [email protected]
    Twitter: @JMHReif
    LinkedIn: linkedin.com/in/jmhreif
    Github: github.com/JMHReif
    Website: jmhreif.com

    View full-size slide

  3. Monolith
    What is it?
    • Functionality in single app

    • Intentional or morphed over time

    • Pros:

    • One-and-done

    • Less communication

    • Cons:

    • Find/reuse code, Implement
    fi
    xes

    • Resource consumption, Handle failures
    Photo from Google Images

    View full-size slide

  4. Microservices
    What are they?
    • Small applications for limited/single function

    • Only necessary communication

    • Pros:

    • Independent, Small footprint

    • Reliable, Scalable

    • Cons:

    • Testing, communication coordination

    • Additional layers/operations
    Photo from Google Images

    View full-size slide

  5. Note!
    Monolith vs microservices
    • Neither solution is a silver bullet

    • Simplicity and complexity exist in both!

    • ALSO, classi
    fi
    cation of micro services varies

    • Scope of functionality

    • Async vs sync communication

    • Level of automation

    View full-size slide

  6. Demo architecture - start
    Backend Frontend

    View full-size slide

  7. Layer3 - client
    Layer2 - data API
    Layer1 - backend
    Docker-compose
    Demo architecture - end
    Backend
    Frontend
    Con
    fi
    g service
    Neo4j - Book reviews

    View full-size slide

  8. Let’s Code!

    View full-size slide

  9. Resources
    Code and learning more…
    • Today’s code: github.com/JMHReif/nodes-microservices-demo

    • All Code (levels 1-10): github.com/JMHReif/microservices-java

    • Blog: jmhreif.com/blog

    • Neo4j graph database: dev.neo4j.com/aura-java
    Jennifer Reif
    Email: [email protected]
    Twitter: @JMHReif
    LinkedIn: linkedin.com/in/jmhreif
    Github: github.com/JMHReif
    Website: jmhreif.com

    View full-size slide