无服务器计算的形式基础
Formal Foundations of Serverless Computing
摘要:
无服务器计算(也称为函数即服务)是一种新的云计算抽象,它使编写健壮的大规模Web服务变得更加容易。在无服务器计算中,程序员编写所谓的无服务器函数,云平台透明地管理操作系统、资源分配、负载平衡和容错。当对服务的需求激增时,平台会自动为服务分配额外的硬件并管理负载平衡;当需求下降时,平台会默默地释放空闲资源;当平台检测到故障时,它会透明地重试受影响的请求。2014年,Amazon Web Services推出了第一个无服务器平台AWS Lambda,现在所有主要的云计算平台都提供了类似的抽象。不幸的是,无服务器计算抽象暴露了一些低级的操作细节,这使得程序员很难编写和推理他们的代码。本文揭示了这个问题,提出$λ_Λ$,操作语义的本质无服务器计算。尽管是一个小的(半页)核心演算,$λ_Λ$模型的所有低级别的细节,无服务器功能可以观察。为了证明$λ_Λ$是有用的,我们提出了三个应用。首先,为了简化对代码的推理,我们提出了一个简化的无服务器执行的朴素语义,并精确地描述了朴素语义和$λ_Λ$的一致性。其次,我们用一个键值存储来增强$λ_Λ$,以允许对有状态无服务器函数进行推理。第三,由于少数无服务器平台支持无服务器函数组合,我们将展示如何使用组合语言扩展$λ_Λ$。我们已经实现了这种组合语言,并表明它优于以前的工作。
英文摘要:
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, and the cloud platform transparently manages the operating system, resource allocation, load-balancing, and fault tolerance. When demand for the service spikes, the platform automatically allocates additional hardware to the service 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. We have implemented this composition language and show that it outperforms prior work.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。