
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
Journal of Software, [doi: 10.13328/j.cnki.jos.006031] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
场景驱动、自底向上的单体系统微服务拆分方法
丁
丹
1,2
,
彭
鑫
1,2
,
郭晓峰
1,2
,
张
健
1,2
,
吴毅坚
1,2
1
(复旦大学 计算机科学技术学院,上海 201203)
2
(上海市数据科学重点实验室(复旦大学),上海 201203)
通讯作者: 彭鑫, E-mail: pengxin@fudan.edu.cn
摘 要: 作为云原生应用的一种典型形态,微服务架构已经在各种企业应用系统中被广泛使用.在企业实践中,许
多微服务都是在单体架构的遗留系统基础上通过微服务拆分和改造形成的,其中的拆分决策(特别是数据库拆分)
对于微服务系统的质量有着很大的影响.目前单体系统的微服务拆分决策主要依赖于人的主观经验,整个过程成本
高、耗时长、结果不确定性很高.针对这一问题,本文提出了一种场景驱动、自底向上的单体系统微服务拆分方法.
该方法以场景驱动的方式,通过动态分析获取单体遗留系统运行时的方法调用和数据库操作信息,然后基于数据表
之间的关联分析生成数据库拆分方案,接着再自底向上进行搜索,产生相应的代码模块拆分方案.基于这种方法,本
文实现了一个原型工具 MSDecomposer,将拆分过程可视化,并支持多种维度的反馈调整策略.本文基于多个开源软
件系统进行了案例研究,研究结果表明,本文提出的方法能够显著加快微服务拆分决策的速度,减轻开发人员的决策
负担,得到的拆分结果合理.
关键词: 单体系统;微服务;场景驱动;自底向上;拆分
中图法分类号: TP311
中 文 引 用 格 式 : 丁 丹 , 彭 鑫 , 郭 晓 峰 , 张 健 , 吴 毅 坚 . 场 景 驱 动 、 自 底 向 上 的 单 体 系 统 微 服 务 拆 分 方 法 . 软 件 学 报 .
http://www.jos.org.cn/1000-9825/6031.htm
英文引用格式: Ding D, Peng X, Guo XF, Zhang J, Wu YJ. Scenario-Driven and Bottom-Up Microservice Decomposition for
Monolithic Systems. Ruan Jian Xue Bao/Journal of Software, (in Chinese). http://www.jos.org.cn/1000-9825/6031.htm
Scenario-Driven and Bottom-Up Microservice Decomposition for Monolithic Systems
DING Dan
1,2
, PENG Xin
1,2
, GUO Xiao-Feng
1,2
, ZHANG Jian
1,2
, WU Yi-Jian
1,2
1
(School of Computer Science, Fudan University, Shanghai 201203, China)
2
(Shanghai Key Laboratory of Data Science, Fudan University, Shanghai 201203, China)
Abstract: As a typical form of cloud-native application, microservice architecture has been widely used in various enterprise
applications. In enterprise practice, many microservices are formed by decomposing and transforming the legacy system of monolithic
architecture. The decomposition decision, especially database decomposition, has a great impact on the quality of the microservice system.
At present, the microservice decomposition decision mainly depends on the human subjective experience. The whole process is costly,
time-consuming and the uncertain. To solve this problem, this paper proposes a scenario-driven, bottom-up microservice decomposition
method for monolithic system. This method uses scenario-driven method to obtain the method call and database operation information of
monolithic system by dynamic analysis, generate database decomposition scheme based on analyzing the association among data tables,
and then it searches from the bottom up to generate the corresponding code module decomposition scheme. Based on this method, this
paper implemetns a prototype tool MSDecomposer, which visualizes the decomposing process and supports feedback adjustment
strategies of multiple dimensions. This paper conducts case studies baed on severial open-source software systems, and the results show
基金项目: 国家重点研发计划(2018YFB1004803)
Foundation item: National Key R&D Program of China(2018YFB1004803)
收稿时间: 2019-12-02; 修改时间: 2020-02-07; 采用时间: 2020-03-09; jos 在线出版时间: 2020-04-21
评论