skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Reusable

Whip: higher-order contracts for modern services

Published:29 August 2017Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

References

  1. 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 ScholarGoogle ScholarCross RefCross Ref
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. Martin Fowler and James Lewis. 2014. Microservices. (2014). http://martinfowler.com/articles/microservices.htmlGoogle ScholarGoogle Scholar
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. Matjaz B. Juric. 2006. Business Process Execution Language for Web Services BPEL and BPEL4WS 2nd Edition. Packt Publishing.Google ScholarGoogle Scholar
  12. Leslie Lamport. 1998. The Part-time Parliament. ACM Trans. Comput. Syst. 16, 2 (May 1998), 133–169. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. Bertrand Meyer. 1988. Object-oriented Software Construction. Prentice Hall.Google ScholarGoogle Scholar
  16. Bertrand Meyer. 1991. Design by Contract. In Advances in Object-Oriented Software Engineering. Prentice Hall, 1–50.Google ScholarGoogle Scholar
  17. Bertrand Meyer. 1992. Applying Design by Contract. IEEE Computer 25, 10 (1992), 40–51. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Object Management Group. 2012. CORBA Component Model. Specification Version 3.3. http://www.omg.org/spec/CORBA/3. 3/Google ScholarGoogle Scholar
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. Randy Shoup. 2015. Service Architecture at Scale: Lessons from Google and eBay. (2015).Google ScholarGoogle Scholar
  21. Jim Waldo. 1998. Remote procedure calls and Java Remote Method Invocation. IEEE Concurrency 6, 3 (1998), 5–7. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Whip: higher-order contracts for modern services

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image Proceedings of the ACM on Programming Languages
          Proceedings of the ACM on Programming Languages  Volume 1, Issue ICFP
          September 2017
          1173 pages
          EISSN:2475-1421
          DOI:10.1145/3136534
          Issue’s Table of Contents

          Copyright © 2017 Owner/Author

          This work is licensed under a Creative Commons Attribution International 4.0 License.

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 29 August 2017
          Published in pacmpl Volume 1, Issue ICFP

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader