Developer Tooling for Cloud-Native Wasm Is Going Mainstream

MMS Founder
MMS Vivian Hu

Article originally posted on InfoQ. Visit InfoQ

The Cloud-native Wasm day at KubeCon + CloudNativeCon has become the go-to place for Wasm (short for WebAssembly) aficionados to gather and plot the future of the ecosystem. The focus of Cloud Native Wasm Day at KubeCon 2022 in Detroit is developer tooling for server-side WebAssembly.

Wasm was originally developed as a secure sandbox for the web browser. In recent years, it has found many applications on the server-side as a secure, lightweight, fast, and portable alternative to VMs and Linux containers (LXCs).

The event featured well-known companies such as Docker, Microsoft, VMWare, Fastly, Red Hat, and Cisco, as well as startups such as Fermyon, Second State, SingleStore, Cosmonic, and Suborbital.

Docker+Wasm

At the event, Docker announced Docker+Wasm technical preview in partnership with CNCF’s Wasm runtime WasmEdge. Docker CTO Justin Cormack shared how Wasm fits into Docker’s vision of supporting multiple types of containers. Then, Chris Crone from Docker and Michael Yuan from Second State presented how to build, run, and share Wasm apps using the Docker toolchain.

The demo app in Docker+Wasm, based on WasmEdge and provided by Second State, is a database-driven web application written in Rust and compiled into Wasm to run inside WasmEdge. The entire application can be built in containers (eg, a container with a pre-configured Rust dev environment) and deployed side by side with containers (eg, a container with a MySQL database) with a single “docker compose up”command.

Component model

Within the community, there are many efforts to improve Wasm to make it easier for companies like Docker to build tools for Wasm. The consensus effort is the component model for Wasm. Luke Wagner from Fastly gave an excellent talk on the design and progress of the component model, which would dramatically improve Wasm module’s reusability and composability. It will better access from one Wasm module to other modules and systems, including the operating system APIs (eg, networking). Major Wasm runtimes such as WasmEdge and Wasmtime are already committed to supporting and implementing the component model proposal.

While the Wasm component model is still a work in progress, the community is already using part of the spec. Brooks Townsend from Cosmonic gave a talk demonstrating practical examples of Wasm components that can migrate across clouds and devices using wasmCloud. Then Taylor Thomas discussed what component model applications could look like in the real world.

The Wasm component model defines new ways to manage and interact with Wasm modules. Bailey Hayes of Cosmonic and Kyle Brown from SingleStore, presented warg, a cryptographically verifiable and transparent registry for Wasm components. It could enable Wasm component modules to achieve new software supply chain security levels.

Programming languages

Programming language support is a crucial part of developer tooling. Several talks on Wasm day are about supporting new programming languages in Wasm.

Daniel Lopez Ridruejo and Rafael Fernandez Lopez from VMWare Office of CTO and Wasm Labs demonstrated the mod_wasm project. It is an Apache module that runs PHP applications in Wasm. The project has already advanced enough to run complex PHP applications such as WordPress.

Joel Dice from Fermyon explained how to run Java applications in Wasm. It is still early, as there is no support for GC in Wasm. But short-lived Java programs can already run without GC.

Christian Heimes from Red Hat discussed the current support for Python in Wasm runtimes. The CPython project can be compiled into Wasm, which allows a diverse set of Python applications to run on Wasm both in the browser and on the server!

Ivan Towlson from Fermyon discussed new features in the .NET runtime for Wasm that allows C# programs to better interoperate with C programs.

Embedded functions

A common use case for Wasm is for developers to create extensions for established software products or platforms.

The SingleStore presentation from Carl Sverre demonstrated how developers could use the Wasm runtime embedded in SingleStore’s cloud database to customize data processing through UDFs. By leveraging the built-in AI capabilities provided by SingleStore, developers can create sophisticated video games on that database platform!

Guba Sandor and Dubas Adam from Cisco presented a Wasm-based plugin system for the Envoy Proxy that is specifically designed for customizing logging data pipelines.

Cloud services

Finally, for developers, the easiest way to deploy Wasm functions is to have someone else manage the infrastructure for users. Several choices from startups are in this area in the cloud native Wasm day.

Fermyon launched the Fermyon Cloud service that lets developers simply turn a GitHub repo into a serverless microservice. The Fermyon Cloud fetches source code from the GitHub repo, builds it into Wasm bytecode, runs it on demand, and connects HTTP input and output to it.

Cosmonic launched a PaaS that enables developers to create, compose, run, and scale Wasm modules across clouds to accomplish complex workflows.

Suborbital showed a cloud-based extension engine for SaaS. It allows Wasm functions to be embedded into SaaS products as a more secure, faster, and more powerful alternative to web APIs.

Second State previewed flows.network, a serverless function platform for SaaS. Flow functions can be triggered by SaaS webhook events and send output to another SaaS API. It enables Wasm-based SaaS connectors (like Zapier but with code) and automated bots (eg, GitHub bots or chatbots).

About the Author

Subscribe for MMS Newsletter

By signing up, you will receive updates about our latest information.

  • This field is for validation purposes and should be left unchanged.