Introduction to FaaSr

Many applications developed in R can benefit from:

FaaSr is a package that makes it easy for developers to create R functions and workflows that can run in the cloud.

With FaaSr, you can focus on developing R functions and compose workflows, and leave dealing with the idiosyncrasies of different FaaS platforms and their APIs to the FaaSr package.

Function-as-a-Service (FaaS)

The first successful model of cloud computing is often referred to as Infrastructure-as-a-Service (IaaS), and offered by services such as Amazon EC2. While the IaaS model has enabled significant innovation in the delivery of scalable and affordable computing to various users (from individuals to small groups to large enterprises) it has a significant drawback: the complexity of managing the cloud servers (Virtual Machines, or VMs) is exposed to users. The more recent FaaS model of cloud computing addresses this problem by allowing users to use cloud services without the burden of managing servers.

An analogy that is often used is that IaaS is akin to renting a car, where the user is responsible for “managing” the car (driving, navigating, parking, fueling, etc), while FaaS is more akin to a taxi or ride-share, where the user accomplishes the same goal (moving from point A to point B) but the “management” of the car is offered by the service provider (taxi or ride-share company).

Examples of services that support the FaaS model include AWS Lambda, the OpenWhisk open-source project, and GitHub Actions.

Example use cases of FaaS in science

There are many successful commercial use cases of FaaS, and the approach can also provide a powerful framework for scientific applications. Examples include but are not limited to:

Without FaaS, deploying and managing such kinds of workflows is time-consuming, error-prone, and requires skills in system administration and configuration that pose significant barriers to researchers. For example, to deploy such an automated workflow in an IaaS cloud, a user needs to be familiar with creating a virtual machine, configuring it, installing software dependences, managing security configuration and updates, and managing the orchestration of multiple components/functions of the workflow. While these can be successfully navigated by large research teams with dedicated IT staff, it is generally out of reach to smaller groups or individual researchers.

With FaaS, it is possible to enable individual researchers and small teams to deploy such workflows without managing servers, bringing cloud capabilities closer to a wider range of researchers and applications. However, there are still challenges:

FaaSr supports the science use cases by addressing these challenges:

Overview of using FaaSr

While FaaSr provides an extensible platform to develop customizable workflows for advanced usage, in the common case a user:

These steps are covered with concrete examples in other vignettes