论文标题

类型Afte Microservices体系结构中强大的合同演变

Robust Contract Evolution in a TypeSafe MicroServices Architecture

论文作者

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

论文摘要

微服务体系结构允许短暂部署周期和直接效果,但是当需要更改服务合同时,没有提供安全机制。保持微服务体系结构的健全性是一项容易出错的任务,只有最有纪律的开发团队才能访问。我们提出了一个微服务管理系统,该系统在静态地验证服务接口并支持兼容接口的无缝演变。我们定义了一种兼容性关系,该关系捕获了真实的进化模式,并体现了有关接口演变的已知良好实践。也就是说,我们允许在不破坏或需要升级消费者服务的情况下对生产商模块的数据字段进行添加,删除和重命名。接口的演变由运行时生成的代理组件支持,这些代理组件会在服务之间动态调整与静态检查的服务代码匹配的服务之间的数据。该模型是用核心语言实例化的,该核心语言由标记的过渡系统和类型系统定义,该类型系统可以阻止破坏变化的变化。核心语言的标准音质结果需要适配器的存在,因此缺乏适应性错误和管理模型的正确性。这种自适应方法允许逐步部署模块,而无需停止整个系统并避免丢失或误解系统节点之间交换的数据。实验数据表明,在我们的方法下,平均有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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源