Friday, November 17, 2023

Monolith Controller Client

Monolith Controller Client Pattern

Monolith Controller Client Pattern solves complexity involved in exposing a Monolith Java Class into Rest API. By using this pattern, you can easily execute the Monolith Code ( Methods ) as service end points. It ensures that your other classes of Monolith Application are working seamlessly and are able to call the methods of the sliced Monolith Java Class without any modification, after you perform Lift and Shift of the Monolith Class.

This is part of "Lift & Shift of Monolith " Group of Architecture Patterns.

Problems addressed

Below are the problems that you face when you want to slice a single Java Class from a Monolith App.

  1. If you change the syntax ( Name or parameters) of methods of the Java class, it will break the consumer classes and you have to rewrite them as well. The Efferent and Ifferent Coupling will break.

  2. It will become mandatory for you change each and every dependent class, which will be a huge effort.    

 How we solve the Problems

  1. We implement "Monolith Controller Client " Pattern. This class  will have the same method syntax of each public method of the Java Monolith Class. This includes Getter and Setters as well as service methods ( Business Functions )

  2. We replace the body of the Monolith Java Class with this Monolith Controller Client class. This class is capable of calling the "Wrapper Controller" for executing the monolith class methods remotely.
     
  3. The "Monolith Controller Client" is helped by Json Convertors which converts the method data types to Json and vise-versa so that it can send and receive parameters over the REST API Calls.
     
  4.  The "Monolith Controller Client" ensures that all dependent classes are still able to call the monolith class methods without any change.

Monolith Controller Client Architecture Pattern 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