Abstract
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.
Supplemental Material
Available for Download
This archive contains the Whip runtime monitor software and the appendices to the paper. The runtime monitor contains the Whip source code, the three case studies, a tutorial application, and the benchmark suite. The Whip asset was successfully evaluated by the ICFP Artifact Evaluation Committee. Additionally, the appendices of the paper are given in this archive; they contain the full proofs and definitions for the paper.
- Laura Bocchi, Kohei Honda, Emilio Tuosto, and Nobuko Yoshida. 2010. A Theory of Design-by-contract for Distributed Multiparty Interactions. In Proceedings of the 21st International Conference on Concurrency Theory. 162–176. Google ScholarCross Ref
- Feng Chen and Grigore Roşu. 2007. MOP: An Efficient and Generic Runtime Verification Framework. In Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications. 569–588. Google ScholarDigital Library
- Christos Dimoulas, Robert Bruce Findler, Cormac Flanagan, and Matthias Felleisen. 2011. Correct Blame for Contracts: No More Scapegoating. In Proc. 38th SOSP. 215–226. Google ScholarDigital Library
- Robert Bruce Findler and Matthias Felleisen. 2002. Contracts for Higher-order Functions. In Proceedings of the seventh ACM SIGPLAN International Conference on Functional Programming. 48–59. Google ScholarDigital Library
- Martin Fowler and James Lewis. 2014. Microservices. (2014). http://martinfowler.com/articles/microservices.htmlGoogle Scholar
- Sylvain Hallé, Taylor Ettema, Chris Bunch, and Tevfik Bultan. 2010. Eliminating Navigation Errors in Web Applications via Model Checking and Runtime Enforcement of Navigation State Machines. In Proceedings of the IEEE/ACM international conference on Automated Software Engineering. 235–244. Google ScholarDigital Library
- Kohei Honda, Nobuko Yoshida, and Marco Carbone. 2008. Multiparty Asynchronous Session Types. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 273–284. Google ScholarDigital Library
- John H. Howard, Michael L. Kazar, Sherri G. Menees, David A. Nichols, M. Satyanarayanan, Robert N. Sidebotham, and Michael J. West. 1988. Scale and Performance in a Distributed File System. ACM Trans. Comput. Syst. 6, 1 (Feb. 1988), 51–81. Google ScholarDigital Library
- Raymond Hu, Rumyana Neykova, Nobuko Yoshida, Romain Demangeon, and Kohei Honda. 2013. Practical Interruptible Conversations - Distributed Dynamic Verification with Session Types and Python. In Runtime Verification - 4th International Conference. 130–148.Google Scholar
- Limin Jia, Hannah Gommerstadt, and Frank Pfenning. 2016. Monitors and blame assignment for higher-order session types. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 582–594. Google ScholarDigital Library
- Matjaz B. Juric. 2006. Business Process Execution Language for Web Services BPEL and BPEL4WS 2nd Edition. Packt Publishing.Google Scholar
- Leslie Lamport. 1998. The Part-time Parliament. ACM Trans. Comput. Syst. 16, 2 (May 1998), 133–169. Google ScholarDigital Library
- Gary T Leavens, Albert L Baker, and Clyde Ruby. 2006. Preliminary design of JML: A behavioral interface specification language for Java. Software Engineering Notes 31, 3 (2006), 1–38.Google ScholarDigital Library
- Zheng Li, Yan Jin, and J. Han. 2006. A runtime monitoring and validation framework for Web service interactions. In Proceedings of the Australian Software Engineering Conference. 10–79. Google ScholarDigital Library
- Bertrand Meyer. 1988. Object-oriented Software Construction. Prentice Hall.Google Scholar
- Bertrand Meyer. 1991. Design by Contract. In Advances in Object-Oriented Software Engineering. Prentice Hall, 1–50.Google Scholar
- Bertrand Meyer. 1992. Applying Design by Contract. IEEE Computer 25, 10 (1992), 40–51. Google ScholarDigital Library
- Object Management Group. 2012. CORBA Component Model. Specification Version 3.3. http://www.omg.org/spec/CORBA/3. 3/Google Scholar
- Brian M. Oki and Barbara H. Liskov. 1988. Viewstamped Replication: A New Primary Copy Method to Support HighlyAvailable Distributed Systems. In Proceedings of the Seventh Annual ACM Symposium on Principles of Distributed Computing. ACM, New York, NY, USA, 8–17. Google ScholarDigital Library
- Randy Shoup. 2015. Service Architecture at Scale: Lessons from Google and eBay. (2015).Google Scholar
- Jim Waldo. 1998. Remote procedure calls and Java Remote Method Invocation. IEEE Concurrency 6, 3 (1998), 5–7. Google ScholarDigital Library
Index Terms
- Whip: higher-order contracts for modern services
Recommendations
Composition of heterogeneous web services: A systematic review
AbstractInitial developments in Service-Oriented Computing (SOC) led to the development of Web Services using the SOAP protocol and an extensive set of tools and methods for composing new services from those existing. Subsequently, other types ...
A theory of contracts for Web services
Contracts are behavioral descriptions of Web services. We devise a theory of contracts that formalizes the compatibility of a client with a service, and the safe replacement of a service with another service. The use of contracts statically ensures the ...
Timed service contract automata
AbstractWe equip a recently developed model for the specification of service contracts with real-time constraints. Service contracts offer a means to define the behavioural compliance of a composition of services, typically dictated in a service-level ...
Comments