基于动态和静态分析的单体应用FaaS改造方法
作者:
作者单位:

作者简介:

向麒麟(1994-),男,硕士,主要研究领域为云原生与智能化运维;赤坂居纱美(1998-),女,硕士生,主要研究领域为云原生与智能化运维;彭鑫(1979-),男,博士,教授,博士生导师,CCF杰出会员,主要研究领域为智能化软件开发,云原生与智能化运维,泛在计算软件系统;李博文(1997-),男,硕士,主要研究领域为云原生与智能化运维.

通讯作者:

彭鑫,E-mail:pengxin@fudan.edu.cn

中图分类号:

TP311

基金项目:

国家重点研发计划(2018YFB1004803)


FaaS Migration Approach for Monolithic Applications Based on Dynamic and Static Analysis
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    作为Serverless架构的一种典型形态,函数即服务(function as a service,FaaS)架构将业务抽象为细粒度的函数,并且提供弹性的自动伸缩等自动化运维功能,能够大幅降低运维成本.当前,许多在线服务系统中的一些高并发、高可用、灵活多变的业务(如支付、红包等)都已经迁移到了FaaS平台上,但是大量传统单体应用还是难以利用FaaS架构的优势.针对这一问题,提出了一种基于动态和静态分析的单体应用FaaS改造方法.该方法针对指定的单体应用API,通过动态分析和静态分析相结合的方式识别并剥离其实现代码和依赖,然后按照函数模板完成代码重构.针对函数在高并发场景下的冷启动问题,该方法利用基于IO多路复用的主从多线程Reactor模型优化了函数模板,提高了单个函数实例的并发处理能力.基于该方法实现了针对Java语言的原型工具Codext,在开源Serverless平台OpenFaaS上,面向4个开源单体系统进行了实验验证.

    Abstract:

    As a typical form of the Serverless architecture, the function as a service (FaaS) architecture abstracts the business into fine-grained functions, and provides automatic operation and maintenance functionality such as auto-scaling, which can greatly reduce the operation and maintenance costs. Some of the high concurrent, high available, and high flexible services (such as payment, red packet, etc.) in many online service systems have been migrated to the FaaS platform, but a large number of traditional monolithic applications still find it difficult to take advantage of the FaaS architecture. In order to solve this problem, a FaaS migration approach for monolithic applications based on dynamic and static analysis is proposed in this study. This approach identifies and strips the implementation code and dependencies for the specified monolithic application API by combining dynamic and static analysis, and then completes the code refactoring according to the function template. Aiming at the cold-start problem of functions in high concurrency scenario, this approach uses the master-slave multithreaded Reactor model based on IO multiplexing to optimize the function template and improve the concurrency processing capability of a single function instance. Based on this approach, Codext, a prototype tool for Java language, is implemented and experimental verification is carried out on OpenFaaS, an open source Serverless platform, for four open source monolithic applications.

    参考文献
    相似文献
    引证文献
引用本文

向麒麟,彭鑫,赤坂居纱美,李博文.基于动态和静态分析的单体应用FaaS改造方法.软件学报,2022,33(11):4061-4083

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2020-12-22
  • 最后修改日期:2021-04-21
  • 录用日期:
  • 在线发布日期: 2021-12-24
  • 出版日期: 2022-11-06
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号