Serverless Computing

Serverless Computing is a recent approach to cloud computing that provides programmers an interface to run functions on the cloud. Programmers does not have to think about resource allocation, or even configure the runtime environment. The serverless platform takes care of automatically managing dependencies, compiles code, allocates processor and RAM. With this model, programmers only need to focus on the application code. Recently several serverless platforms have appeared and some of the popular ones are: Microsoft Azure, Google Cloud Functions, Amazon AWS Lambda, and Apache OpenWhisk.

Unfortunately, writing correct serverless platforms and using this abstraction in the application, programmers need to know about low-level details of these serverless platforms. For example, when the deployed function is called from an application, the serverless platforms does not ensure that the function will be called right away. Instead the function can be called after any time. Another example is when the serverless platform fails to execute the function. In short, "Serverless Functions are not like ordinary functions". The programmer has to handle these cases in the application.

Formal Semantics of Serverless Computing

In this project, we developed operational semantics for serverless computing, λ. λ formalizes the internals of a serverless platform. λ describes the low-level behaviors of these serverless platforms, that includes failures, concurremcy, function restarts, and instance reuse. Programmers can use these semantics to guide the development of programming tools and extensions to serverless platforms.

Serverless Compositions

Serverless platforms encourage programmers to decompose large applications into several small functions. These functions can also be used by other programmers to compose with other functions. Smaller functions are not only easier to understand, but they also provides better reusability. Unfortunately, current solutions to serverless compositions exhibit significant overhead. We have extended our operational semantics to a new domain specific language called Serverless Programming Language (SPL). SPL provide interfaces for composing serverless functions and follows the operational semantics. SPL is based on provides the interface using three basic arrow combinators of Hughes' arrows. With SPL our benchmarks runs orders of magnitude faster than OpenWhisk Conductor.

SPL Implementations

  • OpenWhisk SPL implementation is available here.
  • Standalone SPL server for Google Cloud Function is available here.

Technical Paper

To know more about our work checkout our paper Formal Foundations of Serverless Computing.