Friday, November 17, 2023

Lift And Shift of Monolith Group Of Architecture Patterns

Lift And Shift Of Monolith


 

History

Developer community is busy with Digital Transformation & Application Modernization activities. There are many projects where huge resources are invested to convert Java Monolith Applications into Microservices. The Goal is to realize a cloud native application, which can be scaled individually, manageable by a feasible sized team and is responsive.

We see many articles which talks about "Lift and Shift" of Applications when you move from on-premises to public clouds, but they don't help you when it comes to Monolith Application.

Since 2016, we focused on solving this challenge and find out a way to enable "Lift And Shift of Monolith". We identified the challenges and prepared a strategy around this. Finally, we came up with our first Best Practices which was foundation towards achieving our Automation Goal of Lift And Shift and was published under the heading of Application Modernization in 2019.

We involved into heavy development activities and came up with our first application which demonstrated the Automation using which we can quickly Lift And Shift Monolith class into Microservice. We also hosted an Opensource project with this code so that the developer community can get benefited with this innovation. The user guide and tutorial for the same was nicely described under the Heading Monolith to Hybrid Architecture in 1 Hour. in 2020.

The enhancement of our Tool continued and by 2023, we have deployed the tool on the cloud and is made available as SAAS to our clients, with extensive functionalities.

We identified the Architecture Patterns which can solve the complexities involved in the "Lift And Shift of Monolith", hence it gave birth to "Lift And Shift of Monolith" Group of Architecture Patterns.


Problems addressed

You can transition from Monolith to Hybrid using Strangler Pattern.
 
While Hybrid Architecture allows you to use Monolith Application and it is one of the component within Modernization, arriving to that state has its own challenges, which can be listed as follows:
  1. Manual modification of Monolith App code is time consuming.
  2. Executing modified code of Monolith App involves more than trivial efforts.
  3. Realization of benefits of Hybrid Architecture is realized only after substantial effort and time is invested over the transition of the Monolith Application. 
  4. Inter-Service communication and Monolith communication channels can add complexity to the Architecture.
  5. We need to save our Architecture from implementing Anti-patterns.
We want to break a Monolith Application into A Hybrid Architecture. This approach can be as complex as the Application itself, while very simple at Microlevel.

Monolith Application is primarily complex with respect to Architecture for:

  1. Monolith Application has huge code base.
  2. Individual Classes( DAO, VO, Service, etc) are tightly coupled
  3. The VM for their execution is generally shared.
  4. Analysis & Mapping of dependencies takes huge efforts.
  5. Vertical Slicing becomes very complex and iterative due to coupling.

 Unique Approach to Transformation

We want to break a Monolith Application into A Hybrid Architecture. This approach can be as complex as the Application itself, while very simple at Microlevel.

Monolith Application is primarily complex with respect to Architecture for:

  1. Monolith Application has huge code base.
  2. Individual Classes( DAO, VO, Service, etc) are tightly coupled
  3. The VM for their execution is generally shared.
  4. Analysis & Mapping of dependencies takes huge efforts.
  5. Vertical Slicing becomes very complex and iterative due to coupling.

 

How we solve the Problems

We identified best practices and other solutions and came up with a Strategy to minimize the risk and quickly realize Hybrid Architecture.

  1. Take Bottom-To-Top Approach
  2. No Change in Efferent Coupling of the Class
  3. Add Webclient to Dependee Class
  4. Expose Dependee Class over REST
  5. Use Stripped Monolith Application with MVC Wrapper Application
 This strategy is documented in detail at Monolith To Hybrid Strategy
 

Birth of "Lift And Shift of Monolith" Group of Architecture Patterns

 

  1. Wrapper Controller: Responsible to expose Monolith over REST API.
  2. Monolith Class Bridge: Facilitates Communication between Wrapper Controller and the Monolith Class.
  3. Monolith Controller Client: Responsible for maintaining Efferent Coupling of other classes of the Monolith and making REST Call to Wrapper Controller.

Initial Architecture

Fig 1: We have Class A, B &C within our Monolith Application. For Vertical slicing, if we process Class B, keeping its structure intact, Monolith Application can still function with modified class.

Target Architecture with applied Patterns



Fig 2: We have Class A, B &C within our Hybrid Application. Vertical slicing of Class B. Wrapper Controller, Monolith Class Bridge & Monolith Controller Client are introduced to the architecture.

 

 

Lift And Shift of Monolith" Group of Architecture Patterns in Action

This pattern is used by Digital Transformation Tools. You can refer to below videos to understand how this pattern helps in Digital Transformation.


1) CodaGeeks Digital Transform Tool:
This Tool helps you to transform your Java Monolith Class into Microservice. This tool is also available as an service ( SAAS ). Refer http://www.codageeks.com for more details.

 
 
 
 
       2)  Miracle Open Transform:
     This is an Open Source project hosted on git hub. It has code which               implements this and other "Lift and Shift Monolith" group of patterns.






What is an Architectural Pattern?

According to Wikipedia,

An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. Architectural patterns are similar to software design pattern but have a broader scope.

At Miracle Labs, we constantly innovate around real time problems and try to find solutions. While we were attempting early Digital Transformation Projects, we solved complex problems.










No comments:

Post a Comment