WebAssembly heralds 'third wave of cloud computing'

Wasm: 'Speed and agility is the name of the game'

WebAssembly heralds 'third wave of cloud computing'

Image:
WebAssembly heralds 'third wave of cloud computing'

WebAssembly, the technology originally designed to allow applications to run at near-native speeds in the browser, has evolved into a versatile format capable of running lightweight workloads across multiple environments.

WebAssembly (Wasm) boasts extremely fast startup times of around half a millisecond, making it significantly quicker than the second-scale wait for containers to boot from cold. It's also portable, secure, economical with resources, and language agnostic - code written in many different languages can be compiled to Wasm format.

Thanks to recent developments, Wasm can now offer a much lighter alternative to containers on Kubernetes, making it suitable for event-driven serverless functions and for edge deployments, where speed and low resource usage are critical.

A key component in this is RunWasi. Developed by Microsoft and now part of the containderd project (software responsible for running and managing containers), RunWasi enables the integration of Wasm with containers and Kubernetes. This allows Wasm workloads to be run alongside traditional containerised applications.

"With RunWasi, we're bridging the gap between WebAssembly and Kubernetes, empowering developers to leverage the speed and efficiency of WebAssembly within their containerised environments," said Ralph Squillace, principal product manager at Microsoft, during a session at the KubeCon event in Paris last week.

A more recent addition to the plethora of tools, addons and "shims" emerging around Wasm is SpinKube, which was created to simplify the deployment and orchestration of Wasm workloads in Kubernetes. Developed by serverless cloud specialist company Fermyon, together with Microsoft, Suse and Liquid Reply, SpinKube has now been donated to the Cloud Native Computing Foundation (CNCF), paving the way for it to become a fully fledged part of the Kubernetes ecosystem.

"This is the third wave of cloud computing", said Michelle Dhanani, principal software engineer at Fermyon (the first two eras being represented by VMs and containers).

"Speed and agility is the name of the game here. Compile your app once directly to the WebAssembly binary format and use that same binary across multiple architectures and operating systems with no changes."

Wasm can run on all Kubernetes distributions, from small k3s clusters on edge devices up to enormous global scale deployments. The integration of Wasm with Kubernetes through containerd, RunWasi and SpinKube should open up many new possibilities for developers, especially for edge and serverless applications.

At KubeCon, German optics manufacturer Zeiss demonstrated the use of Wasm applications in a Kubernetes-based event-driven online ordering system, noting a marked increase in speed over containers.

Indeed, the cloud native ecosystem around Wasm has reached a level of maturity where it is seeing early adoption by enterprise. The curve is moving upwards.

For Michael Azoff, chief analyst cloud & datacentre research practice at Omdia, "the big news at KubeCon Paris was the WASI 0.2 release."

WASI (WebAssembly System Interface) is essentially the component that enables portability.

"WASI 0.2 is a stable release of the Wasm component model, allowing for cross-language component integration," Azoff explained. "WASI operates in what are called 'worlds'. The current ones are wasi-cli, a command line interface similar to POSIX; and wasi-http, a request and response model. More worlds are in development."

Despite the lowly version number, Azoff said a number of "blue-chip names" are now building applications using Wasm/WASI.

It's a technology that's emerging from the labs and into the real world.