Fotolia
WebAssembly Hub boosts Envoy filter development
Examine WebAssembly Hub's features, why developers have turned to the portal to share Envoy filters and how it seems to be built for the long haul.
WebAssembly Hub is a public portal that allows developers to share WebAssembly binaries. Published by Solo.io in 2019, the portal is well-positioned to do for the WebAssembly/Envoy community what DockerHub has done for those in Docker development: serve as a common, community-based clearinghouse to consume, develop and share Envoy filters built using WebAssembly.
Let's explore some WebAssembly Hub features.
Programming WebAssembly to extend Envoy's capabilities
WebAssembly is an open standard to create portable binaries that can be used within a browser or on the server side. Unlike interpreted languages such as Java, C#, Python or Node.js -- which depend on the presence of an external runtime to execute the code -- WebAssembly binaries run as standalone executables. As a result, the binaries have a small footprint and execute quickly. Furthermore, WebAssembly binary support is built into the Firefox, Chrome, Safari and Edge web browsers.
WebAssembly is also used in server-side programming and has seen an upward tick in usage from binaries that provide endpoint logic within a microservices oriented application.
Envoy is a proxy technology used to manage requests and messages that communicate between processes over a network. Envoy is typically used in a service mesh, either as a standalone product or integrated into a larger service mesh framework such as Kubernetes' Istio, Hashicorp's Consul or Solo.io's Gloo.
The Envoy filter provides a variety of features that are important to operate highly distributed applications at web scale. It can be used as an API gateway, it can implement ingress and egress rules, or translate requests and messages between source and target endpoints according to the protocol supported by each.
How to use WebAssembly Hub
Developers can download custom WebAssembly filters from WebAssembly Hub to extend the capabilities of their Envoy installations. Also, developers can contribute modules to WebAssembly Hub for use by other developers. They can create and contribute custom modules to WebAssembly Hub with the wasme CLI tool. The tool will generate a shell project that serves as a starting point to develop custom WebAssmbly filters for Envoy, and developers can then add the code required to meet their needs.
WebAssembly Hub will remind developers of DockerHub. A developer modifies a configuration file in the framework that uses Envoy. The code below shows an example configuration file to add a custom Envoy filter to an Istio deployment.
apiVersion: wasme.io/v1 kind: FilterDeployment metadata: labels: app: wasme-test-app app.kubernetes.io/name: wasme-test-app name: myfilter namespace: bookinfo spec: deployment: istio: kind: Deployment filter: config: '{"name":"hello","value":"world"}' image: webassemblyhub.io/ilackarms/istio-test:1.4.2-0
A developer can then apply the new configuration to the given framework. The internals in the framework download the WebAssembly module from the public WebAssembly Hub repository and incorporate the module into Envoy.
Community-based repositories
One of the easiest ways to determine if a software development technology can stand the test of time is to look at the tools, resources and products that support the developers using it. A technology becomes more durable over time based on how the ecosystem evolves around a given technology.
For example, Git isn't going away anytime soon because it is foundational to the developer portals GitHub, Bitbucket and GitLab. The same can be said for DockerHub, the Docker image repository, NPM, the repository for Node.js packages, and MvnRespository for Java's Maven components. The lifecycle of a technology is directly proportional to the number of developers that contribute to and download its resources.
Put it all together
WebAssembly has proven to be a powerful technology on the server side. WebAssembly Hub shows great promise when developers apply it to extend Envoy's capabilities.
If developer adoption continues to grow and more modules meet a growing variety of developer needs, WebAssembly Hub is sure to be successful for a long time to come.