WebAssembly, or Wasm, has finally started becoming usable by ordinary developers. The arrival of a stable WASI 0.2 standard and the component model marks the beginning of what could be a major shift in the way software is written.
A half-day conference on Wasm at KubeCon EU showcased the potential of Wasm to radically change the way new code is written. Its popularity at Cloud Native Wasm Day indicates that a tipping point may be close.
WASI 0.2 and the component model, allowing Wasm components written in different languages to communicate using the common standard of WASI, is now stable enough that implementers can start to rely on it. Practical use cases are now being explored in earnest. Wasm is started to break out of a small niche populated mostly by hard core enthusiasts and gain a following from the broader developer community.
IoT software vendor Machine Metrics shared examples of using Wasm at the edge as part of a prototype system for analysing high-volume data in resource constrained environments. Sohan Kunkerkar and Peter Hunt from the CRI-O project demonstrated how containers, Kubernetes, and Wasm can interoperate. Bailey Hayes from the Bytecode Alliance gave a good overview of the potential for Wasm and the thinking behind the design of WASI and the component model.
While the practical reality of Wasm still lags the vision, what can be done is rapidly catching up to the ideas of what could be done. Popular languages such as Python now support Wasm as a target, though the developer experience is rough compared to what developers are used to. People are moving beyond toy problems and are now experimenting with non-trivial use cases that highlight real-world benefits.
Some Wasm-focused vendors—including Cosmonic, which employs Hayes—are keen to draw comparisons with Docker and how it popularised containers. Prior to Docker, the basic technologies required for containers (such as cgroups) existed, but were difficult to use. Docker provided the collected a ha moment the industry needed to adopt containers in earnest.
Docker’s major achievement was making containers relatively easy to use in ways that were already familiar. It was new, yes, but not completely. Containers injected a breath of fresh air into a stale room without destroying the rest of the house. Wasm could do the same, but to say Wasm has had its “Docker moment” is, I think, somewhat premature.
Wasm does need such a moment, but it is yet to arrive. The experience of using Wasm is still very different to what developers are used to, even those working at the cutting edge with cloud native technologies. The gap between Wasm and more traditional techniques such as virtual machines is larger still.
Most real-world applications need to interoperate with things that already exist; data lives in existing databases; customers use existing applications and physical devices like smartphones. The advent of WASI 0.2 and support for HTTP-based APIs is an important step, but more is yet needed. Happily, the enthusiasm for Wasm at Cloud Native Wasm Day indicates that a Docker moment may not be far away.
Hayes noted that the ecosystem of Docker was an important part of its success. At her first Docker-related meetup “Not only did I just build my first container, I built a container that I immediately shared with the person next to me,” she said. That experience remains elusive, but it is being pursued with vigour. Wasm presents a huge greenfield opportunity if that container experience can be duplicated with Wasm.
Wasm has the potential to supercharge open source by freeing it from its current language silos. As well as opportunities, this will magnify the existing challenges of open source software, not least how Wasm components can be sustainably maintained.
“It’s basically the next massive moment in computing that everyone is rallying around,” says Hayes.
Tech is full of hype that over-promises and under-delivers, yet here I find myself in cautious agreement. Wasm and WASI have so far managed to carefully pick their way through a landscape of pitfalls, landmines, and various other analogies for ways things can go wrong. It might still fail, but the accumulation of support seems to be building into something that, after many years of hard work, will suddenly be hailed as an overnight success.
The author traveled to KubeCon EU as a guest of the Linux Foundation.