arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2002.06185cs.PL
收藏

TypeSafe MicroServices体系结构中的鲁棒契约演化

Robust Contract Evolution in a TypeSafe MicroServices Architecture

João Costa Seco, Paulo Ferreira, Hugo Lourenço, Carla Ferreira, Lucio Ferrao

摘要:

微服务架构允许短部署周期和即时效果,但在需要更改服务合同时没有提供安全机制。维护微服务架构的可靠性是一项容易出错的任务,只有最有纪律的开发团队才能完成。我们提出了一个微服务管理系统,静态验证服务接口,并支持兼容接口的无缝演进。我们定义了一个兼容性关系,捕捉真正的演变模式,体现了已知的良好做法的演变接口。也就是说,我们允许添加、删除和重命名生产者模块的数据字段,而无需中断或升级消费者服务。接口的演化由运行时生成的代理组件支持,这些代理组件动态地调整服务之间交换的数据,以匹配静态检查的服务代码。该模型在核心语言中实例化,其语义由标记的转换系统和类型系统定义,以防止部署破坏性更改。核心语言的标准可靠性结果需要适配器的存在,因此没有适配错误和管理模型的正确性。这种自适应方法允许逐步部署模块,而不会停止整个系统,并避免丢失或误解系统节点之间交换的数据。实验数据表明,在我们的方法下,平均69%需要调整和重新编译的部署是安全的。

英文摘要:

Microservices architectures allow for short deployment cycles and immediate effects but offer no safety mechanisms when service contracts need to be changed. Maintaining the soundness of microservice architectures is an error-prone task that is only accessible to the most disciplined development teams. We present a microservice management system that statically verifies service interfaces and supports the seamless evolution of compatible interfaces. We define a compatibility relation that captures real evolution patterns and embodies known good practices on the evolution of interfaces. Namely, we allow for the addition, removal, and renaming of data fields of a producer module without breaking or needing to upgrade consumer services. The evolution of interfaces is supported by runtime generated proxy components that dynamically adapt data exchanged between services to match with the statically checked service code.The model was instantiated in a core language whose semantics is defined by a labeled transition system and a type system that prevents breaking changes from being deployed. Standard soundness results for the core language entail the existence of adapters, hence the absence of adaptation errors and the correctness of the management model. This adaptive approach allows for gradual deployment of modules, without halting the whole system and avoiding losing or misinterpreting data exchanged between system nodes. Experimental data shows that an average of 69% of deployments that would require adaptation and recompilation are safe under our approach.

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

↑