Web Almanac 2022 - WebAssembly Chapter

HTTPARCHIVE.ORG

The Web Almanac is a large-scale collaborative project involving more than a hundred contributors. Their goal is to create a snapshot of the web, the tools and techniques we are currently using, based on the results of crawling 8,000,000 websites. This year I wrote the WebAssembly chapter, with help from Jamie Macdonald, Ben Smith and Ingvar Stepanyan.

Web Almanac

It was a fun project to be part of, however, this year’s report shares a similar conclusion to the last, WebAssembly usage is quite limited on the web - just used by 0.05% of sites. I was not at all surprise or concerned by this result, there are perfectly good reasons why this is the case (you’ll have to read the Chapter to find out why!)

Frustratingly, the tech media coverage was rather selecting in reporting these results, focussing on the headline-grabbing aspects, and ignoring the narrative.

DevClass reported that “WebAssembly may be over hyped” and wrote:

Colin Eberhardt who wrote the WebAssembly analysis in the report does not hold back

VS Studio Magazine wrote that:

The new Web Almanac report, however, paints a less optimistic picture of the new tech

Journalism 🙄

Anyhow, onwards and upwards - this past fortnight has seen a raft of fantastic articles 👍

WebAssembly: The Future Looks Bright

MEDIUM.COM

OK, let’s dive in with something more positive! This article is a brief write-up based on a longer discussion with the folks behind Fermyon, Suborbital and Cosmonic. This article focusses on the future potential of wasm as a replacement for containers / VMs. A familiar story, but I do like the way it comes at it from the angle of anti-patterns.

Isolates, microVMs, and WebAssembly

CRMARSH.COM

Continuing on the same theme, this blog post delves into the details, comparing WebAssembly to a number of other methods for creating secure and lightweight containers / runtimes. This article also does a really good job of describing some of the current limitations. Well worth a read.

WebAssembly and the Road to Ubiquity

WASMCLOUD.COM

Let’s keep rolling with that optimism … This article acknowledges that WebAssembly is still very much a nascent technology, with challenging tooling, and aspects of vendor lock-in. However, the direction of travel should yield a lot of choice and freedom. Once again, the Component Model specification is highlighted for its important role in this future vision.

Postgres Wasm

SUPABASE.COM

This is exactly what you’d expect, a PostgreSQL server that runs entirely inside the browser. This isn’t just a fun technical challenge, it has utility too. A browse-based database is a great tool for learning, without the hassle of installation.

I also think it would be cool if this same tool could be used to grab snapshots of production databases. Imagine being able to log into the admin console, immediately create a copy of a production database with in the browser, then safely experiment with the contents.

Performance Comparison between WASM/Yew and JavaScript/React

MEDIUM.COM

I haven’t seen many articles focussed on WebAssembly performance recently. Early-on we saw quite a lot of these, claims that WebAssembly is (or should) be many times faster than JavaScript, which for the most part simply did not come true. However, that doesn’t mean to say you cannot use WebAssembly to create a performance advantage, in some cases, it can deliver exactly that.

mod_wasm: run WebAssembly with Apache

WASMLABS.DEV

Apache has been around for 27 years and still powers much of the web. With the addition of mod_wasm you can now invoke WebAssembly modules, written in a range of languages, directly from your Apache server. From glancing at the code, it looks like they are using the WASI stdin / stdout capabilities, similar to WAGI, which takes a cgi-bin inspired approach.