Kinga Anna Marek
Politecnico di Milano, Italy
Luca De Martini
Politecnico di Milano, Italy
Alessandro Margara
Politecnico di Milano, Italy

Nubes: Object-Oriented Programming for Stateful Serverless Functions

Presentation: PDF

Serveless computing and the Function-as-a-Service (FaaS) model promise rapid development of cloud-based applications by abstracting away deployment and resource allocation. As the stateless nature of functions undermines the generality of the model, they are often paired with storage services to persist their state. However, this approach exposes state management to developers, who need to manually encode the interactions between functions and storage. The relations between functions and state are hidden within function implementations, negatively affecting modularity and reuse. To overcome these problems, we propose a novel abstraction that brings the benefits of object-oriented programming to FaaS, and we implement this abstraction into the Nubes framework. In Nubes, developers define objects that encapsulate state in the form of attributes and expose methods to other objects. Applications are written using familiar object-oriented concepts, Nubes then transparently and automatically manages the state of objects using a cloud storage service and handles the execution of serverless functions. Nubes simplifies application development and deployment and promotes the reuse of objects as composable building blocks for cloud applications. Using a case study, we show that Nubes significantly reduces code complexity with limited overhead with respect to manually crafted solutions.