August 01, 2022

Watch: Matt Butcher Shares How WebAssembly and Containers Work Together

Matt Butcher Matt Butcher

container docker finicky whiskers

Watch: Matt Butcher Shares How WebAssembly and Containers Work Together

There have been some claims that WebAssembly is a replacement for Docker containers. While these two technologies do overlap a little, we at Fermyon don’t think about them as conflicting technologies. Rather, we believe they are complimentary. And this belief is not baseless. We actually use the technologies together in our own applications.

At DockerCon, Matt Butcher introduced Finicky Whiskers for the first time, and explained how our favorite persnickety pet is powered by Wasm and containers. (And check out this article from the Docker blog on WebAssembly, containers, and Spin.)

A Twitter Post Out of Context

The talk begins with Solomon Hykes’ infamous tweet about Docker and WebAssembly:

If Wasm+WASI had existed in 2008…

But people don’t often quote the followup tweets in which Solomon sketches out running WebAssembly inside of Docker. Solomon understood how promising WebAssembly is, but did not believe it would actually replace containers.

In this presentation, I use that quote (and the follow-up tweets) as a way to discuss how the technologies fit together.

What Is Cloud Computing?

At the beginning of the talk, I offer a really generic characterization of cloud compute as:

A generic service for running my stuff on your servers, securely

At Fermyon, we are interested in WebAssembly as a cloud computing platform. That is, we view WebAssembly as being parallel to virtual machines (VMs) and containers. Unlike technologies like PaaS systems that merely obscure the compute layer from the user, we use WebAssembly as a compute layer.

And we think that Spin provides the developer tools to build out such applications. The Fermyon platform shows how to run such a system on your own resources.

And How Do Containers Fit?

If WebAssembly is a cloud compute technology, and containers are a cloud compute technology, then how do these two work together?

WebAssembly’s startup time and slim runtime requirements make it a great technology for HTTP microservices and web applications as well as a general event handling technology.

Containers, in contrast, excel in managing long-running processes as well as running existing applications (unmodified) in the cloud.

In the presentation, I show how Finicky Whiskers uses a containerized Redis instance along with several WebAssembly microservices. The interaction is seamless (in part because of the Nomad scheduler).

Wrapping Up

At the end of the video, I show how quickly the Spin microservices execute as the game is played, and how data is piped through Redis literally as fast as you can click a button in the game. And that is why we built Finicky Whiskers: To illustrate the performance and interoperability that you get from WebAssembly in the cloud.

But don’t take our word for it! You can also head over to the Docker blog and read their take on the same subject.

Interested in learning more? Join the discussion on Discord


🔥 Recommended Posts


Quickstart Your Serveless Apps with Spin

Get Started