Journal of Computer Applications ›› 2020, Vol. 40 ›› Issue (12): 3604-3611.DOI: 10.11772/j.issn.1001-9081.2020040495

• Computer software technology • Previous Articles     Next Articles

Microservice identification method based on class dependencies under resource constraints

SHAO Jianwei1,2, LIU Qiqun3, WANG Huanqiang2, CHEN Yaowang2, YU Dongjin2, SALAMAT Boranbaev2   

  1. 1. Zhejiang Topthinking Information Technology Company Limited, Hangzhou Zhejiang 310006, China;
    2. School of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou Zhejiang 310018, China;
    3. Department of Tourist Management, Henan Vocational College of Agriculture, Zhengzhou Henan 451450, China
  • Received:2020-04-20 Revised:2020-06-20 Online:2020-12-10 Published:2020-08-05
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61702144), the Key Research and Development Program of Zhejiang Province (2020C01165).

资源约束下的基于类依赖关系的微服务识别方法

邵建伟1,2, 刘其群3, 王焕强2, 陈耀旺2, 俞东进2, SALAMAT Boranbaev2   

  1. 1. 浙江天正思维信息技术有限公司, 杭州 310006;
    2. 杭州电子科技大学 计算机学院, 杭州 310018;
    3. 河南农业职业学院 旅游管理学院, 郑州 451450
  • 通讯作者: 俞东进(1969-),男,浙江平湖人,教授,博士生导师,博士,主要研究方向:智能软件工程、服务计算、大数据。yudj@hdu.edu.cn
  • 作者简介:邵建伟(1968-),男,浙江杭州人,高级工程师,硕士,主要研究方向:软件体系结构;刘其群(1970-),男,河南郑州人,副教授,硕士,主要研究方向:信息管理;王焕强(1995-),男,浙江台州人,硕士研究生,主要研究方向:软件体系结构;陈耀旺(1985-),男,浙江温州人,工程师,硕士,主要研究方向:软件开发、数据挖掘;SALAMAT Boranbaev (1991-),男,乌兹别克斯坦人,硕士研究生,主要研究方向:软件体系结构
  • 基金资助:
    国家自然科学基金资助项目(61702144);浙江省重点研发计划项目(2020C01165)。

Abstract: To effectively improve the automation level of legacy software system reconstruction based on the microservice architecture, according to the principle that there is a certain correlation between resource data operated by two classes with dependencies, a microservice identification method based on class dependencies under resource constraints was proposed. Firstly, the class dependency graph was built based on the class dependencies in the legacy software program, and the resource entity label for each class was set. Then, a dividing algorithm was designed for the class dependency graph based on the resource entity label, which was used to divide the original software system and obtain the candidate microservices. Finally, the candidate microservices with higher dependency degrees were combined to obtain the final microservice set. Experimental results based on four open source projects from GitHub demonstrate that, the proposed method achieves the microservice division accuracy of higher than 90%, which proves that it is reasonable and effective to identify microservices by considering both class dependencies and resource constraints.

Key words: microservice architecture, class dependency, microservice identification, resource constraint, legacy software system

摘要: 为有效提升基于微服务架构的遗留软件系统重构的自动化水平,根据存在依赖关系的两个类所操作的资源数据之间存在着一定相关性的原则,提出了一种资源约束下基于类依赖关系的微服务识别方法。首先,根据遗留软件程序中的类依赖关系构建类依赖关系图,并设置每个类的资源实体标签;然后,设计了基于资源实体标签的类依赖关系图划分算法,用以划分原软件系统和得到候选微服务;最后,合并依赖程度较高的候选微服务,从而得到最终的微服务集合。基于GitHub的4个开源项目的实验结果表明,所提方法具有高于90%的微服务划分准确率,证实了同时考虑不同类之间的依赖关系和资源约束对于微服务识别是合理和有效的。

关键词: 微服务架构, 类依赖关系, 微服务识别, 资源约束, 遗留软件系统

CLC Number: