Overview
WebAssembly is a powerful tool for porting applications to the web and for speeding up data-intensive web apps. If you don’t know what WebAssembly is, how it works, or how to practically get started using it, now’s your chance.
Robert Aboukhalil (Invitae) leads a deep dive into WebAssembly, demonstrating how it can be used to speed up web tools. As a concrete case study, he’ll use fastq.bio, a web tool for analyzing DNA sequencing data in the browser. By rewriting portions of this tool into WebAssembly, he demonstrates how it’s possible to obtain a greater than 10x speedup compared to the original JavaScript implementation. Robert will also show you how to leverage WebWorkers alongside WebAssembly to maintain the UI’s responsiveness and how this enables you to more easily mount and parse files within a virtual filesystem.
He concludes by exploring how WebAssembly can be useful outside the browser—demonstrating how it’s possible to rearchitect fastq.bio so that the WebAssembly code runs in a serverless fashion instead of directly in the browser.
And because WebAssembly isn’t always the right tool, Robert also explores some rules of thumb on when to use WebAssembly and when to avoid it.
Prerequisite knowledge
- Intermediate knowledge of JavaScript
What you'll learn
- Understand what WebAssembly is and how it works
- Learn to compile C/C++ code to WebAssembly and run it in the browser, use WebWorkers to run computations in the background, and run WebAssembly in a serverless setting
- Know when to use WebAssembly and when to avoid it
This session was recorded at the 2019 O'Reilly Open Source Software conference in Portland.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Watch now
Unlock full access