skip to main content
research-article
Open Access

Formal foundations of serverless computing

Published:10 October 2019Publication History
Skip Abstract Section

Abstract

Serverless computing (also known as functions as a service) is a new cloud computing abstraction that makes it easier to write robust, large-scale web services. In serverless computing, programmers write what are called serverless functions, which are programs that respond to external events. When demand for the serverless function spikes, the platform automatically allocates additional hardware and manages load-balancing; when demand falls, the platform silently deallocates idle resources; and when the platform detects a failure, it transparently retries affected requests. In 2014, Amazon Web Services introduced the first serverless platform, AWS Lambda, and similar abstractions are now available on all major cloud computing platforms.

Unfortunately, the serverless computing abstraction exposes several low-level operational details that make it hard for programmers to write and reason about their code. This paper sheds light on this problem by presenting λλ, an operational semantics of the essence of serverless computing. Despite being a small (half a page) core calculus, λλ models all the low-level details that serverless functions can observe. To show that λλ is useful, we present three applications. First, to ease reasoning about code, we present a simplified naive semantics of serverless execution and precisely characterize when the naive semantics and λλ coincide. Second, we augment λλ with a key-value store to allow reasoning about stateful serverless functions. Third, since a handful of serverless platforms support serverless function composition, we show how to extend λλ with a composition language and show that our implementation can outperform prior work.

Skip Supplemental Material Section

Supplemental Material

a149-jangda

Presentation at OOPSLA '19

