Justified Code/Modernizing a Monolithic Application

You're signing up to receive emails from Justified Code.

  • Free email delivery

Modernizing a Monolithic Application

  • Download
  • 1 File

Traditionally, monolithic applications run in a single process, use one data store, and run on servers that scale vertically. Modern services run across the network, use more than one data store, scale horizontally, and have independent fault domains. This guide provides guidance for implementing modernization design patterns that let you add new features, and migrate existing ones without disrupting the business.

You're signing up to receive emails from Justified Code.

It is the combination of design patterns that matters.

Replace a legacy system without business disruption

A monolithic application using a single relational database goes through the following steps to reach modern architecture.

Step1: Start With the Existing Monolith

One worker process application, one database.

Step 2: Introduce a Proxy (Strangler Facade)

The first step in the strangler fig pattern is to add a strangler in front of the monolith. At the start, the strangler (proxy) routes all traffic to the monolithic application.

Step 3: Add a New Service

New features are not added to the existing monolith. You implement them as a new service (Payroll). Meanwhile, you continue fixing bugs in the monolith.

Step 4: Migrate One Service

Now select one domain (Account) function inside the monolith and move it out along with the data it owns. You do not touch the monolith code yet.

Step 5: Add an Anti-Corruption Layer (ACL)

The account service has been migrated to a new service. However, the transfer service calls the account service for balance checks and other functions.

To address this challenge, you implement an ACL to convert the calls to the new service contracts and route them to the appropriate service.

Step 6: Sync Data During Transition

Modern services own their data, which means the account service stores its data in its own data store. The problem now is that existing legacy systems might need that same data for reporting and other functions.

Step 7: Migrate Another Service

It is time now to migrate the Email service following the same ACL approach. The difference here is that we decided to write email requests as message broker events. The legacy way of doing that is to directly contact a local SMTP server.

Step 8: Retire the Monolith

Once all services have been separated and traffic is routed to new services, the legacy system has no responsibilities left thus can be decommissioned.

Contents

PDF Files

Modernizing a Monolith App V1.0.pdf
  • 5.46 MB