Anthony Harvey/Getty
- WebAssembly, often abbreviated to WASM, is a cutting-edge new development technology that's delivering on the long-held promise of writing code once, and having it run anywhere.
- It's being embraced by Microsoft, Google, Apple, Amazon, and startups like Fastly and CloudFlare, as a more efficient, better way to run software.
- Docker, a hot developer technology, is widely regarded as getting closer to the dream of code that you can "write once, run anywhere." But Docker creator Solomon Hykes has said that WASM is the wave of the future.
- Business Insider spoke to several companies about the rush towards WASM, and why developers are excited about it as the next big thing in software development.
- Visit BusinessInsider.com for more stories.
The elusive holy grail of application delivery for the past three decades has been the promise of enabling the ability to write application code once and and run it anywhere.
It's a quest that has felled companies big and small - but that might finally now be coming to fruition in a cross-industry effort to push new standards, loosely aligned around the name WebAssembly, commonly referred to by the acronym WASM.
Apple, Google, Amazon and Mozilla are among the many existing vendors that are working to develop WASM. Newer companies like Cloudflare and Fastly, as well as startups like Wasmer, are rushing to enable a new future that delivers on a promise that generations of developers have chased after.
With WASM and the related WebAssembly System Interface (WASI) efforts, backers are building a technology system that can run on any type of web browser, mobile device, or on any server or system architecture, without the need to adjust, re-compile or target any one specific system - which has always been the achilles heel of all application development. Even Java, which when created by Sun Microsystems (and later acquired in 2010 by Oracle) initially boasted the promise of write once run anywhere, has long fallen short of that mark.
WASM itself is something that is supported today in all major web browsers (Google Chrome, Microsoft Edge, Apple Safari and Mozilla Firefox). With WASI, which was initially developed by Mozilla, WASM moves beyond the browser and can run outside of browsers on servers as well. It's still early days, but the potential is there with WASM and WASI to one day run nearly any type of application, in a faster, more efficient way than ever before.
So what exactly are Cloudflare and Fastly customers getting that they weren't without WASM? Fundamentally, WASM is plumbing and is something that most end users will likely never know about. For developers, though, WASM is a watershed, providing a new way to more rapidly deploy code with an increased level of operational performance. The promise of WASM that early adopters like Cloudflare, Fastly, Google and AWS are hoping to benefit from is an easier, more secure way for both their own operations and developer customers to get application code running faster.
Closer to the dream
More recently, Docker, the startup behind the eponymous software container technology, has come closer than anyone ever before in enabling the write once/run anywhere reality. Docker's technology has gone far beyond the company itself, and basically started an industry-wide trend in Silicon Valley and beyond around software containers.
Containers, however, also have issues, as they requires developers to specifically target different systems architectures (Intel's x86 and the competing ARM processor architectures) as well as operating systems (Windows or Linux containers). In fact, one of the biggest backers of WASM is none other than Docker founder Solomon Hykes himself.
"If WASM+WASI existed in 2008, we wouldn't have needed to created Docker," Hykes wrote in a tweet in March. "That's how important it is. Webassembly on the server is the future of computing."
Hykes' enthusiasm for WASM isn't just some form of bystander cheering from the sidelines either. He is an investor in startup Wasmer, which is working to build technologies and a platform that brings WASM to the masses of application developers.
"Docker is a great technology and they have a lot of adoption, but the way that WebAssembly works it lets you create a form of a much more optimal container," Syrus Akbary, founder and CEO at Wasmer, told Business Insider. "I saw an opportunity to become a new container system and that's actually one of the mantras of the company."
Comparing WebAssembly to Docker, however, isn't where Mozilla sees the technology headed. Rather, the open source organization Mozilla - perhaps best known for its Firefox web browser - sees WebAssembly's potential as going beyond Docker.
"We expect that the combination of WASM and WASI won't just be an alternative to containers, but an improvement for most use cases," Lin Clark, Principal Research Engineer at Mozilla, told Business Insider.
"Containers became popular because they provide the benefits of virtual machines with an order-of-magnitude lower overhead. With WASM and WASI, we'll likely see another order-of-magnitude drop in overhead while preserving the same benefits. This means that the application will have faster start-up and a smaller memory footprint, making it easier to get these benefits on all kinds of devices," Slark said.
How WASM Works
So how does WASM actually work? At its most basic level, WASM enables the translation of different programming languages and their output into one format that is universally understood.
That's a big deal.
Currently, the way that developers work is with different languages that need to be put together into a format that can be executed (the "binary") on a specific operating system. What that means is that developers essentially need to write the same program binary more than once for different deployment models.
The promise of "write once, run anywhere" is just that - the developer only needs to put together the running application code (binary) once and it can run on any platform. For developers and the organizations that employ them, the business value of "write once, run anywhere" is less complexity and improved efficiency, as only a single universal binary needs to be created, instead of organizations needing to spend the time and resources to have multiple formats and versions.
The truly revolutionary aspect of how WASM works is that it takes complex attributes of a supported programming language and essentially abstracts those away.
WASM provides a different approach to application delivery than Docker, containers for example. With Docker, a technology known as a container engine, that has been specifically tuned for a given operating system, leverages the power of the underlying operating system to run isolated "containerized" applications. Those container applications are portable, but are by no means universal. Developers with containers still need to have different binaries for different operating systems and system architectures.
WASM doesn't require a separate container engine to run. Perhaps more importantly though, WASM runs at so-called native speed on a given system, without the additional performance overhead that a container or virtual machine layer might introduce.
How WebAssembly is used today
WASM isn't all just about future promise either. It's a production reality for some today, even though it's still a nascent technology.
At the very least, what WASM is already providing to companies that have chosen to support the technology is a new option for application deployment. The vendors that are supporting WASM are enabling developers to fulfill the promise of "write once, run anywhere," realizing potential operational, resource and performance gains.
The world's largest public cloud provider, Amazon Web Service (AWS) already enables its users to run WASM applications. According to AWS, WebAssembly has attracted significant attention from developers in recent months, aided by a number of broader developments in the community, and its customers are starting to use it to build applications.
Google is also embracing WASM as a way to help extend its own services and accelerate developer productivity.
"Right now we are seeing teams internally use WASM to augment their existing experiences with functionality that is not on the web platform that we already have code for, or we need to be predictably performant," Paul Kinlan, Web Developer Advocate at Google told Business Insider.
Content Delivery Network (CDN) Fastly also enables its users to run WASM on its platform. Going beyond just enabling its users to run WASM and get the benefit of faster application delivery, Mozilla's Lin explained that for her, the more interesting part of Fastly's adoption of WASM is how the company uses it as a foundational element of content delivery.
"By using WebAssembly, [Fastly] can have tens of thousands of different customers' modules running in the same process without compromising customer security, while having incredibly fast start up times," Lin said.
Cloudflare supports WASM delivery on its Workers serverless application deployment platform - providing its users with an approach that enables rapid delivery of applications and services, with less overhead than a traditional deployment model, which typically involves servers. Serverless is an emerging approach for computing that enables users to run code on demand, without the need to have a server running in the background.
WASM is also about speed, which is a big deal, especially for the emerging world of 5G deployments.
John Graham-Cumming, CTO of Cloudflare, explained to Business Insider that he sees great potential for workers and WASM with 5G edge deployment use-cases. With 5G, which is the next generation of cellular wireless technology, computing power can be put at the edge of a network in a cell tower, bringing things closer to end users. Having compute power closer to users also means there is an increased need for very low latency application delivery, which is something that WASM enables.
For Graham-Cumming, WASM is just the latest step in the continuing evolution of application delivery. It's an evolution that started with developers putting code on physical machines, which has evolved over time to treat hardware like software. With WASM, there is a further level of abstraction that Graham-Cumming said gives programmers exactly what they want.
"Fundamentally, it comes down to a programmer wanting to write some code and run it somewhere," Graham-Cumming said.