Giter Club home page Giter Club logo

refactoringthemonolith's Introduction

Refactoring the Monolith: LIVE!

Many of us would love to embrace microservices in our day-to-day work. But most of us don’t have the opportunity to start over with a pure greenfield effort. We have to understand how to refactor our existing monolithic applications toward microservices. Practical steps include building new features as microservices, leveraging anti-corruption layers, strangling the monolith.

In this presentation we’ll go light on the theory and walk through the actual process of turning a strawman monolith into a family of well-factored microservices.

The Story

The Monolito brothers started their dream business of running their own chain of pizza parlors. They’ve expanded their business to include 20 locations across a large metro area, and they want to expand to other cities and states. Their original careers were as software engineers, so naturally they built their own systems to manage their business. These systems included:

  • an online ordering system for customers to place pizza orders via the web

  • a dispatch system to send these orders to the correct store locations

  • a menu management system to keep up with all of the allowable pizza combinations, toppings, etc.

As they’ve grown their business, they’ve felt pressure from their customers to add additional features that “the big pizza chains” have, such as:

  • managing multiple customer addresses

  • reordering past orders

  • managing coupons

  • tracking the status of an order

  • conducting business via mobile devices

Their current system is very monolithic and is deployed at every store! As their software development team has grown in size to meet their customers' demands, they’ve become paralyzed by the difficulty of adding new features to an ever-growing codebase that must be redeployed to every Monolito’s Pizza location with every change.

Recently the Monolito brothers learned about the promise of microservices architectures enabling continuous delivery of business value. They’ve contracted our team of consultants to help decompose their monolith so that they can get back on track.

A Tour of the Refactoring

The refactoring can be traced through a series of tagged commits:

monolith-v1

version 1 of the monolitos monolith

refactoring-v1

Independent Deployability of Store and Site

refactoring-v2

Finish Up Store Order Details Feature

refactoring-v3

Decouple the Contract between Site and Store

refactoring-v4

Implement Order Tracking Updates as Microservices

refactoring-v5

Separate Store UI from Store Service

refactoring-v6

Integrate Store Microservices via Spring Cloud

The refactoring is documented here in detail.

What this Presentation “Punts” On

While these subtopics deserve consideration, in the interest of fitting in to the allotted time (90 minutes), I simply couldn’t include everything. I also wanted to focus on the decomposition of the business functionality, and not on the tedium of technology stack migration:

  • J2EE/Java EE to Spring Migration

  • Classic Spring to Spring Boot Migration

  • Polyglot Persistence

  • Distributed Transactions, Event Sourcing/CQRS

  • Fancy, modern, Javascript-y web UI’s - I am not a UI developer.

  • Separating the projects into individual Gradle builds for maintenance by separate teams (only for expediency!).

  • Securing the interactions between various microservices (for now!).

Background Reading

Here is a list of resources that you can review before attending the session to provide useful context.

Books

refactoringthemonolith's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.