A method for microservice partitioning of monolithic systems based on multifeature fusion

Xiaoyan Gao, Junfeng Zhao · 2024

With the popularity of microservices architecture, how to refactor a monolithic system into a microservices architecture has become a challenge. Traditional system refactoring strategies often focus on a single aspect, such as conducting source code analysis or system load analysis in isolation. This approach has a limited perspective and cannot comprehensively integrate the diverse characteristics of the system for refactoring. This paper proposes a microservices partitioning method for monolithic systems that integrates multiple features. Firstly, it integrates source code and runtime system data to comprehensively acquire system characteristics. By calculating the semantic similarity of class documents, the similarity of abstract syntax trees, and the frequency of interaction between classes, three types of weights are generated. Then, by assigning different weights, a comprehensive weight is calculated to construct an undirected weighted graph representing dependency relationships. Finally, the Chinese Whisper clustering algorithm is used to partition monolithic systems, obtaining suitable microservice modules. Experimental results show that this method can help developers better understand and partition the system, achieving a microservices architecture with high cohesion and low coupling.

Read the paper · More papers on PaperTik