Migration to Microservices: A Comparative Study of Decomposition Strategies and Analysis Metrics
Meryam chaieb, Mohamed Aymen Saied
TL;DR
The paper addresses the challenging problem of migrating from monolithic to microservice architectures by casting decomposition as a clustering task on class-level representations derived from static analysis. It introduces a hybrid adapted-BMSC approach that combines Mean Shift and DBSCAN, guided by structural and semantic encodings of classes into iModes-based representations. The authors evaluate multiple encoding configurations, compare against several baselines, and validate against manually identified microservices across seven monoliths and three microservice-based apps, reporting favorable structural cohesion, reduced coupling, and stable decomposition. The work demonstrates the potential for automated, scalable microservice extraction and outlines avenues for extending granularity and incorporating dynamic analysis to improve generalization and practicality.
Abstract
The microservices architectural style is widely favored for its scalability, reusability, and easy maintainability, prompting increased adoption by developers. However, transitioning from a monolithic to a microservices-based architecture is intricate and costly. In response, we present a novel method utilizing clustering to identify potential microservices in a given monolithic application. Our approach employs a density-based clustering algorithm considering static analysis, structural, and semantic relationships between classes, ensuring a functionally and contextually coherent partitioning. To assess the reliability of our microservice suggestion approach, we conducted an in-depth analysis of hyperparameter sensitivity and compared it with two established clustering algorithms. A comprehensive comparative analysis involved seven applications, evaluating against six baselines, utilizing a dataset of four open-source Java projects. Metrics assessed the quality of generated microservices. Furthermore, we meticulously compared our suggested microservices with manually identified ones in three microservices-based applications. This comparison provided a nuanced understanding of our approach's efficacy and reliability. Our methodology demonstrated promising outcomes, showcasing remarkable effectiveness and commendable stability.
