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.
Supplemental Material
- 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 Scholar
- 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 Scholar
Digital Library
- Amazon 2018. AWS Lambda Developer Guide: Invoke. https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html . Accessed Jul 5 2018.Google Scholar
- 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 Scholar
Digital Library
- Austin Aske and Xinghui Zhao. 2018. Supporting Multi-Provider Serverless Computing on the Edge. In International Conference on Parallel Processing (ICPP) .Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
- 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 Scholar
- Alex Ellis. 2018. OpenFaaS. https://www.openfaas.com . Accessed Jul 5 2018.Google Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
- 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 Scholar
- 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 Scholar
- Yu Gan and Christina Delimitrou. 2018. The Architectural Implications of Cloud Microservices. In Computer Architecture Letters (CAL) .Google Scholar
- 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 Scholar
- Google 2018a. Cloud Functions Execution Environment. https://cloud.google.com/functions/docs/concepts/exec . Accessed Jul 5 2018.Google Scholar
- Google 2018b. Google Cloud Functions. https://cloud.google.com/functions/ . Accessed Jul 5 2018.Google Scholar
- Arjun Guha, Mark Reitblatt, and Nate Foster. 2013. Machine Verified Network Controllers. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) .Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- John Hughes. 2000. Generalising Monads to Arrows. Science of Computer Programming 37, 1–3 (May 2000), 67–111.Google Scholar
Digital Library
- Abhinav Jangda, Donald Pinckney, Yuriy Brun, and Arjun Guha. 2019. Formal Foundations of Serverless Computing. https://arxiv.org/abs/1902.05870 .Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- Microsoft 2018b. Microsoft Azure Functions. https://azure.microsoft.com/en-us/services/functions/ . Accessed Jul 5 2018.Google Scholar
- OpenWhisk 2018a. Apache OpenWhisk. https://openwhisk.apache.org . Accessed Jul 5 2018.Google Scholar
- OpenWhisk 2018b. OpenWhisk Actions. https://github.com/apache/incubator-openwhisk/blob/master/docs/actions.md . Accessed Jul 5 2018.Google Scholar
- Aurojit Panda, Mooly Sagiv, and Scott Shenker. 2017. Verification in the Age of Microservices. In Workshop on Hot Topics in Operating Systems .Google Scholar
- 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 Scholar
- Ross Paterson. 2001. A New Notation for Arrows. In ACM International Conference on Functional Programming (ICFP).Google Scholar
Digital Library
- Pulumi 2018. Pulumi. Cloud Native Infrastructure as Code. https://www.pulumi.com/ . Accessed Jul 5 2018.Google Scholar
- Rodric Rabbah. 2017. Composing Functions into Applications the Serverless Way. https://medium.com/openwhisk/ composing-functions-into-applications-70d3200d0fac . Accessed Jul 5 2018.Google Scholar
- Ganesan Ramalingam and Kapil Vaswani. 2013. Fault Tolerance via Idempotence. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) .Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- Lucas Waye, Stephen Chong, and Christos Dimoulas. 2017. Whip: Higher-Order Contracts for Modern Services. In ACM International Conference on Functional Programming (ICFP) .Google Scholar
- Sanjiva Weerawarana, Chathura Ekanayake, Srinath Perera, and Frank Leymann. 2018. Bringing Middleware to Everyday Programmers with Ballerina. In Business Process Management.Google Scholar
- 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 Scholar
Digital Library
Index Terms
Formal foundations of serverless computing
Recommendations
Supporting Multi-Provider Serverless Computing on the Edge
ICPP Workshops '18: Workshop Proceedings of the 47th International Conference on Parallel ProcessingServerless computing has recently emerged as a new execution model for cloud computing, in which service providers offer compute runtimes, also known as Function-as-a-Service (FaaS) platforms, allowing users to develop, execute and manage application ...
FLY: A Domain-Specific Language for Scientific Computing on FaaS
Euro-Par 2019: Parallel Processing WorkshopsAbstractCloud Computing is widely recognized as distributed computing paradigm for the next generation of dynamically scalable applications. Recently a novel service model, called Function-as-a-Service (FaaS), has been proposed, that enables users to ...
Serverless Computing Revisited: Evolution, State-of-the-Art, and Performance Challenges
ICPE '23 Companion: Companion of the 2023 ACM/SPEC International Conference on Performance EngineeringMarket analysts are agreed that serverless computing has strong market potential, with projected compound annual growth rates varying between 21% and 28% through 2028 and a projected market value of 36.8 billion by that time. Although serverless ...






Comments