Page 117 - 《软件学报》2021年第5期
P. 117
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
Journal of Software,2021,32(5):1341−1359 [doi: 10.13328/j.cnki.jos.006236] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
∗
多版本共存的微服务系统自适应演化方法
贺 祥, 刘 磊, 涂志莹, 徐晓飞
(哈尔滨工业大学 计算机科学与技术学院,黑龙江 哈尔滨 150001)
通讯作者: 徐晓飞, E-mail: xiaofei@hit.edu.cn
摘 要: 微服务设计模式通过将应用程序拆分成多个相互独立的微服务,实现了各个微服务之间的相互解耦,允
许各个微服务能够独立地进行迭代开发、部署,从而对用户需求变化以及 DevOps 流程中部署需求作出快速响应.
每个微服务的独立迭代升级导致了系统中可能出现多版本共存现象,不同服务的不同版本之间的依赖关系变得更
加复杂.如何在这种场景下适应用户不断变化的需求以及开发者敏捷 DevOps 流程中部署需求,是当前面临的一个
挑战.为解决这一问题,提出了微服务依赖模型来刻画不同服务的不同版本之间复杂的依赖关系,设计了基于贪婪的
优化算法来找到最优的微服务系统演化方案,以满足用户需求变化和敏捷 DevOps 流程中部署需求,并实现了面向
演化的微服务编程框架(MF4MS)和微服务系统自适应架构(MI4MS),可支持演化方案的自动执行,实现微服务系统
运行时的自适应演化.实验结果表明:在有着复杂依赖的微服务系统中,该方法在服务失效时长、服务可用性、开发
者 DevOps 代价等指标上有很好的表现,可有效支持微服务系统自适应演化,以应对用户需求变化和敏捷 DevOps.
关键词: 微服务系统;多版本共存;版本依赖;自适应;用户需求变化;DevOps
中图法分类号: TP311
中文引用格式: 贺祥,刘磊,涂志莹,徐晓飞.多版本共存的微服务系统自适应演化方法.软件学报,2021,32(5):1341−1359. http://
www.jos.org.cn/1000-9825/6236.htm
英文引用格式: He X, Liu L, Tu ZY, Xu XF. Self-adaptative evoluationary method of multi-version coexisting microservice
systems. Ruan Jian Xue Bao/Journal of Software, 2021,32(5):1341−1359 (in Chinese). http://www.jos.org.cn/1000-9825/6236.
htm
Self-adaptative Evoluationary Method of Multi-version Coexisting Microservice Systems
HE Xiang, LIU Lei, TU Zhi-Ying, XU Xiao-Fei
(School of Computer Science and Technology, Harbin Institute of Technology, Harbin 150001, China)
Abstract: A microservice-based system is composed of a set of microservices that are developed and deployed independently for agile
DevOps. Intensive and iterative adaptations/upgrades of microservices are essential for such systems to adapt to user requirement changes
and DevOps, and as a consequence, result in the phenomenon of “multi-version microservice coexistence” in a system. Besides traditional
API-based functional dependencies between different microservices, there appear complicated dependencies between different versions of
difference microservices, which dramatically deteriorate the maintainability of microservice systems, especially when systems evolve to
adapt to user requirement changes and DevOps. To meet this challenge, a version dependency model is proposed for describing the
complex dependencies between different versions of microservices, and greedy-based optimization algorithms are developed for
generating an optimal evolution plan according to changes in user requirements and DevOps at different scenarios. A programming
framework (MF4MS) and cloud-edge based infrastructure (MI4MS) are implemented to facilitate microservice systems to automatically
∗ 基金项目: 国家重点研发计划(2018YFB1402500); 国家自然科学基金(61832014, 61772155, 61832004, 61802089)
Foundation item: National Key Research and Development Program of China (2018YFB1402500); National Natural Science
Foundation of China (61832014, 61772155, 61832004, 61802089)
本文由“面向持续软件工程的微服务架构技术”专题特约编辑张贺教授、王忠杰教授、陈连平研究员和彭鑫教授推荐.
收稿时间: 2020-09-21; 修改时间: 2020-10-26; 采用时间: 2020-12-15; jos 在线出版时间: 2021-02-07