计算机科学 ›› 2023, Vol. 50 ›› Issue (11A): 230200102-7.doi: 10.11896/jsjkx.230200102
黄志成, 柳先辉
HUANG Zhicheng, LIU Xianhui
摘要: 微服务架构和云平台容器化部署是当前软件工程实践中一个比较热门的话题,很多研究报告表明越来越多的软件开发者正在将单体架构向微服务架构转型。在将单体架构应用拆分成微服务架构应用的过程中,实施者面临着一个重要的挑战,即缺乏一个明确的方法将单体应用高效准确的进行拆分。针对这个问题,提出了一种基于数据库表的微服务拆分方法并实现了一个拆分工具。该方法通过收集项目中的所有 SQL 语句,并结合数据库表之间的主外键关系,生成表关联矩阵,根据这个表关联矩阵初步划分出一部分微服务。然后根据测试案例收集所有的交易链路,再结合交易链路分析表和微服务之间的关系,计算出独立的表和微服务的关联度矩阵,根据这个独立的表和微服务的关联度矩阵来完成最终的微服务数据库表的划分,最后按照提出的规则进行微服务代码的拆分。实验结果表明,所提方法可以帮助软件开发者高效准确地进行微服务拆分。
中图分类号:
[1]AHMADVAND M,IBRAHIM A.Requirements reconciliationfor scalable and secure microservice (de) composition[C]//Proceedings of the 2016 IEEE 24th International Requirements Engineering Conference Workshops(REW).2016. [2]GYSEL M,KÖLBENER L,GIERSCHE W,et al.Service cut-ter:A systematic approach to service decomposition[C]//Proceedings of the European Conference on Service-Oriented and Cloud Computing.2016. [3]LEVCOVITZ A,TERRA R,VALENTE M T.Towards a technique for extracting microservices from monolithic enterprise systems [J].arXiv:160503175,2016. [4]BARESI L,GARRIGA M,RENZIS A D.Microservices identification through interface analysis[C]//Proceedings of the European Conference on Service-Oriented and Cloud Computing.2017. [5]CHEN R,LI S,LI Z.From monolith to microservices:A dataflow-driven approach[C]//Proceedings of the 2017 24th Asia-Pacific Software Engineering Conference (APSEC).2017. [6]MAZLAMI G,CITO J,LEITNER P.Extraction of microser-vices from monolithic software architectures[C]//Proceedings of the 2017 IEEE International Conference on Web Services(ICWS).2017. [7]ESKI S,BUZLUCA F.An automatic extraction approach:Transition to microservices architecture from monolithic application[C]//Proceedings of the Proceedings of the 19th International Conference on Agile Software Development:Companion.2018. [8]KAMIMURA M,YANO K,HATANO T,et al.Extracting candidates of microservices from monolithic application code[C]//Proceedings of the 2018 25th Asia-Pacific Software Engineering Conference(APSEC).2018. [9]RADEMACHER F,SORGALLA J,SACHWEH S.Challengesof domain-driven microservice design:A model-driven perspective [J].IEEE Software,2018,35(3):36-43. [10]DING D,PENG X,GUO X F,et al.Scenario-Driven and Bottom-Up Microservice Decomposition for Monolithic Systems[J].Ruan Jian Xue Bao/Journal of Software,2020,31(11):3461-3480. [11]LI S S,RONG G P,GAO Q Y,et al.Optimized dataflow-dri-ven approach for microservices-oriented decomposition[J].Ruan Jian Xue Bao/Journal of Software,2021,32(5):1284-1301. [12]JIN W,LIU T,CAI Y,et al.Service Candidate Identification from Monolithic Systems based on Execution Traces [J].IEEE Transactions on Software Engineering,2019,47(5):987-1007. [13]DESAI U,BANDYOPADHYAY S,TAMILSELVAM S.Graph Neural Network to Dilute Outliers for Refactoring Monolith Application[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2021. [14]MITCHELL B S,MANCORIDIS S.On the Automatic Modula-rization of Software Systems Using the Bunch Tool [J].IEEE Transaction on Software Engineering,2006,32(3):193-208. [15]MAZLAMI G,CITO J,LEITNER P.Extraction of Microser-vices from Monolithic Software Architectures[C]//Proceedings of the IEEE International Conference on Web Services.2017. [16]KALIA A K,JIN X,CHEN L,et al.Mono2Micro:an AI-based toolchain for evolving monolithic enterprise applications to a microservice architecture[C]//Proceedings of the Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering.2020. [17]SAEIDI A M,HAGE J,KHADKA R,et al.A search-based approach to multi-view clustering of software systems[C]//Proceedings of the 2015 IEEE 22nd International Conference on Software Analysis,Evolution,and Reengineering (SANER).2015. [18]SCANNIELLO G,D′AMICO A,D′AMICO C,et al.An ap-proach for architectural layer recovery[C]//Proceedings of the Acm Symposium on Applied Computing.2010. [19]WU J,HASSAN A E,HOLT R C.Comparison of clustering algorithms in the context of software evolution[C]//Proceedings of the IEEE International Conference on Software Maintenance.2005. |
|