For programmers, building a new application is never as simple as writing the code. That's because most software depends on other software, such as database management systems, to work. Just because an application works on your laptop doesn't mean it will work well on your company's data center, which might lack some of the software it depends on.
Investors have poured hundreds of millions of dollars into startups like HashiCorp and GitLab that try to streamline the process of getting applications ready to run in data centers. One of the most prominent of these is Docker , which popularized "containers," a technology that makes it easier to bundle up software to run in the cloud.
But Docker cofounder Solomon Hykes believes the technology he built the company around will soon be eclipsed by a newer technology for building portable applications known as WebAssembly, or "WASM" for short. Hykes and others think WASM is a faster and more secure alternative to traditional containers. Had WASM been around in 2008 when Hykes and company built Docker, they "wouldn't have needed” to create Docker, Hykes tweeted in March. "That's how important it is."
Hykes, who stepped down as CTO of Docker last year but is still on the company's board, isn't exactly a neutral party. He's an investor in a WASM-focused startup called Wasmer. And he quickly followed his initial tweet to say Docker might someday support WASM applications. Docker did not respond to a request for comment.
He's not the only one who sees promise in the new technology. Mozilla, the maker of the Firefox web browser, introduced WASM in 2017 as a new way to create applications that run in browsers. It's now supported by all major browsers, including Chrome and Safari. But it’s also being used to create applications that run outside of browsers. For example, cloud computing companies Fastly and Cloudflare now let customers run WASM applications on their servers.
It's still early days for WASM. Only a few languages, including C, C++, and Mozilla's Rust are currently supported. Cloudflare only recommends using WASM on its service for narrow, computing heavy uses, such as audio processing or resizing images, not for building full-blown applications. But Wasmer founder Syrus Akbary believes it will eventually become a universal computing platform, fulfilling Java's 1990s "Write once, run anywhere" marketing tagline.
Java lived up to that promise, to an extent. But as application development has grown more complex, developers now face challenges beyond ensuring that an app runs on multiple hardware architectures and operating systems. One is the need to install and configure additional software to make an application work properly. Docker and similar tools tackle that problem. But Fastly CTO Tyler McMullen says previous technologies designed to make applications more portable tend to create a trade-off between security and performance. WASM, he says, doesn't require such compromises. "We looked at existing technologies and nothing else fit our needs," he says.
WASM's benefits stem from its origins as a browser technology. Browsers now exist for practically every computing device you can think of. Browser makers and web-standards bodies have spent years ensuring that web developers can write code that will work on practically any standards-compliant browser, regardless of the end user's hardware and operating system. Browser makers have also taken pains to keep websites’ code isolated from your device’s operating system and even from other websites you might have open.
WASM essentially lets programmers write in a "high level" language and then translate it into a type of low-level language called "bytecode" that requires less translation. The key is that the translation into WASM bytecode happens before you visit a site, so your computer has less work to do after you download the code.
In that sense, WASM is similar to the Java platform, which enables developers to write code in the Java language or a few others, and translate it into a bytecode language that can run on many different platforms. But Fastly’s McMullen says WASM applications use fewer computing resources than Java applications. Because of Mozilla's efforts to isolate WASM code from the device it runs on, there’s less concern that applications will interfere with each other. McMullen says WASM might make multi-user applications safer by keeping different users of the same application isolated from each other.
Mozilla principal research engineer Lin Clark, who has been working on WASM, thinks there could be other security benefits as well.
Developers often rely on open source "modules" that can provide common functionality like password authentication. These components make life easier for programmers by freeing them from the need to reinvent the wheel. But it requires developers to trust a growing number of outsiders. Last year, after a developer handed control over a data processing module for the popular programming platform Node, the new owner used the module to distribute malware.
Clark says WASM could be used to isolate these modules not only from the underlying code platform, but from each other. Or different WASM systems could let developers specify permissions for each piece of code, not unlike the way you can set different permissions for smartphone apps.
- “Walls often fail; they have unintended consequences ”
- Pro tips for shopping safe on Amazon
- “If you want to kill someone, we are the right guys ”
- Grabbing the world's carbon with supercharged plants
- Kitty Hawk, flying cars, and the challenges of “going 3D”
- 🏃🏽♀️ Want the best tools to get healthy? Check out our Gear team's picks for the best fitness trackers , running gear (including shoes and socks ), and best headphones .
- 📩 Get even more of our inside scoops with our weekly Backchannel newsletter