用深度强化学习自动划分服务,无需人工参与且效果更优。
Identifying Appropriately-Sized Services with Deep Reinforcement Learning
- 基于强化学习从代码和文档中自动识别合适大小的服务
- 平均模块化质量提升7-14%,业务能力对齐度提高18-22%
- 支持灵活目标平衡,适合遗留系统现代化改造
服务化架构(SBA)被广泛用于现代化遗留系统,其核心是将系统拆分为小而独立、松耦合的服务。然而,如何定义功能内聚且规模适中的服务仍具挑战性。现有方法常依赖文档、人员访谈或预设服务数量,这些假设在真实场景中往往不成立。本文提出Rake,一种基于深度强化学习的服务分解方法,直接从源码和可用文档中引导实现级方法的拆分。Rake无需特定文档或人员支持,具备语言无关性,并可自定义目标函数,以平衡模块化质量与业务能力对齐程度。我们在四个开源遗留项目上测试Rake,结果表明其平均模块化质量提升7-14%,业务能力对齐度提高18-22%。研究还发现,仅优化业务上下文会导致紧耦合系统中分解质量下降,强调了目标平衡的重要性。
原文摘要 · Abstract (English)
Service-based architecture (SBA) has gained attention in industry and academia as a means to modernize legacy systems. It refers to a design style that enables systems to be developed as suites of small, loosely coupled, and autonomous components (services) that encapsulate functionality and communicate via language-agnostic APIs. However, defining appropriately sized services that capture cohesive subsets of system functionality remains challenging. Existing work often relies on the availability of documentation, access to project personnel, or a priori knowledge of the target number of services, assumptions that do not hold in many real-world scenarios. Our work addresses these limitations using a deep reinforcement learning-based approach to identify appropriately sized services directly from implementation artifacts. We present Rake, a reinforcement learning-based technique that leverages available system documentation and source code to guide service decomposition at the level of implementation methods. Rake does not require specific documentation or access to project personnel and is language-agnostic. It also supports a customizable objective function that balances modularization quality and business capability alignment, i.e., the degree to which a service covers the targeted business capability. We applied Rake to four open-source legacy projects and compared it with two state-of-the-art techniques. On average, Rake achieved 7-14 percent higher modularization quality and 18-22 percent stronger business capability alignment. Our results further show that optimizing solely for business context can degrade decomposition quality in tightly coupled systems, highlighting the need for balanced objectives.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。