Getty Images

Server-side WebAssembly takes shape, but faces challenges

Server-side Wasm's release next quarter will provide a cleaner way to connect apps, followed by further improvements in early 2024. Will it be enough to convince skeptics?

Server-side WebAssembly has gained a foothold in early-adopter shops but must be developed further to prove itself as a production-ready enterprise technology.

Maintainers of the WebAssembly System Interface (WASI) presented roadmap plans meant to do just that at this week's WasmCon event. These include a new component model slated for release by the end of the year that proponents say will improve how applications written in different programming languages can share the same WebAssembly (Wasm)-based platform. Another major release, WASI-Preview 3, planned for early 2024, will further refine the component model and add support for more types of applications.

Wasm is most used in web browsers and web applications, as well as content delivery networks (CDNs) where it can host custom applications without granting developers access to the underlying infrastructure. With the component model, WASI maintainers aspire to broaden server-side WebAssembly use to make it easier for applications written in different languages to share and move between cloud and edge platforms without requiring alterations to their code.

"Wasm's language neutrality and linkable modules … combine the benefits of a microservices architecture -- memory isolation and language choice -- with the benefits of a modular monolith [in] efficient cross-module calls," said Luke Wagner, distinguished engineer at CDN provider Fastly, in a WasmCon keynote presentation. "I call this use case, 'modularity without microservices.'"

To do this, WASI maintainers must expand WebAssembly from a compilation target into a framework that can support a broader ecosystem, said Wagner, who is among the champions of the component model proposal within the WebAssembly Community Group of the World Wide Web Consortium.

"If I have two Wasm modules, and I want to link them together, practically the only way to do that is to have them share memory," Wagner said. "What we need for [new] use cases is … [for them to have] their own separate memories that aren't shared … [and] some way of passing complex values between them."

This is where the component model comes in. The component model introduces a format for portable, lightweight and composable modules that encapsulate app components in different languages and standardize how they connect to one another, Wagner said.

WebAssembly makes progress, but devil's in the details

While WASI-Preview 2's stable release of the component model has not yet become generally available, WebAssembly platform vendor Cosmonic unveiled its first support for the components model in its Wasm-based PaaS product this week. The vendor's CEO conducted a live demo of the component model within the company's wasmCloud platform in which he moved a simple workload between AWS, Azure and an IoT device on his badge during a keynote presentation.

"If that doesn't let you know that the Wasm component model is ready for prime time, I don't know what [will]," said Liam Randall, founder and CEO at Cosmonic, during the presentation. "With the component model, we finally have our Docker moment."

Other WasmCon presenters took a more tempered view but still expressed optimism that server-side WebAssembly will be key to the next generation of edge computing in IoT and manufacturing environments.

We still see WebAssembly as the most promising solution. … [It] has such a low overhead compared to systems like containers that it's really a cheap decision.
Emily RuppelResearch scientist, Bosch Research

Over the last year, engineers at automotive, industrial technology and consumer goods manufacturing company Robert Bosch LLC and its subsidiaries have developed open source software components that link WASI to existing automotive compute systems, according to another keynote presenter.

"We still see WebAssembly as the most promising solution. … [It] has such a low overhead compared to systems like containers that it's really a cheap decision," said Emily Ruppel, research scientist at Bosch Research, during a WasmCon keynote presentation. "As much as it is challenging to make this work [with heterogeneous hardware targets], it's still our best bet because that low memory overhead means we have more room for applications on tiny [systems]."

So far, the WASI component model has also proven too heavy to run on the smallest IoT microprocessors, Ruppel said.

While Bosch's teams have demonstrated that their new WASI stack can support real-time, safety-critical applications in a manufacturing environment through lab tests, there's still much that needs to be done to make the tech more mature and to get it certified by regulators, Ruppel said.

"The big thing that's keeping us from taking WebAssembly and deploying it in real safety-critical systems right now … is that establishing the safety of an emerging standard is extremely challenging," she said. "A concerted effort to safety-certify the WASI toolchain will be required."

Luke Wagner WasmCon presentation
Fastly distinguished engineer and WASI component model champion Luke Wagner explains the benefits of the WASI component model at WasmCon.

Slow but steady wins the race?

As these challenges emerge and more is disclosed about WASI's component model, some industry observers have begun to wonder whether it's all worthwhile.

"I'm not a big fan of the component model -- it feels like an obvious scope creep that's going to result in over-engineered APIs that never mature," wrote Dan Lorenc, co-founder and CEO at container-based software supply chain security vendor Chainguard Inc., in a LinkedIn post Sept. 5. "The group is now working on new neural network APIs, key/value stores -- if you can dream it, they can standardize it! … but history has shown that we never get these things right on the first try. Baking them into WASI means we'll either never finish, or get a bunch of formalized, half-baked APIs that make it harder to advance the spec long-term."

Lorenc isn't alone in doubts about server-side WebAssembly. According to the Cloud Native Computing Foundation's first State of WebAssembly report, released this week, enterprise IT pros that work with WASI remain in the minority, with 34% of 252 respondents saying they are currently using WASI in their projects. Another 34% said they planned to use it in the next 12 months. But there are several key features respondents said they were awaiting as WASI develops, such as support for HTTP requests, SQL stores and filesystem support.

WASI-Preview 3, due out in the first quarter next year, will break ground on important features WASI-Preview 2 doesn't address that are also crucial for production-grade enterprise applications, such as application concurrency and streaming support, according to Wagner's presentation. WASI-Preview 3 will introduce the concept of a handler that simplifies the connections between Wasm components, Wagner said.

Another WasmCon presentation explored ongoing work within the WASI group to fully support programming languages with garbage collection mechanisms that are among the most popular used by enterprises, including Go, Java, JavaScript, Python and Ruby.

Finally, WASI maintainers must address enterprise security concerns and ensure backward compatibility between versions of the technology as they go, which will also make for a slow process, said Larry Carvalho, an independent analyst at Robust Cloud. But in his view, that's OK.

"I would rather have the WASI standards team take time and do a good job than rush something through," Carvalho said. "A well-thought-out standard will enable radically different use cases rather than an approach that hobbles future innovation because WASI is half-baked."

Beth Pariseau, senior news writer at TechTarget, is an award-winning veteran of IT journalism. She can be reached at [email protected] or on Twitter @PariseauTT.

Dig Deeper on Systems automation and orchestration

Software Quality
App Architecture
Cloud Computing
SearchAWS
TheServerSide.com
Data Center
Close