Font Size: a A A

Research On Microservice Identification Method For Legacy Software Systems

Posted on:2020-11-12Degree:MasterType:Thesis
Country:ChinaCandidate:H Q WangFull Text:PDF
GTID:2428330605967994Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Traditional software systems are mostly developed based on the monolithic architecture,with all components,modules,and resources concentrated in the same software entity.However,as the business is becoming increasingly complicated,the software system of monolithic architecture tends to be more complex and the coupling between the various components of the system is higher.In addition,the code becomes more uncontrollable and difficult to understand.As a flexible software architecture,the microservice architecture can solve the problems of high complexity and high coupling of the monolithic architecture.But it costs a lot for migrating a large legacy software system of the monolithic architecture to the microservice architecture.Developers have to not only clarify the business logic,but also understand the ways of program works.In the process of migrating,how to effectively divide a legacy software system into a combinable microservice is one of the key steps in migrating it to a microservice architecture system.To this end,this paper which based on RESTful API and dependency between classes proposes two approaches for identifying microservices from the legacy software system of monolithic architecture,with expectations to make it easier for the technician when dealing with microservice migration.1)According to the resource-centric design principle of RESTful API,this paper puts forward an approach for microservice identification based on the similarity of RESTful API.Firstly,based on the three core principles of RESTful API,namely,resource identification,HTTP method and statelessness,we design the candidate topic similarity and response message similarity of API,and the overall similarity of the API is obtained through combining the candidate topic similarity and the response message similarity by the weighting algorithm.Then,the API similarity graph is constructed with API as the node and the overall similarity as the weight.Finally,we use a graphbased clustering algorithm to identify the candidate microservices from the API similarity graph.2)According to the principle that there is a certain correlation between resource data operated by with dependencies of two classes,this paper proposes an approach for microservice identification based on dependencies between classes under resource constraints.First,classes dependency graph is built based on dependencies between classes in the software program.Secondly,source code of the class in the program is extracted by constructing the AST,and the entity tag of each class is set according to the entity type.Then,the classes dependency graph partitioning algorithm based on entity tags is designed to divide the original software system and obtain the candidate microservices.Finally,through the indicator of microservice external dependence,the candidate microservices with higher frequency are combined to obtain the final microservices.In this paper,five microservice projects of open source are adopted to validate the effectiveness of the two approaches described above.This paper proposes the microservices effectiveness category and evaluation indicators,and designs two measures of API partition accuracy and class partition accuracy according to the characteristics of the two approaches.In addition,a comparison algorithm is set to compare the rationality of the microservices identified by the two approaches.The experimental results show that the two approaches proposed in this paper obtain higher partition accuracy and good recognition effectiveness for all tested microservice projects.
Keywords/Search Tags:Microservice Architecture, Decomposition of Monolithic Architecture, API Similarity, Class Dependencies
PDF Full Text Request
Related items