Migrating production monolithic systems to microservices using aspect oriented programming

Several organizations need to address the challenge to migrate current traditional monolithic applications in production to microservices, preferably, without having to schedule maintenances to take the application offline. This article presents an approach for migrating to microservices with almost zero downtime and minimal changes in the monolithic code. The approach is based on the concepts of aspect‐oriented programming (AOP) and reflection to enable to intercept calls inside the monolith and transform them into service requests invoking the newly built microservices using the concept of around advices. The aspects do the “dirty work” of decoupling what will be refactored and which service to call and practically “zero” code changes need to be done in the original monolithic code. This enables one key novel contribution of our migration approach which is the ability to revert code and data changes without having to take the system offline. Two applications are used as proofs of concept to demonstrate that the proposed approach enables to go “forward” or “backward” among different versions of the application with minimal code or data changes. An evaluation performed in the cloud demonstrates that this work does not introduce significant performance or cost overhead when compared to the current state of the art and to the original monolith.

[1]  Nabor das Chagas Mendonça,et al.  Performance Inference: A Novel Approach for Planning the Capacity of IaaS Cloud Applications , 2015, 2015 IEEE 8th International Conference on Cloud Computing.

[2]  Ricardo Terra,et al.  Towards a Technique for Extracting Microservices from Monolithic Enterprise Systems , 2016, ArXiv.

[3]  Paul Clements,et al.  Software architecture in practice , 1999, SEI series in software engineering.

[4]  SERGEI KOJARSKI,et al.  Aspectual Reflection , .

[5]  Nabor das Chagas Mendonça,et al.  Cloud Crawler: a declarative performance evaluation environment for infrastructure‐as‐a‐service clouds , 2017, Concurr. Comput. Pract. Exp..

[6]  Gunter Bolch,et al.  Queueing Networks and Markov Chains , 2005 .

[7]  Patricia Lago,et al.  Migrating Towards Microservice Architectures: An Industrial Survey , 2018, 2018 IEEE International Conference on Software Architecture (ICSA).

[8]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[9]  Francesca Arcelli Fontana,et al.  Tool Support for the Migration to Microservice Architecture: An Industrial Case Study , 2019, ECSA.

[10]  Myron Hlynka,et al.  Queueing Networks and Markov Chains (Modeling and Performance Evaluation With Computer Science Applications) , 2007, Technometrics.

[11]  Dalila Tamzalit,et al.  From Monolith to Microservices: Lessons Learned on an Industrial Migration to a Web Oriented Architecture , 2017, 2017 IEEE International Conference on Software Architecture Workshops (ICSAW).

[12]  Theo Lynn,et al.  Microservices migration patterns , 2018, Softw. Pract. Exp..

[13]  Wilhelm Hasselbring,et al.  Using Microservices for Legacy Software Modernization , 2018, IEEE Software.

[14]  Schahram Dustdar,et al.  Microservices: Migration of a Mission Critical System , 2017, IEEE Transactions on Services Computing.

[15]  Jim Hugunin,et al.  Advice weaving in AspectJ , 2004, AOSD '04.

[16]  Claus Pahl,et al.  Microservices: The Journey So Far and Challenges Ahead , 2018, IEEE Softw..

[17]  Bertrand Meyer,et al.  Software Engineering Aspects of Continuous Development and New Paradigms of Software Production and Deployment , 2018, Lecture Notes in Computer Science.

[18]  Pooyan Jamshidi,et al.  Microservices Architecture Enables DevOps: Migration to a Cloud-Native Architecture , 2016, IEEE Software.

[19]  Frederick P. Brooks,et al.  No Silver Bullet: Essence and Accidents of Software Engineering , 1987 .

[20]  Stefan Wagner,et al.  From Monolith to Microservices: A Classification of Refactoring Approaches , 2018, DEVOPS.

[21]  Colin J. Fidge,et al.  Migrating Enterprise Legacy Source Code to Microservices: On Multitenancy, Statefulness, and Data Consistency , 2018, IEEE Software.

[22]  Pooyan Jamshidi,et al.  Migrating to Cloud-Native Architectures Using Microservices: An Experience Report , 2015, ESOCC Workshops.

[23]  Sam Newman,et al.  Building microservices - designing fine-grained systems, 1st Edition , 2015 .

[24]  Antonio Bucchiarone,et al.  From Monolithic to Microservices: An Experience Report from the Banking Domain , 2018, IEEE Software.

[25]  Waheed Iqbal,et al.  Unsupervised learning approach for web application auto-decomposition into microservices , 2019, J. Syst. Softw..