Cloud

Open source project uses Docker for serverless computing

Pro
(Image: Stockfresh)

28 March 2017

Serverless computing has fast become a staple presence on major clouds, from Amazon to Azure. It is also inspiring open source projects designed to make the concept of functions as a service useful to individual developers.

The latest of these projects, called simply Functions as a Service (FaaS) by developer and Linux User contributor Alex Ellis, uses Docker and its native Swarm cluster management technology to package any process as a function available through a web API.

FaaS is designed to be more elementary than similar projects, mainly because it emphasises Unix mechanisms and metaphors as much as the tools of the Docker stack.

Simple little system
According to the project’s documentation, FaaS lets you set up containers equipped with a web front end. The front end passes along POST requests to the container’s process using Unix’s STDIN, and responses returned by STDOUT are sent back to the requester. An included UI, also web-accessible, lets you configure new containers and endpoints.

Included with FaaS are a small batch of example functions, such as taking input in Markdown format and generating HTML, or stashing the body of a webhook submission into the filesystem of a container. The examples are written in Go and Node.js, but no restrictions are placed on what language or runtime can be used. Anything that fits in a container can be utilised; functions can even be simple shell commands.

Also included in FaaS, is metrics collection by way of Prometheus. It can be used to perform rate and throughput checks for each function, but FaaS also works with Prometheus internally to perform autoscaling on demand when a function experiences heavy usage.

Currently FaaS only supports short-running, synchronous tasks, but the project’s road map hints at plans to support more robust task types. Another planned addition is request parameters; currently the only way to pass parameters to a function is by submitting JSON as the body of the request.

Spread of serverless
Several other serverless projects have surfaced in recent months. The Fission framework by Platform9 uses Kubernetes to deliver functions that are executed by a number of different triggers (although HTTP endpoints is currently the only one supported). It, too, intends to be independent of any language or runtime.

FaaS, while smaller, doesn’t require Kubernetes to run; because it only uses Swarm, it can run with Docker out of the box. That said, Ellis has mentioned targeting other orchestrators—such as Kubernetes—later on.

Other projects revolve around making the most of an existing serverless computing infrastructure, rather than building something new. Serverless Framework, formerly known as Jaws, is intended to make it easy to build and deploy apps on event-driven systems such as AWS Lambda. But it is not coupled specifically to any one serverless system—and it’s an open source project with highly liberal licensing, which makes it a useful foundation for other, equally general frameworks for working with a (brave new) serverless world.

 

 

IDG News Service

Read More:


Back to Top ↑

TechCentral.ie