Microservice architectures promote small, independently developed services, but increase overall architectural complexity. It is crucial that developers understand the architecture and how changes to a service affect the overall system, but rapid and independent development of services increases the risk of architectural drift and discourages the creation and maintenance of documentation. Automatic architecture reconstruction can help avoid these issues, but it is difficult to reuse reconstruction code across multiple projects, as all use different combinations of technologies and project-specific conventions. Reconstruction of architecture-level details is further complicated by the tendency to split microservices into separate repositories, preventing a full view of the system from any one codebase. In this paper, we present and evaluate ModARO, an approach to microservice architecture reconstruction that allows writing modular reconstruction code ('extractors') for any technologies and reusing them across different projects, independent of the surrounding technology stack or whether or not the services are split into multiple codebases. We demonstrate the effectiveness of our approach by configuring ModARO to reconstruct 10 open source projects, and we validate the usefulness and usability of ModARO against a state-of-the-art baseline in a user study with 8 industry practitioners. Using this approach, developers can assemble or create extractors tailored to their technology stacks and distribute architecture reconstruction across repositories, enabling integration into repository CI/CD pipelines.
翻译:微服务架构提倡小型、独立开发的服务,但同时也增加了整体架构的复杂性。开发者理解架构以及服务变更如何影响整个系统至关重要,然而服务的快速独立开发增加了架构漂移的风险,并阻碍了文档的创建与维护。自动化的架构重构有助于避免这些问题,但重构代码在多个项目间难以复用,因为各项目采用不同的技术组合和项目特定的约定。此外,微服务往往被拆分至独立的代码仓库,导致无法从单一代码库获得系统的完整视图,这进一步增加了架构层面细节重构的复杂性。本文提出并评估了 ModARO,这是一种微服务架构重构方法,允许为任意技术编写模块化的重构代码(“提取器”),并在不同项目中复用,且不受周边技术栈或服务是否被拆分至多个代码库的影响。我们通过配置 ModARO 重构 10 个开源项目来验证该方法的有效性,并在一项有 8 位行业从业者参与的用户研究中,将 ModARO 与当前最先进的基线方法进行对比,验证了其实用性与可用性。采用此方法,开发者能够组装或创建适配其技术栈的提取器,并在多个仓库间分布式地进行架构重构,从而支持集成到仓库的 CI/CD 流水线中。