FaaSr

R-CMD-check CRAN status DOI

Start here to learn about FaaSr, especially if you used the previous version of the FaaSr package before.

Introduction

FaaSr is a completely new local execution system. In this article we highlight the differences between the old and the new system.

There are two ways to use FaaSr. The recommended way for development and testing is to use faasr_test() from this package to run your FaaSr workflows locally on your own machine — no cloud credentials or accounts required.

When you are ready to deploy to production, use FaaSr-Backend, which handles execution across GitHub Actions, AWS Lambda, OpenWhisk, Google Cloud, and SLURM. For more information, visit https://faasr.io.

Transitioning from FaaSr v1

Requirements for using FaaSr

First, you need R (>= 3.5.0) installed on your machine.

Second, you need a project directory containing your workflow JSON file and your R function scripts.

Third, install FaaSr:

# install.packages("devtools")
devtools::install_github("FaaSr/FaaSr-package-v2")

Call faasr_test("path/to/workflow.json") from your project directory to run your workflow locally. FaaSr automatically creates a faasr_data/ directory to simulate cloud infrastructure.

Differences from FaaSr v1

The production execution backend — cloud deployment, S3 operations, and FaaS platform triggers — has moved to FaaSr-Backend. This package now focuses exclusively on local testing.

Local Testing

Project Structure

FaaSr creates a faasr_data/ directory automatically to simulate cloud infrastructure:

library(FaaSr)

# Directory structure (created automatically by faasr_test()):
# your-project/
# ├── workflow.json              # Your FaaSr workflow configuration
# ├── faasr_data/                # Created automatically
# │   ├── functions/             # (Optional) User R functions
# │   ├── files/                 # Simulated S3 storage
# │   ├── logs/                  # Log files
# │   └── temp/                  # Temporary execution files
# └── my_functions.R             # (Optional) Your R functions

Running a Workflow

Set your working directory to your project and call:

faasr_test("path/to/workflow.json")

Your workflow runs locally with full support for:

Limitations of Local Testing

Local testing with faasr_test() does not connect to any cloud infrastructure — all storage operations use the local filesystem. This means:

To deploy against real cloud infrastructure, use FaaSr-Backend.

Production Deployment

Once your workflow is validated locally, deploy it to the cloud using FaaSr-Backend, which supports GitHub Actions, AWS Lambda, OpenWhisk, Google Cloud, and SLURM.

For more information, visit https://faasr.io.