On Thursday, August 27th, I presented to the Online ColdFusion Meetup on modernizing monolithic apps. The presentation had two sections, one relating to the enterprise architecture strategy for monolithic modernization; the other section highlighted the ColdFusion API Manager – a technology-agnostic platform to create REST or SOAP APIs. The presentation was received well by the audience who participated with many comments and questions. The link to my blog post discussing the API Manager portion is here.
What is a Monolithic Application?
A monolithic application is a single-tiered software application in which the user interface and data access code are lumped together in a single program on a single platform. Monolithic application design goes back for many years. You can find examples of monolithic applications almost anywhere, but most certainly in environments where applications live a long time.
What is wrong with Monolithic Application Design?
Monolithic applications are complex by nature. Since the software’s user interface portions are wired directly into the data access layer and business logic, it is hard to maintain monoliths. It’s also hard to upgrade the user interface or respond to market forces in user interface needs, like Single Page Applications or Voice Interfaces. More importantly, it is extremely hard to share functionality with other applications due to the inability to make direct calls to the data access layer.
The image above shows 4 dominant architectural periods. Some apps written in an older style have been upgrades, some have been left hanging.
How to Modernize the Monolith
The main idea is to wrap your monolith inside of a digital fence. Use the digital fence to control access to the monolith. While this is easy to say, it can be complex to take on due to the circumstances in your environment. It is still worth doing so you can control the monolith, and share or upgrade the parts that make sense. In the image below you can see we have separated our spaghetti from the outside world and only allow access in and out of controlled doors. This metaphor explains where the APIs fit in strategically. An important point is you don’t need to completely rewrite the application, just to fence off the complexity and make available the parts that make sense to the outside world.
The Progressive Migration strategy assumes that completely rewriting the application is not in the budget. While some would prefer to do a total rewrite, these projects almost always fail because of hidden complexity, poor documentation of features, and the swirling and different architectural standards in place throughout the application. Sometimes, it can be like examining the rings on a tree.
Progressive Migration involves fencing off portions of the application then sharing those fenced off pieces back to the application in the form of APIs. That way, all consumers are using the same pipes for consistency. Most monoliths have a practical limitation of what makes sense to fence off, and what makes sense to just leave in place. It’s up to your professional judgment where that line is. Just know it doesn’t all have to be converted to APIs if it isn’t necessary. Consider the “Hard Stuff” in the image below to be like the junk drawer in your kitchen, it’s not perfect, but nothing else makes sense either and we must go with pragmatism as the rule of the day.
What Should you Break Out into APIs?
The short answer to this question is to identify the contexts or types of concerns in your application. The best ones are the ones that you’ll need to share, or scale. APIs are sharable with other applications and systems. APIs are also more scalable because they only contain that particular context, thus the appropriate scaling strategy can be used (horizontal, vertical, caching, etc). In the example below, I’ve blocked out the contexts that can be found in a typical eCommerce application as well as broken out a sensible set of API actions for the Authentication portions. By exposing the Context/Action, you can hide the complexity needed to actually make this work, while allowing other consumers to make use of the context/action pair.
Where to Go for More Info
- Watch the recording of the presentation. I cover this topic in the first half.
- Download a version of the presentation files. Be sure and check the notes section for enhanced detail.
- Contact us if you want help understanding your modernization options. We have experience with all sorts of technology and specialize in modernizing important applications.