IT Managers looking to modernize are increasingly finding salvation in the Strangler Application Pattern, an incremental approach theorized by Martin Fowler fifteen years ago.
Sitting on top of a monolith
Managers of mission-critical legacy systems face big challenges when called upon to usher them into the modern age. These systems, many of which are many decades-old running millions of lines of accumulated code, need to perform in realtime yet continuously evolve. Staying put isn’t an option.
The many and varied contributors – perhaps including temporary or overseas contractors, using different approaches, tools, and code generators – tend to create a patchwork that is tricky to maintain.
Many organizations are under heightened pressure as the remaining architects and software engineers have planned retirements, or have already left. There may be no accurate documentation around to help guide new work as these important players say goodbye.
Thinking About the Future
So here you are, with loads of accumulated technical debt, requiring lots of ongoing maintenance, and with little flexibility to scale individual parts or develop new features. Regular deployment is difficult with all the component interdependencies and potential code breakage. Folks on the front lines, particularly the younger ones, expect modern features on the front end.
You might find it difficult to explain the layers of complexity and time involved to implement the new features they’re looking for. Even simple features such as a reactive user experience or new data feeds may be time consuming to implement.
Perhaps most importantly, management wants you to bring the company’s critical systems into the future and spend their money wisely.
So you start thinking about what to do next.
You might already be considering a “Big Bang” rewrite, or a major package implementation. You know it’s risky. You imagine a big, hair-raising cutover at the final stage of the project, which may be the first time you realize that critical business rules have been missed, or incorrectly implemented.
You may already be considering implementing RPA (robotic process automation), BPA (business process automation), or a new responsive UX, but don’t know where or how to implement these technologies in a way that speeds development, rather than creating a dual-maintenance and brittle architecture that takes you backwards rather than forwards.
A New Plan of Action
Enter the Strangler Application Pattern.
Martin Fowler introduced the Strangler Application Pattern, an incremental approach to replacing old monolithic computer systems, way back in 2004, prompting CTOs and IT administrators to rethink how they might move to a brand new system from the old.
Fowler describes how he came across the idea when he witnessed the natural wonders of the Strangler Figs’ long descending branches while on a trip with his wife in the rainforests of Australia. He imagined that it was a great metaphor for replacing a big old system with a new one.
At the time, he had been thinking about the risks that come with that big final cutover to the new system.
The Strangler Fig inspired a new option:
“An alternative route is to gradually create a new system around the edges of the old, letting it grow slowly over several years until the old system is strangled.”Martin Fowler
The basic idea is to slowly build a new application, piece by piece, in parallel with the old one. When the new application functionally replaces all of the old, the legacy app is effectively dropped (or “strangled”).
Along Came Microservices
Although the Strangler Pattern was introduced 15 years ago, it finds new life with the emergence of microservices architecture, making it a compelling option. It’s also a good way to adopt microservices if that’s your primary goal.
These are the types of projects that might benefit from using the Strangler Pattern to govern your efforts:
- Implementing Microservices for the first time
- Migrating platforms, or to the cloud
The first step is to build an intercept between the user and the legacy application to distribute all request traffic to the legacy application and the growing microservices. The intercept is often called a router, proxy, or facade.
With the intercept in place, you can start the “Strangler” process by adding the first bit of encapsulated code or microservice. It’s often suggested to start with a smaller, manageable function to test and get the process working. Once that’s complete, tested, documented and deployed, you can move on to the next process if you find that Strangler process and/or microservices architecture suits your goals.
Eventually, the traffic to the monolith grows smaller and the microservices take the load. When it’s all microservices, the monolith can be turned off.
FIG 1: How the Strangler Pattern Works
Approaching modernization with the Strangler Pattern can seriously reduce risk compared to a “Big Bang” project.
Better yet, a host of other smaller but meaningful benefits flow from the bigger-picture risk-reduction. You can realize in-production system upgrades earlier. You can test the waters quickly and at low-cost to see if the approach (or even microservices) works for you. You can address constituent needs methodically, one at a time or in groups, rather than all at once. Overall, you have much greater flexibility.
Once you test and implement that last microservice or function, your cutover is effectively done. Just decommission the old one.
The biggest challenge to using the Strangler Pattern with microservices is the new tracking that’s needed along with it. Monitoring and documenting all of the new self-contained code (microservices if you’re using them) is required.
But shouldn’t that be done anyway? At the very least, your future self will certainly think so, and be grateful that you did it.
Getting Started: Get a Handle on Your Legacy Code Quickly
CM evolveIT can help tame the millions of lines of code in your enterprise legacy system with Automated Analysis and put you on a rock-solid path to modernization management will love. CM First works with a variety of languages on the IBM i and z platforms: COBOL, RPG, Java, C++, C# to name a few, and code generator models such as CA 2E (Synon), CA Plex, and IBM EGL.
Maintenance analytics software uniquely created for enterprise application modernization, CM evolveIT reduces discovery time by 80% through compiler technology that automatically finds and documents business rules and system interactions.
Request a demo, or simply get in touch.
Read Martin Fowler’s original 2004 article introducing the Strangler Application Pattern concept.
From IBM Dev: Apply the Strangler Application pattern to microservices applications. Be sure and catch the video while you’re there.
Strangler Application Pattern in the real world: Paul Hammet has a good article highlighting strangler pattern case studies.