arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2508.07486cs.SEcs.AIcs.CV
收藏

通过深度语义嵌入和基于图神经网络的软聚类从单体代码中提取重叠微服务

Extracting Overlapping Microservices from Monolithic Code via Deep Semantic Embeddings and Graph Neural Network-Based Soft Clustering

Morteza Ziabakhsh, Kiyan Rezaee, Sadegh Eskandari, Seyed Amir Hossein Tabatabaei, Mohammad M. Ghassemi

AI总结:

提出Mo2oM框架,将微服务提取建模为软聚类问题,结合深度语义嵌入与方法调用图的结构依赖,利用图神经网络生成重叠微服务,在多个基准上显著提升模块化、降低通信开销并平衡服务规模。

摘要:

现代软件系统正日益从单体架构向微服务转变,以增强可扩展性、可维护性和部署灵活性。现有的微服务提取方法通常依赖硬聚类,将每个软件组件分配给单个微服务。这种方法通常会增加服务间耦合并降低服务内聚性。我们提出了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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