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

基于 RESTful API 定义的大语言模型生成微服务实现

LLM-Generated Microservice Implementations from RESTful API Definitions

Faculty of Information Technology and Communication Science, Tampere University(坦佩雷大学信息与通信技术学院)

Saurabh Chauhan, Zeeshan Rasheed, Abdul Malik Sami, Zheying Zhang, Jussi Rasku, Kai-Kristian Kemell, Pekka Abrahamsson

AI总结:

本文提出一种基于大语言模型的系统,通过自动化 OpenAPI 规范生成、代码创建及基于日志分析的反馈完善,实现 RESTful 微服务的 API 优先开发,有效加速开发进程并减少人工工作。

摘要:

对可扩展、可维护和快速部署系统日益增长的需求,使得微服务架构在软件开发中广泛流行。本文提出了一种使用大语言模型(LLMs)来自动化 RESTful 微服务 API 优先开发的系统。该系统协助创建 OpenAPI 规范,据此生成服务器代码,并通过分析执行日志和错误信息的反馈循环来完善代码。通过关注 API 优先方法论,该系统确保微服务具有明确定义的接口,从而促进整个开发生命周期的一致性和可靠性。日志分析的集成使 LLM 能够高效地检测和解决问题,减少生成功能正常且健壮的服务所需的迭代次数。该过程不仅自动化了微服务的生成,还简化了调试和完善阶段,使开发者能够专注于更高层的设计和集成任务。该系统有望帮助软件开发者、架构师和组织加速软件开发周期并减少人工工作。为了评估系统的潜力,我们对六位行业从业者进行了调查。调查从业者后,该系统在提高开发速度、自动化重复任务和简化原型设计过程方面展现出显著优势。虽然经验丰富的开发者赞赏其在特定任务中的效率,但一些人对其在处理高级定制和更大规模项目方面的局限性表示担忧。代码公开于 https://github.com/sirbh/code-gen。

英文摘要:

The growing need for scalable, maintainable, and fast-deploying systems has made microservice architecture widely popular in software development. This paper presents a system that uses Large Language Models (LLMs) to automate the API-first development of RESTful microservices. This system assists in creating OpenAPI specification, generating server code from it, and refining the code through a feedback loop that analyzes execution logs and error messages. By focusing on the API-first methodology, this system ensures that microservices are designed with well-defined interfaces, promoting consistency and reliability across the development life-cycle. The integration of log analysis enables the LLM to detect and address issues efficiently, reducing the number of iterations required to produce functional and robust services. This process automates the generation of microservices and also simplifies the debugging and refinement phases, allowing developers to focus on higher-level design and integration tasks. This system has the potential to benefit software developers, architects, and organizations to speed up software development cycles and reducing manual effort. To assess the potential of the system, we conducted surveys with six industry practitioners. After surveying practitioners, the system demonstrated notable advantages in enhancing development speed, automating repetitive tasks, and simplifying the prototyping process. While experienced developers appreciated its efficiency for specific tasks, some expressed concerns about its limitations in handling advanced customizations and larger scale projects. The code is publicly available at https://github.com/sirbh/code-gen

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

↑