TNS
VOXPOP
Where are you using WebAssembly?
Wasm promises to let developers build once and run anywhere. Are you using it yet?
At work, for production apps
0%
At work, but not for production apps
0%
I don’t use WebAssembly but expect to when the technology matures
0%
I have no plans to use WebAssembly
0%
No plans and I get mad whenever I see the buzzword
0%
Open Source / Software Development / WebAssembly

WebAssembly in 2024: Components Are and Are Not the Big Story

Use of WebAssembly is exploding as open source projects integrate it, but its promise this year hinges on whether a component model will be finalized.
Jan 5th, 2024 5:16am by
Featued image for: WebAssembly in 2024: Components Are and Are Not the Big Story
Image by Diana Gonçalves Osterfeld.

WebAssembly continued to be amazing in 2023, but as we saw, that’s not good enough. The big story of WebAssembly in 2024 will be about whether it fulfills its promise of deploying an application across various endpoints and devices running CPU instruction sets simultaneously, either from a single endpoint to endpoints or vice versa, and in any programming language. While the programming language issue may not be resolved in 2024, languages such as Rust, Go, and of course, JavaScript are likely candidates to help realize that Holy Grail in the near future if possible.

The last mile or the feasibility of such a scenario in the much-hyped promise of WebAssembly in 2024 hinges on whether a component model will be finalized. Meanwhile, beneath the scenes and less vocal or publicized, WebAssembly is exploding. Although not as widely discussed, open source projects using WebAssembly are being integrated in various ways across organizations. In 2024, you may not see explicit WebAssembly tools and processes, but similar to 2023, a lot of your favorite serverless applications, such as Azure, will likely encompass a range of Wasm-supported functionalities.

Other behind-the-scenes examples include WASM’s use for Flight Simulator, which occurred a few years ago, and Adobe’s previous offering of application access from the browser, along with numerous improvements in Fastly’s cloud edge platform and services, which rely heavily on WASM, will persist. However, WebAssembly’s behind-the-scenes workings and use with other tools and processes will likely not draw as much attention as the applications they support.

This is especially manifest in serverless applications, for which WASM powers features but runs in the background.

“If you drop into any of the three WebAssembly conferences – Wasm I/O, WasmCon or WasmDay – the number one use case you’ll hear doesn’t have to do with IoT [Internet of Things], plugin systems or even the web browser,” Matt Butcher, Fermyon co-founder and CEO, told The New Stack in an online conversation. “It’s server-side execution. WebAssembly is on the path to replace the first generation of serverless functions with a faster, more nimble runtime.”

Of course, there’s the involvement of AI, and as it sweeps across various types of software development and operations. It has already begun to collaborate with WebAssembly in some amazing ways. It will undoubtedly be something to watch in 2024 and observe how these collaborations unfold.

The Component Question Mark

A critical role in the deployment of runtimes within WebAssembly modules is played by a WebAssembly component, although its standardization is still in progress. Once finalized, this component model aims to extend WebAssembly’s usage beyond web browsers and servers. It will enable users to deploy various applications within lightweight modules at high speeds across thousands of endpoints simultaneously, using a component interface called the WebAssembly System Interface (WASI), all without altering the existing code.

This theory is a work in progress, and the community is actively striving to achieve it. Concurrently, there exists confusion about the concept of a component and its role in WebAssembly’s adoption. During a WasmCon keynote in September, Luke Wagner, a distinguished engineer at Fastly and the original co-creator of WebAssembly, described a Wasm component as an emerging, standard, portable, lightweight, finely sandboxed, cross-language and compositional module.

A component is a module containing imports, internal definitions and exports. Imports include elements like imported functions (such as a log function) that capture the I/O the component provides and its implementation dependencies. This approach avoids reliance on a fixed set of system calls or a fixed runtime global namespace. Wagner mentioned an ongoing formal specification with operational semantics, a reference interpreter and a reference test suite. Substantial progress has been made with BindGen and Wasm tools.

“The component model is what makes server-side WASM really exciting, as software development teams can add capabilities to their apps without requiring changes to the existing code, simply by adding new modules,” Torsten Volk, an analyst for Enterprise Management Associates (EMA), said.

For instance, a team could add a server-side WASM module for real-time analytics to provide a specific user group with valuable insights that may not be available to other users, Volk said. “This allows software vendors to offer customized applications based on customer need and willingness to pay for the enhanced capabilities,” he said.

An upcoming milestone is targeted for 2024. It involves synchronizing components with full parametric linking, value, resource, and handle types. This will enable WebAssembly to not just see use expanding beyond web browsers and servers, but it will empower users to deploy diverse applications across numerous lightweight modules at high speeds, simultaneously reaching thousands of endpoints. This is achieved through WASI. Notably, networking support (the last part of WASI Preview 2) is supposed to “land in the first quarter of 2024, removing a major adoption hurdle,” Butcher said.

“The first few component composition tools have arrived on the scene, and the Bytecode Alliance has begun publishing guidance on building components,” Butcher said. “We’re in that moment where a new weight has been dropped on the scale, and we’re waiting with bated breath to see how much of an impact this new technology has on the ecosystem.”

For AI, WebAssembly underpins much of the functionality for large language models (LLMs). The exciting developments we witnessed in 2023 provide only a taste of what is yet to come. The AI use case plays to three of WebAssembly’s strengths, Butcher said.

“The first is hardware neutrality. Building a GPU-agnostic Wasm app means being able to use a wide variety of AI hardware,” Butcher said. “The second is portability: Move your code as close to big computing power (or big data) as you can. And the third is the polyglot programming introduced by the component model. Imagine having Python’s data libraries accessible from JavaScript — like JavaScript co-arose with the internet, Wasm’s trajectory is coupled to AI.”

The ability to run LLMs on WASM enables development teams to add AI-based capabilities to existing applications simply by adding custom AI models in the form of standardized microservices, Volk said. With the component model, the WASM runtime can be relied on to provide LLMs with GPUs, RAM, storage and other hardware requirements to maximize performance and efficiency.

“As WASM apps are simple binaries, developers can update, replace, clone, delete or move them very quickly without the typical overhead associated with complex deployment processes,” Volk said.

The flexibility LLMs offer allows for rapid scaling and adaptability and makes it easy for development teams to experiment with minimal risk of operational disruption, Volk said. Developers could add new AI models targeted toward specific goals or user groups or even combine multiple LLMs to add more expertise that could then be sold as premium tiers.

“There could be separate LLMs for technical support, customer service and market analysis within a single application,” Volk said. “These LLMs could then chat about solutions to problems that involve all three of them or they could even ask the developer to add an additional model to fill out current knowledge gaps.”

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.