From Monolith to Microservices: A Classification of Refactoring Approaches

While the recently emerged Microservices architectural style is widely discussed in literature, it is difficult to find clear guidance on the process of refactoring legacy applications. The importance of the topic is underpinned by high costs and effort of a refactoring process which has several other implications, e.g. overall processes (DevOps) and team structure. Software architects facing this challenge are in need of selecting an appropriate strategy and refactoring technique. One of the most discussed aspects in this context is finding the right service granularity to fully leverage the advantages of a Microservices architecture. This study first discusses the notion of architectural refactoring and subsequently compares 10 existing refactoring approaches recently proposed in academic literature. The approaches are classified by the underlying decomposition technique and visually presented in the form of a decision guide for quick reference. The review yielded a variety of strategies to break down a monolithic application into independent services. With one exception, most approaches are only applicable under certain conditions. Further concerns are the significant amount of input data some approaches require as well as limited or prototypical tool support.

[1]  Sam Newman,et al.  Building Microservices , 2015 .

[2]  Claes Wohlin,et al.  Guidelines for snowballing in systematic literature studies and a replication in software engineering , 2014, EASE '14.

[3]  Michael C. Feathers Working Effectively with Legacy Code , 2004, XP/Agile Universe.

[4]  Shanshan Li,et al.  From Monolith to Microservices: A Dataflow-Driven Approach , 2017, 2017 24th Asia-Pacific Software Engineering Conference (APSEC).

[5]  Daniela E. Damian,et al.  Conway's Law Revisited: The Evidence for a Task-Based Perspective , 2012, IEEE Software.

[6]  Luciano Baresi,et al.  Microservices Identification Through Interface Analysis , 2017, ESOCC.

[7]  Pearl Brereton,et al.  Lessons from applying the systematic literature review process within the software engineering domain , 2007, J. Syst. Softw..

[8]  Rubby Casallas,et al.  Towards the understanding and evolution of monolithic applications as microservices , 2016, 2016 XLII Latin American Computing Conference (CLEI).

[9]  Stefan Wagner,et al.  Analyzing the Relevance of SOA Patterns for Microservice-Based Systems , 2018, ZEUS.

[10]  Evans,et al.  Domain-driven design , 2003 .

[11]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[12]  Lucas Krause Microservices: Theory and Application , 2016, Applicative 2016.

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

[14]  Ralph E. Johnson,et al.  Creating abstract superclasses by refactoring , 1993, CSC '93.

[15]  Ralf Knackstedt,et al.  Identification of Services - A Stakeholder-Based Approach to SOA Development and its Application in the Area of Production Planning , 2007, ECIS.

[16]  Rami Bahsoon,et al.  Microservice Ambients: An Architectural Meta-Modelling Approach for Microservice Granularity , 2017, 2017 IEEE International Conference on Software Architecture (ICSA).

[17]  Pearl Brereton,et al.  Performing systematic literature reviews in software engineering , 2006, ICSE.

[18]  André L. M. Santos,et al.  Relationships Between Communication Structure and Software Architecture: An Empirical Investigation of the Conway's Law at the Federal University of Pernambuco , 2013, 2013 3rd International Workshop on Replication in Empirical Software Engineering Research.

[19]  Slinger Jansen,et al.  Workload-Based Clustering of Coherent Feature Sets in Microservice Architectures , 2017, 2017 IEEE International Conference on Software Architecture (ICSA).

[20]  Mohsen Ahmadvand,et al.  Requirements Reconciliation for Scalable and Secure Microservice (De)composition , 2016, 2016 IEEE 24th International Requirements Engineering Conference Workshops (REW).

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

[22]  Olaf Zimmermann,et al.  Service Cutter: A Systematic Approach to Service Decomposition , 2016, ESOCC.

[23]  Kai Petersen,et al.  Guidelines for conducting systematic mapping studies in software engineering: An update , 2015, Inf. Softw. Technol..

[24]  O. Mustafa Optimizing economics of microservices by planning for granularity level Experience , 2017 .

[25]  Claus Pahl,et al.  Microservices: A Systematic Mapping Study , 2016, CLOSER.

[26]  Liming Zhu,et al.  DevOps - A Software Architect's Perspective , 2015, SEI series in software engineering.

[27]  Thomas J. Mowbray,et al.  AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis , 1998 .

[28]  Bjarne Stroustrup,et al.  Source Code Rejuvenation Is Not Refactoring , 2009, SOFSEM.

[29]  Albert Zündorf,et al.  Differences between Model-Driven Development of Service-Oriented and Microservice Architecture , 2017, 2017 IEEE International Conference on Software Architecture Workshops (ICSAW).

[30]  Jürgen Cito,et al.  Extraction of Microservices from Monolithic Software Architectures , 2017, 2017 IEEE International Conference on Web Services (ICWS).

[31]  Patricia Lago,et al.  Research on Architecting Microservices: Trends, Focus, and Potential for Industrial Adoption , 2017, 2017 IEEE International Conference on Software Architecture (ICSA).

[32]  Olaf Zimmermann Architectural Refactoring: A Task-Centric View on Software Evolution , 2015, IEEE Software.

[33]  Jens Dietrich,et al.  On the Detection of High-Impact Refactoring Opportunities in Programs , 2010, ArXiv.