现代软件系统正日益从单体架构向微服务转变,以增强可扩展性、可维护性和部署灵活性。现有的微服务提取方法通常依赖硬聚类,将每个软件组件分配给单个微服务。这种方法通常会增加服务间耦合并降低服务内聚性。我们提出了Mo2oM(Monolithic to Overlapping Microservices,单体到重叠微服务),这是一个将微服务提取表述为软聚类问题的框架,允许组件以概率方式属于多个微服务。该方法受专家驱动的分解启发,从业者有意在某些服务间复制特定软件组件以减少通信开销。Mo2oM将深度语义嵌入与从方法调用图中提取的结构依赖相结合,以捕获功能和架构关系。随后,基于图神经网络的软聚类算法生成最终的微服务集合。我们在四个开源单体基准上评估了Mo2oM,并将其与八个最先进的基线进行比较。结果表明,Mo2oM在所有基准上的结构模块化(平衡内聚和耦合)方面实现了高达40.97%的提升,在服务间调用百分比(通信开销)方面提升了58%,在接口数量(模块化和解耦)方面提升了26.16%,在非极端分布(服务大小平衡)方面提升了38.96%。
英文摘要:
Modern software systems are increasingly shifting from monolithic architectures to microservices to enhance scalability, maintainability, and deployment flexibility. Existing microservice extraction methods typically rely on hard clustering, assigning each software component to a single microservice. This approach often increases inter-service coupling and reduces intra-service cohesion. We propose Mo2oM (Monolithic to Overlapping Microservices), a framework that formulates microservice extraction as a soft clustering problem, allowing components to belong probabilistically to multiple microservices. This approach is inspired by expert-driven decompositions, where practitioners intentionally replicate certain software components across services to reduce communication overhead. Mo2oM combines deep semantic embeddings with structural dependencies extracted from methodcall graphs to capture both functional and architectural relationships. A graph neural network-based soft clustering algorithm then generates the final set of microservices. We evaluate Mo2oM on four open-source monolithic benchmarks and compare it against eight state-of-the-art baselines. Our results demonstrate that Mo2oM achieves improvements of up to 40.97% in structural modularity (balancing cohesion and coupling), 58% in inter-service call percentage (communication overhead), 26.16% in interface number (modularity and decoupling), and 38.96% in non-extreme distribution (service size balance) across all benchmarks.
CARGO: AI-Guided Dependency Analysis for Migrating Monolithic Applications to Microservices Architecture
微服务架构(MSA)已成为设计云原生企业应用程序的事实标准,因为它具有高效的基础设施设置、服务可用性、弹性可扩展性、可靠性和更好的安全性。现有的(单体)系统必须分解为微服务来利用这些特性。由于大规模应用程序的手动分解可能很费力且容易出错,因此基于AI的系统检测分解策略越来越受欢迎。然而,这些方法的有用性是有限的程序表示的表现力和他们无法模拟应用程序的依赖于关键的外部资源,如数据库。因此,由当前工具提供的分区建议导致导致(a)分布式整体,和/或(b)强制使用(经常受到批评的)分布式事务的架构。这项工作试图通过引入CARGO({context-sensitive l [A] bel p [R] opa [G] ati [O] n}的缩写)来克服这些挑战,CARGO是一种新的无监督/半监督分区细化技术,其使用单片应用程序的上下文和流敏感系统依赖图来细化并从而丰富当前最先进算法的分区质量。CARGO被用于增强四种最先进的微服务分区技术,这些技术应用于五个Java EE应用程序(包括一个工业规模的专有项目)。实验表明,CARGO可以提高所有现代微服务划分技术的划分质量。此外,CARGO大大减少了分布式事务,对基准应用程序(在不同负载下部署)的真实世界性能评估显示,CARGO还将部署的微服务应用程序的整体延迟降低了11%,平均吞吐量增加了120%。
Refactoring Towards Microservices: Preparing the Ground for Service Extraction
INESC TEC, Faculty of Engineering, University of Porto(波尔图大学工程 faculties 学院 INESC TEC);IFTO(巴西联邦信息技术与技术学院 (IFTO));UNIBZ(博尔扎诺自由大学 (UNIBZ));IME/USP(圣保罗大学计算数学研究所 (IME/USP))
From Textual Requirements to Microservice Architectures - A Comprehensive Evaluation of LLM-Based Design Synthesis
Federal University of Campina Grande (UFCG)(帕伊巴联邦大学(UFCG));VIRTUS/UFCG;Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)(国家科学技术研究委员会(CONICET));Universidad Nacional del Centro de la Provincia de Buenos Aires (UNICEN)(布宜诺斯艾利斯省中部国立大学(UNICEN));Federal Institute of Pernambuco (IFPE)(伯南布哥联邦学院(IFPE));Rui Barbosa State School(鲁伊·巴尔博萨州立学校)