不迁移旧系统,用自动化方法将其暴露为微服务。
MONO2REST: Identifying and Exposing Microservices: a Reusable RESTification Approach
- 用遗传算法分析方法间结构语义依赖,识别微服务边界。
- 通过分类模型自动生成对应HTTP方法和接口路径。
- 在PetClinic案例中准确复现参考微服务结构,适合转型困难团队。
微服务架构已成为大规模云应用的主流,但传统单体系统向微服务迁移过程复杂、耗时且风险高。针对此问题,本文提出一种可复用的自动化两阶段方法:第一阶段采用多目标遗传算法,基于方法间的结构与语义依赖,在方法层面识别微服务;第二阶段利用分类算法为每个识别出的微服务生成对应的REST API,包括分配HTTP方法与端点。我们在Spring PetClinic应用上进行案例研究,该应用同时具备单体与微服务实现版本,可作为对比基准。实验结果表明,所提方法识别出的微服务与参考微服务实现高度一致,验证了其在服务识别与API生成方面的有效性。
原文摘要 · Abstract (English)
The microservices architectural style has become the de facto standard for large-scale cloud applications, offering numerous benefits in scalability, maintainability, and deployment flexibility. Many organizations are pursuing the migration of legacy monolithic systems to a microservices architecture. However, this process is challenging, risky, time-intensive, and prone-to-failure while several organizations lack necessary financial resources, time, or expertise to set up this migration process. So, rather than trying to migrate a legacy system where migration is risky or not feasible, we suggest exposing it as a microservice application without without having to migrate it. In this paper, we present a reusable, automated, two-phase approach that combines evolutionary algorithms with machine learning techniques. In the first phase, we identify microservices at the method level using a multi-objective genetic algorithm that considers both structural and semantic dependencies between methods. In the second phase, we generate REST APIs for each identified microservice using a classification algorithm to assign HTTP methods and endpoints. We evaluated our approach with a case study on the Spring PetClinic application, which has both monolithic and microservices implementations that serve as ground truth for comparison. Results demonstrate that our approach successfully aligns identified microservices with those in the reference microservices implementation, highlighting its effectiveness in service identification and API generation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。