Nowadays, many companies design and develop their software systems as a set of loosely coupled microservices that communicate via their Application Programming Interfaces (APIs). While the loose coupling improves maintainability, scalability, and fault tolerance, it poses new challenges to the API evolution process. Related works identified communication and integration as major API evolution challenges but did not provide the underlying reasons and research directions to mitigate them. In this paper, we aim to identify microservice API evolution strategies and challenges in practice and gain a broader perspective of their relationships. We conducted 17 semi-structured interviews with developers, architects, and managers in 11 companies and analyzed the interviews with open coding used in grounded theory. In total, we identified six strategies and six challenges for REpresentational State Transfer (REST) and event-driven communication via message brokers. The strategies mainly focus on API backward compatibility, versioning, and close collaboration between teams. The challenges include change impact analysis efforts, ineffective communication of changes, and consumer reliance on outdated versions, leading to API design degradation. We defined two important problems in microservice API evolution resulting from the challenges and their coping strategies: tight organizational coupling and consumer lock-in. To mitigate these two problems, we propose automating the change impact analysis and investigating effective communication of changes as open research directions.
翻译:当前,众多企业采用松耦合微服务架构设计并开发其软件系统,此类系统通过应用程序编程接口(API)实现服务间通信。尽管松耦合特性提升了可维护性、可扩展性与容错性,但也为API演进过程带来了新挑战。现有研究虽指出通信与集成是API演进的主要难题,却未阐明其深层原因及缓解路径。本文旨在识别微服务API演进的实际策略与挑战,并建立其关联性的全局视角。我们采用半结构化访谈法,对11家企业的开发人员、架构师及管理者进行17场深度访谈,并运用扎根理论中的开放式编码法分析访谈内容。最终,针对表述性状态传递(REST)与基于消息代理的事件驱动通信,我们归纳出六项策略与六大挑战。演进策略主要聚焦于API向后兼容性、版本管理及跨团队紧密协作,而挑战则涵盖变更影响分析的复杂度、变更沟通的低效性,以及消费者对旧版本的依赖所导致的API设计退化。基于这些挑战及其应对策略,我们定义出微服务API演进中的两个关键问题:组织紧耦合与消费者锁定。为缓解这两类问题,本文提出将自动化变更影响分析与高效变更沟通机制作为开放研究方向。