Enhancing Microservice Migration Transformation from Monoliths with Graph Neural Networks
Deli Chen, Chunyang Ye, Hui Zhou, Shanyan Lai, Bo Hu Li · 2025
The task of converting monolithic programs to mi-croservices architecture is complex, hindered by the intertwined nature of program control and data flows. Conventional methods for microservice extraction often fall short in capturing the essen-tial connections within a monolithic structure and in propagating properties to distant neighbors for effective clustering. To address these issues, we introduce an innovative graph-based deep clustering technique that utilizes both control flow and data flow graphs. This approach offers a thorough analysis of class interactions within monolithic applications, facilitating accurate identification and extraction of microservices. Furthermore, we present the Microservice Extraction Graph Neural Network (MEGNN), an advanced graph attention network designed to enhance message transmission depth and enable nodes to assimilate features from k-hop neighbors. This method extends the reach of message distribution across node chains and mitigates the issue of feature homogenization, leading to more cohesive clustering of related nodes and improving the quality of microservices extraction. Experimental evaluations on data from three publicly accessible Java monolithic programs confirm that our proposed method surpasses existing techniques in microservices extraction efficacy.