References

  1. Istemi Ekin Akkus, Ruichuan Chen, Ivica Rimac, Manuel Stein, Klaus Satzke, Andre Beck, Paarijaat Aditya, and Volker Hilt. 2018. SAND: Towards High-Performance Serverless Computing. In USENIX Annual Technical Conference (ATC).Google ScholarGoogle Scholar
  2. Kalev Alpernas, Cormac Flanagan, Sadjad Fouladi, Leonid Ryzhyk, Mooly Sagiv, Thomas Schmitz, and Keith Winstein. 2018. Secure Serverless Computing Using Dynamic Information Flow Control. Proceedings of the ACM on Programming Languages 2, OOPSLA (Oct. 2018).Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Amazon 2018. AWS Lambda Developer Guide: Invoke. https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  4. Lixiang Ao, Liz Izhikevich, Geoffrey M. Voelker, and George Porter. 2018. Sprocket: A Serverless Video Processing Framework. In ACM Symposium on Cloud Computing (SOCC).Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Austin Aske and Xinghui Zhao. 2018. Supporting Multi-Provider Serverless Computing on the Edge. In International Conference on Parallel Processing (ICPP) .Google ScholarGoogle Scholar
  6. Alexander Bakst, Klaus v. Gleissenthall, Rami Gökhan K, and Ranjit Jhala. 2017. Verifying Distributed Programs via Canonical Sequentialization. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA) .Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Ioana Baldini, Perry Cheng, Stephen J. Fink, Nick Mitchell, Vinod Muthusamy, Rodric Rabbah, Philippe Suter, and Olivier Tardieu. 2017. The Serverless Trilemma: Function Composition for Serverless Computing. In ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward!) .Google ScholarGoogle Scholar
  8. Guillaume Baudart, Julian Dolby, Evelyn Duesterwald, Martin Hirzel, and Avraham Shinnar. 2018. Protecting Chatbots from Toxic Content. In ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software .Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Phil Bernstein, Sergey Bykov, Alan Geller, and Jorgen Thelin. 2014. Orleans: Distributed Virtual Actors for Programmability and Scalability . Technical Report. https://www.microsoft.com/en-us/research/publication/orleans-distributed-virtualactors-for-programmability-and-scalability/Google ScholarGoogle Scholar
  10. Mathias Björkqvist, Robert Birke, and Walter Binder. 2016. Resource management of replicated service systems provisioned in the cloud. In Network Operations and Management Symposium (NOMS).Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Oliver Bračevac, Sebastian Erdweg, Guido Salvaneschi, and Mira Mezini. 2016. CPL: A Core Language for Cloud Computing. In Proceedings of the 15th International Conference on Modularity.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Tej Chajed, Frans Kaashoek, Butler Lampson, and Nickolai Zeldovich. 2018. Verifying concurrent software using movers in CSPEC. In USENIX Symposium on Operating Systems Design and Implementation (OSDI).Google ScholarGoogle Scholar
  13. Sarah Conway. 2017. Cloud Native Technologies Are Scaling Production Applications. https://www.cncf.io/blog/2017/12/ 06/cloud-native-technologies-scaling-production-applications/ . Accessed Jul 12 2018.Google ScholarGoogle Scholar
  14. Ankush Desai, Amar Phanishayee, Shaz Qadeer, and Sanjit A. Seshia. 2018. Compositional Programming and Testing of Dynamic Distributed Systems. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA) .Google ScholarGoogle Scholar
  15. Cezara Drăgoi, Thomas A. Henzinger, and Damien Zufferey. 2016. PSync: A Partially Synchronous Language for Faulttolerant Distributed Algorithms. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL).Google ScholarGoogle Scholar
  16. Alex Ellis. 2018. OpenFaaS. https://www.openfaas.com . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  17. Matthias Felleisen and Daniel P. Friedman. 1986. Control Operators, the SECD-Machine, and the λ-Calculus. In Proceedings of the IFIP TC 2/WG 2.2 Working Conference on Formal Description of Programming Concepts .Google ScholarGoogle Scholar
  18. Jeffery Fischer, Rupak Majumdar, and Shahram Esmaeilsabzali. 2012. Engage: A Deployment Management System. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) .Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Sadjad Fouladi, , Francisco Romero, Dan Iter, Qian Li, Shuvo Chatterjee, Christos Kozyrakis, Matei Zaharia, and Keith Winstein. 2019. From Laptop to Lambda: Outsourcing Everyday Jobs to Thousands of Transient Functional Containers.Google ScholarGoogle Scholar
  20. Sadjad Fouladi, Riad S. Wahby, Brennan Shacklett, Karthikeyan Vasuki Balasubramaniam, William Zeng, Rahul Bhalerao, Anirudh Sivaraman, George Porter, and Keith Winstein. 2017. Encoding, Fast and Slow: Low-Latency Video Processing Using Thousands of Tiny Threads. In USENIX Symposium on Networked System Design and Implementation (NSDI).Google ScholarGoogle Scholar
  21. José Fragoso Santos, Petar Maksimović, Daiva Naudži¯unien˙e, Thomas Wood, and Philippa Gardner. 2018. JaVerT: JavaScript verification toolchain. Proceedings of the ACM on Programming Languages 2, POPL (2018), 50:1–50:33.Google ScholarGoogle Scholar
  22. Maurizio Gabbrielli, Saverio Giallorenzo, Ivan Lanese, Fabrizio Montesi, Marco Peressotti, and Stefano Pio Zingaro. 2019. No More, No Less - A Formal Model for Serverless Computing. In Coordination Models and Languages (COORDINATION). 148–157.Google ScholarGoogle Scholar
  23. Yu Gan and Christina Delimitrou. 2018. The Architectural Implications of Cloud Microservices. In Computer Architecture Letters (CAL) .Google ScholarGoogle Scholar
  24. Victor B. F. Gomes, Martin Kleppmann, Dominic P. Mulligan, and Alastair R. Beresford. 2017. Verifying Strong Eventual Consistency in Distributed Systems. In ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA) .Google ScholarGoogle Scholar
  25. Google 2018a. Cloud Functions Execution Environment. https://cloud.google.com/functions/docs/concepts/exec . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  26. Google 2018b. Google Cloud Functions. https://cloud.google.com/functions/ . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  27. Arjun Guha, Mark Reitblatt, and Nate Foster. 2013. Machine Verified Network Controllers. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) .Google ScholarGoogle Scholar
  28. Chris Hawblitzel, Jon Howell, Manos Kapritsos, Jacob R. Lorch, Bryan Parno, Michael L. Roberts, Srinath Setty, and Brian Zill. 2015. IronFleet: Proving Practical Distributed Systems Correct. In ACM Symposium on Operating Systems Principles (SOSP) .Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Scott Hendrickson, Stephen Sturdevant, Tyler Harter, Venkateshwaran Venkataramani, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau. 2016. Serverless computation with OpenLambda. In USENIX Workshop on Hot Topics in Cloud Computing (HotCloud) .Google ScholarGoogle Scholar
  30. John Hughes. 2000. Generalising Monads to Arrows. Science of Computer Programming 37, 1–3 (May 2000), 67–111.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Abhinav Jangda, Donald Pinckney, Yuriy Brun, and Arjun Guha. 2019. Formal Foundations of Serverless Computing. https://arxiv.org/abs/1902.05870 .Google ScholarGoogle Scholar
  32. Eric Jonas, Qifan Pu, Shivaram Venkataraman, Ion Stoica, and Benjamin Recht. 2017. Occupy the Cloud: Distributed Computing for the 99%. In Symposium on Cloud Computing.Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Microsoft 2018a. Choose between Azure services that deliver messages. https://docs.microsoft.com/en-us/azure/eventgrid/compare-messaging-services . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  34. Microsoft 2018b. Microsoft Azure Functions. https://azure.microsoft.com/en-us/services/functions/ . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  35. OpenWhisk 2018a. Apache OpenWhisk. https://openwhisk.apache.org . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  36. OpenWhisk 2018b. OpenWhisk Actions. https://github.com/apache/incubator-openwhisk/blob/master/docs/actions.md . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  37. Aurojit Panda, Mooly Sagiv, and Scott Shenker. 2017. Verification in the Age of Microservices. In Workshop on Hot Topics in Operating Systems .Google ScholarGoogle Scholar
  38. Daejun Park, Andrei Stefănescu, and Grigore Roşu. 2015. KJS: A Complete Formal Semantics of JavaScript. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) .Google ScholarGoogle Scholar
  39. Ross Paterson. 2001. A New Notation for Arrows. In ACM International Conference on Functional Programming (ICFP).Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Pulumi 2018. Pulumi. Cloud Native Infrastructure as Code. https://www.pulumi.com/ . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  41. Rodric Rabbah. 2017. Composing Functions into Applications the Serverless Way. https://medium.com/openwhisk/ composing-functions-into-applications-70d3200d0fac . Accessed Jul 5 2018.Google ScholarGoogle Scholar
  42. Ganesan Ramalingam and Kapil Vaswani. 2013. Fault Tolerance via Idempotence. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) .Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Ilya Sergey, James R. Wilcox, and Zachary Tatlock. 2017. Programming and Proving with Distributed Protocols. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) .Google ScholarGoogle Scholar
  44. Zhiming Shen, Zhen Sun, Gur-Eyal Sela, Eugene Bagdasaryan, Christina Delimitrou, Van Robbert Renesse, and Hakin Weatherspoon. 2019. X-Containers: Breaking Down Barriers to Improve Performance and Isolation of Cloud-Native Containers. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS) .Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Arjun Singhvi, Sujata Banerjee, Yotam Harchol, Aditya Akella, Mark Peek, and Pontus Rydin. 2017. Granular Computing and Network Intensive Applications: Friends or Foes?. In ACM SIGCOMM Workshop on Hot Topics in Networks (HotNets).Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. David Walker, Lester Mackey, Jay Ligatti, George A. Reis, and David I. August. 2006. Static Typing for a Faulty Lambda Calculus. In Proceedings of the Eleventh ACM SIGPLAN International Conference on Functional Programming.Google ScholarGoogle Scholar
  47. Lucas Waye, Stephen Chong, and Christos Dimoulas. 2017. Whip: Higher-Order Contracts for Modern Services. In ACM International Conference on Functional Programming (ICFP) .Google ScholarGoogle Scholar
  48. Sanjiva Weerawarana, Chathura Ekanayake, Srinath Perera, and Frank Leymann. 2018. Bringing Middleware to Everyday Programmers with Ballerina. In Business Process Management.Google ScholarGoogle Scholar
  49. James R. Wilcox, Doug Woos, Pavel Panchekha, Zachary Tatlock, Xi Wang, Michael D. Ernst, and Thomas Anderson. 2015. Verdi: A framework for implementing and formally verifying distributed systems. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) .Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Formal foundations of serverless computing

    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

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!