计算机科学 ›› 2021, Vol. 48 ›› Issue (12): 17-23.doi: 10.11896/jsjkx.210500078

• 计算机体系结构* 上一篇    下一篇

一种基于微服务架构的服务划分方法

江郑, 王俊丽, 曹芮浩, 闫春钢   

  1. 嵌入式系统与服务计算教育部重点实验室(同济大学) 上海201804
  • 收稿日期:2021-05-11 修回日期:2021-08-09 出版日期:2021-12-15 发布日期:2021-11-26
  • 通讯作者: 闫春钢(cgyan2@163.com)
  • 作者简介:zhengjiang@tongji.edu.cn
  • 基金资助:
    国家重点研发计划(2018YFC0831403)

Method of Service Decomposition Based on Microservice Architecture

JIANG Zheng, WANG Jun-li, CAO Rui-hao, YAN Chun-gang   

  1. Key Laboratory of Embedded System and Service Computing of Ministry of Education(Tongji University),Shanghai 201804,China
  • Received:2021-05-11 Revised:2021-08-09 Online:2021-12-15 Published:2021-11-26
  • About author:JIANG Zheng,born in 1996,postgra-duate.His main research interests include service computing,service decomposition and microservice.
    YAN Chun-gang,born in 1963,Ph.D,professor,Ph.D supervisor.Her main research interests include computer collaboration and service computing,trusted computing and Petri net modeling and analysis.
  • Supported by:
    National Key Research and Development Program of China(2018YFC0831403).

摘要: 对单体系统进行微服务划分能有效缓解单体架构中系统冗余、难以维护等问题,但是现有的微服务划分方法未能充分利用微服务架构的属性信息,导致服务划分结果的合理性不高。文中给出了一种基于微服务架构的服务划分方法。该方法通过系统服务与属性的关联信息来构建实体-属性关系图,然后结合微服务架构的特征信息与目标系统的需求信息制定服务划分规则,量化两类顶点之间的关联信息,生成实体-属性加权图,最后应用加权的GN算法自动地实现系统的微服务划分。实验结果表明,该方法在服务划分的时效性上有较大提升,并且生成的微服务划分方案在评估指标上的表现更好。

关键词: 微服务架构, 服务划分, 问题建模, 划分规则, GN算法

Abstract: The microservice decomposition of the monolithic system can effectively alleviate the problems of system redundancy and difficulty in maintenance of the monolithic architecture.However,the existing microservice decomposition methods fail to make full use of the attribute information of the microservice architecture,which leads to the low rationality of service decomposition results.This paper proposes a service decomposition method based on microservice architecture.The method constructs an entity-attribute relationship graph through the association information of system services and attributes.Then the service decomposition rules are formulated by combining the feature information of the microservice architecture with the demand information of the target system,the association information between the two types of vertices is quantified,and a weighted entity-attribute graph is generated.Finally,the weighted GN algorithm is applied to realize the microservice decomposition of the system automatically.The experimental results show that the method greatly improves the timeliness of service decomposition,and the gene-rated microservice decomposition scheme performs better in terms of various evaluation metrics.

Key words: Microservice architecture, Service decomposition, Problem modeling, Decomposition rules, GN algorithm

中图分类号: 

  • TP311
[1]RICHARDSON C.Monolithic Architecture[EB/OL].[2021-04-02].https://microservices.io/patterns/monolithic.html.
[2]LU Y F,CAO R H,WANG J L,et al.Method of Encapsulating Procuratorate Affair Services Based on Microservices[J].Computer Science,2021,48(2):33-40.
[3]WU W J,YU X,PU Y J,et al.Development of Complex Service Software in Microservice Era[J].Computer Science,2020,47(12):11-17.
[4]MAZLAMI G,CITO J,LEITNER P.Extraction of microser- vices from monolithic software architectures[C]//2017 IEEE International Conference on Web Services (ICWS).IEEE,2017:524-531.
[5]LEVCOVITZ A,TERRA R,VALENTE M T.Towards a technique for extracting microservices from monolithic enterprise systems[J].arXiv:1605.03175,2016.
[6]WU H Y,DENG W J.Research Progress on the Development of Microservices[J].Journal of Computer Research and Development,2020,57(3):525-541.
[7]AL-DEBAGY O,MARTINEK P.A Microservice Decomposition Method Through Using Distributed Representation of Source Code[J].Scalable Computing:Practice and Experience,2021,22(1):39-52.
[8]REN Z,WANG W,WU G,et al.Migrating web applications from monolithic structure to microservices architecture[C]//Proceedings of the Tenth Asia-Pacific Symposium on Internetware.2018:1-10.
[9]GYSEL M,KÖLBENER L,GIERSCHE W,et al.Service cut- ter:A systematic approach to service decomposition[C]//European Conference on Service-Oriented and Cloud Computing.Cham:Springer,2016:185-200.
[10]GYSEL M,KÖLBENER L.Service Cutter-A Structured Way to Service Decomposition[D].Rapperswil-Jona:HSR Hochschule für Technik Rapperswil,2015.
[11]DING D,PENG X,GUO X F,et al.Scenario-Driven and Bottom-Up Microservice Decomposition for Monolithic Systems[J].Journal of Software,2020,31(11):3461-3480.
[12]NEWMAN S.Building microservices:designing fine-grained systems[M].O'Reilly Media,2015:1-47.
[13]AHMADVAND M,IBRAHIM A.Requirements reconciliation for scalable and secure microservice (de) composition[C]//2016 IEEE 24th International Requirements Engineering Conference Workshops (REW).IEEE,2016:68-73.
[14]RICHARDSON C.Pattern:Microservice architecture[EB/OL].[2021-04-02].http://microservices.io/patterns/microservices.html.
[15]BARESI L,GARRIGA M,DE RENZIS A.Microservices identification through interface analysis[C]//European Conference on Service-oriented and Cloud Computing.Cham:Springer,2017:19-33.
[16]ABDULLAH M,IQBAL W,ERRADI A.Unsupervised learning approach for web application auto-decomposition into microservices[J].Journal of Systems and Software,2019,151:243-257.
[17]VON LUXBURG U.A tutorial on spectral clustering[J].Statistics and Computing,2007,17(4):395-416.
[18]PONS P,LATAPY M.Computing communities in large net- works using random walks[C]//International Symposium on Computer and Information Sciences.Berlin:Springer,2005:284-293.
[19]TRAAG V A.Faster unfolding of communities:Speeding up the Louvain algorithm[J].Physical Review E,2015,92(3):032801.
[20]GIRVAN M,NEWMAN M E J.Community structure in social and biological networks[J].Proceedings of the National Academy of Sciences,2002,99(12):7821-7826.
[21]NEWMAN M E J.Fast algorithm for detecting community structure in networks[J].Physical review E,2004,69(6):066133.
[22]YANG N.Research and application on service partition and selection strategy in microservice platform [D].Beijing:Beijing University of Posts and Telecommunications,2019.
[23]NEWMAN M E J,GIRVAN M.Finding and evaluating community structure in networks[J].Physical review E,2004,69(2):026113.
[24]EVANS E J,EVANS E.Domain-driven design:tackling complexity in the heart of software[M].Addison-Wesley Professional,2004:15-31.
[25]FRITZSCH J.From Monolithic Applications to Microservices:Guidance on Refactoring Techniques and Result Evaluation[D].Reutlingen:Reutlingen University,2018.
[26]LI S,ZHANG H,JIA Z,et al.A dataflow-driven approach to identifying microservices from monolithic applications[J].Journal of Systems and Software,2019,157:110380.
[1] 吴文峻, 于鑫, 蒲彦均, 汪群博, 于笑明. 微服务时代的复杂服务软件开发[J]. 计算机科学, 2020, 47(12): 11-17.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 杨洁,王国胤,李帅. 基于边界域的邻域知识距离度量模型[J]. 计算机科学, 2020, 47(3): 61 -66 .
[2] 裴嘉震, 徐曾春, 胡平. 融合视点机制与姿态估计的行人再识别方法[J]. 计算机科学, 2020, 47(6): 164 -169 .
[3] 潘孝勤, 芦天亮, 杜彦辉, 仝鑫. 基于深度学习的语音合成与转换技术综述[J]. 计算机科学, 2021, 48(8): 200 -208 .
[4] 王俊, 王修来, 庞威, 赵鸿飞. 面向科技前瞻预测的大数据治理研究[J]. 计算机科学, 2021, 48(9): 36 -42 .
[5] 余力, 杜启翰, 岳博妍, 向君瑶, 徐冠宇, 冷友方. 基于强化学习的推荐研究综述[J]. 计算机科学, 2021, 48(10): 1 -18 .
[6] 王梓强, 胡晓光, 李晓筱, 杜卓群. 移动机器人全局路径规划算法综述[J]. 计算机科学, 2021, 48(10): 19 -29 .
[7] 高洪皓, 郑子彬, 殷昱煜, 丁勇. 区块链技术专题序言[J]. 计算机科学, 2021, 48(11): 1 -3 .
[8] 毛瀚宇, 聂铁铮, 申德荣, 于戈, 徐石成, 何光宇. 区块链即服务平台关键技术及发展综述[J]. 计算机科学, 2021, 48(11): 4 -11 .
[9] 陈先来, 赵晓宇, 曾工棉, 安莹. 基于区块链的患者在线交流模型[J]. 计算机科学, 2021, 48(11): 28 -35 .
[10] 张倩, 肖丽. 基于流线的流场可视化绘制方法综述[J]. 计算机科学, 2021, 48(12): 1 -7 .