Implementation of Domain-oriented Microservices Decomposition based on Node-attributed Network
Lingli Cao, Cheng Zhang · 2022
The features of microservices, such as scalability and maintainability, have attracted the industry to migrate monolithic projects to microservices. However, how to decompose microservices during migration is a tricky problem. At present, microservices decomposition mainly relies on architects or domain experts, which is more subjective and time-consuming. Followed by semi-automated or automated microservice decomposition, such methods produce coarse-grained results affected by different system characteristics, which cannot make desired decomposition according to the migration requirements of domains. Therefore, this paper proposes a domain-oriented fine-grained microservices decomposition resolution scheme. It uses dynamic and static analysis to obtain the invocation relationships and invocation times between entity methods and the response time of entity methods to represent three main system characteristics concerned during the migration: function, inter-service communications, and performance. And express the above information of monolith by the node-attributed network. Then it uses the community detection algorithm and the proposed similar hierarchical clustering algorithm to complete objective and effective decomposition. Finally, the rationality and feasibility of the proposed approach are verified using the JPetStore case.