posted

1 Comment

VMware announced its serverless initiative at VMworld 2017, where a Functions-as-a-Service (FaaS) demo using Apache OpenWhisk, an existing open source FaaS technology, was presented. Since then, the serverless team has been working to define what a serverless framework by and for a VMware-based infrastructure would look like. The resulting work is Dispatch, a new VMware-originated open source project just released on GitHub.

Dispatch, built on Kubernetes, provides tools and services to deploy and manage production-ready, function-backed serverless applications. Dispatch expands beyond just function execution to provide a “batteries included” serverless framework for any environment running Kubernetes.

Dispatch is available today as an Apache License 2.0 open source project. As an initial release, the current feature set is minimal. We look forward to active engagement by the open source community, as well as design partners, as we continue to enhance and evolve Dispatch.

Dispatch_architecture_VMware_open_source

This diagram illustrates the architecture for Dispatch, a VMware-originated open source serverless framework.

Defining “Serverless”

Today’s developers and organizations are migrating large, monolithic legacy applications to microservice-based architectures to improve scalability and developer velocity. However, these benefits come at a cost, namely integration complexity. Additionally, developers still often interact directly with the infrastructure, whether it be virtual machines (VMs) or containers via Kubernetes or another container orchestrator.

Serverless is the next evolution of application and system design and deployment. Serverless applications are built upon functions—small code artifacts, which are compact and specific to a discrete task.

Functions are stateless and must rely on additional services, such as databases and object stores, to provide state. Functions are generally event-driven, meaning there is an event bus which provides the interface to and from a function execution. Because of these properties, functions are easily scalable on demand by definition.

Dispatch: More than Functions

Building, deploying and administering serverless applications requires more than just a function scheduler and executor. Dispatch brings features and services together to easily manage production-caliber applications and services that are built upon functions.

A Flexible FaaS

Dispatch itself is not a function scheduler and executor. Since there are several open source FaaS implementations, the Dispatch team decided three things early on.

  1. First, we would not create yet another open source FaaS.
  2. Second, the space is too young and immature to predict with any certainty that one FaaS would be the dominant player over others.
  3. Lastly, we would target Kubernetes as the deployment environment, which offers us a standard development and production environment whether on a laptop, private data center or the public cloud.

Instead, Dispatch abstracts the FaaS implementation via a driver interface allowing integration with one or more existing or future FaaS implementations. The initial Dispatch release includes drivers for OpenFaaS and Riff. Future drivers could include support for additional FaaS implementations, including public cloud offerings such as AWS Lambda.

The flexibility to integrate multiple FaaS implementations is more than just future proofing. This also opens the door to interesting scenarios where the same function can be executed on one or more different environments based on criteria such as locality, compute resources (GPU) or burst scaling onto the public cloud.

A Secure FaaS

Giving developers direct access to VMs and containers can be problematic. IT can quickly lose control over the production environment, with no knowledge of what software is actually running in their data center. On the other hand, if developers have no direct access to VMs and containers, this causes bottlenecks in IT and developer frustration.

Function-based deployments can alleviate much of this concern. Dispatch provides an environment where everything up to the actual function code can be managed and inspected. Pivotal Container Service (PKS) from VMware provides a secure and up-to-date Kubernetes service. Dispatch manages function runtimes and artifacts (containers) built on the latest Photon OS.

A Multi-Tenant FaaS

Dispatch is designed to work in a multi-user and multi-organization environment. Dispatch will integrate with existing OAuth 2.0-compatible identity providers, such as GitHub or Active Directory. Administrators will be able to create roles and permissions to ensure tight access control around the full Dispatch API.

A Proper API Gateway

To build a simple webhook or a richer web service in order to trigger the functions that make up a deployment, an API gateway is required. The API gateway provides routing and security.

Dispatch integrates the open source Kong API gateway to provide a production-quality solution for applications built on Dispatch. Simply define a route and bind it to a function to create a secure HTTPS endpoint.

Plays Well With Others

Integration with external services and events is critical for any serverless solution. Dispatch includes an external services interface that allows extending Dispatch to work with just about any other service. These services could be databases, to provide state to applications, or event sources, to provide triggers to functions. The interface is flexible and extensible.

Included in the preview release is a VMware vCenter Server driver, which allows functions to subscribe and react to vCenter events. Combined with the ability to create PowerCLI functions, Dispatch is already a powerful IT administrative tool.

Join the Dispatch Team

Dispatch began as a project within VMware xLabs, an idea incubator within VMware where innovative ideas like serverless can be fast-tracked to successful outcomes. Today, Dispatch is a public open source project.

You can find Dispatch code and documentation on Github. Many features are still a work in progress, but we encourage the curious to start building and imagining with us.