hal2069 / Faasm

High-performance stateful serverless runtime based on WebAssembly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Faasm Tests License Release Contributors

Faasm is a high-performance stateful serverless runtime.

Faasm provides multi-tenant isolation, yet allows functions to share regions of memory. These shared memory regions give low-latency concurrent access to data, and are synchronised globally to support large-scale parallelism.

Faasm combines software fault isolation from WebAssembly with standard Linux tools, to provide security and resource isolation at low cost. Faasm runs functions side-by-side as threads of a single runtime process, with low overheads and fast boot times. The underlying WebAssembly execution and code generation is handled by WAVM.

Faasm defines a custom host interface which extends WASI to include function inputs and outputs, chaining functions, managing state, accessing the distributed filesystem, dynamic linking, pthreads, OpenMP and MPI.

A preprint of our paper on Faasm can be found here.

Quick start

You can start a Faasm cluster locally using the docker-compose.yml file in the root of the project:

docker-compose up --scale worker=2

Then run the Faasm CLI, from which you can build, deploy and invoke functions:

# Start the CLI
./bin/cli.sh

# Upload the demo "hello" function
inv upload demo hello

# Invoke the function
inv invoke demo hello

Note that the first time you run the local set-up it will generate some machine code specific to your host. This is stored in the machine-code directory in the root of the project and reused on subsequent runs.

More information

More detail on some key features and implementations can be found below:

Experiments and benchmarks

Faasm experiments and benchmarks live in the Faasm experiments repo.

About

High-performance stateful serverless runtime based on WebAssembly

License:Apache License 2.0


Languages

Language:C++ 74.2%Language:C 13.2%Language:Python 7.6%Language:CMake 2.6%Language:Shell 1.1%Language:Dockerfile 0.7%Language:Makefile 0.3%Language:Lua 0.1%Language:Assembly 0.1%Language:TypeScript 0.0%Language:JavaScript 0.0%