用大模型分析代码基础设施自动识别微服务模式实例。
Automated Microservice Pattern Instance Detection Using Infrastructure-as-Code Artifacts and Large Language Models
- 利用大模型分析IaC文件,自动化检测微服务模式实例。
- 在22个开源项目中验证,83%识别结果准确,成本极低。
- 适合希望低成本获取架构知识的开发团队和研究者。
软件架构文档对保留架构知识至关重要,但通常成本高昂。架构模式实例(如微服务模式)提供关键结构信息,需被记录以防止知识流失。然而,仅通过源码难以检测这些模式,需分析其他类型资产。现有方法扩展性差。本文介绍我们正在进行的博士研究、早期实验及原型工具MicroPAD,该工具利用大语言模型(LLMs)分析基础设施即代码(IaC)资产,实现微服务模式实例的自动化检测,旨在降低检测成本并扩大可识别模式范围。在22个GitHub项目中进行了三次实验,验证了83%的识别结果真实存在于项目中,且检测成本极低。结果表明该方法具有可行性,能降低自动化检测门槛,推动架构知识普及。最后介绍了整体研究方法、未来工作规划及MicroPAD潜在工业影响。
原文摘要 · Abstract (English)
Documenting software architecture is essential to preserve architecture knowledge, even though it is frequently costly. Architecture pattern instances, including microservice pattern instances, provide important structural software information. Practitioners should document this information to prevent knowledge vaporization. However, architecture patterns may not be detectable by analyzing source code artifacts, requiring the analysis of other types of artifacts. Moreover, many existing pattern detection instance approaches are complex to extend. This article presents our ongoing PhD research, early experiments, and a prototype for a tool we call MicroPAD for automating the detection of microservice pattern instances. The prototype uses Large Language Models (LLMs) to analyze Infrastructure-as-Code (IaC) artifacts to aid detection, aiming to keep costs low and maximize the scope of detectable patterns. Early experiments ran the prototype thrice in 22 GitHub projects. We verified that 83\% of the patterns that the prototype identified were in the project. The costs of detecting the pattern instances were minimal. These results indicate that the approach is likely viable and, by lowering the entry barrier to automating pattern instance detection, could help democratize developer access to this category of architecture knowledge. Finally, we present our overall research methodology, planned future work, and an overview of MicroPAD's potential industrial impact.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。