Whip: higher-order contracts for modern services

Whip: higher-order contracts for modern services
复制标题

鞭子:现代服务业的高阶合同

DOI:
10.1145/3110280
复制
发表时间:
2017
影响因子:
--
通讯作者:
Christos Dimoulas
Christos Dimoulas
中科院分区:
--
文献类型:
--
作者:
Lucas Waye;Stephen Chong;Christos Dimoulas

文献摘要

被引文献

相似文献

在构建服务时,现代面向服务的应用程序放弃了语义丰富的协议和中间件。相反,它们采用通过简单网络协议进行通信的服务的松散耦合式开发和部署。尽管这些应用程序确实暴露了本质上更高层次的接口,但网络协议的简单性迫使它们依赖脆弱的底层编码。为了弥合明显的语义差距,程序员引入了临时且容易出错的防御性代码。受契约式设计的启发,我们选择了一条不同的途径来弥合这一差距。我们引入了Whip,一种适用于现代服务的契约系统。Whip(i)为程序员提供了一种针对现代服务需求定制的高阶契约语言;(ii)在运行时监控服务,以检测不符合其宣称接口的服务。契约监控是针对服务本地的。服务被视为黑盒,允许使用不同的实现语言,而无需修改服务的代码。因此,Whip不会破坏现代服务的松散耦合特性。
Modern service-oriented applications forgo semantically rich protocols and middleware when composing services. Instead, they embrace the loosely-coupled development and deployment of services that communicate via simple network protocols. Even though these applications do expose interfaces that are higher-order in spirit, the simplicity of the network protocols forces them to rely on brittle low-level encodings. To bridge the apparent semantic gap, programmers introduce ad-hoc and error-prone defensive code. Inspired by Design by Contract, we choose a different route to bridge this gap. We introduce Whip, a contract system for modern services. Whip (i) provides programmers with a higher-order contract language tailored to the needs of modern services; and (ii) monitors services at run time to detect services that do not live up to their advertised interfaces. Contract monitoring is local to a service. Services are treated as black boxes, allowing heterogeneous implementation languages without modification to services' code. Thus, Whip does not disturb the loosely coupled nature of modern services.