I’ve been reading and writing about WebAssembly for a few months now and I have to say it got me very much intrigued. With several posts already published, it’s been quite a ride. Above all, one question remains open – what is the future of WebAssembly? or better yet – is WebAssembly the future?
In this post I’ll try to recap key points I’ve learned with my own thoughts and prophecies: from the future of web development to cloud computing and even blockchain.
- It has been heavily optimized
- JS has been used in the wild for two decades
- Numerous amount of amazing frameworks (Angular, React, Vue etc.) developed around it
- A huge number of communities worldwide
That being said, a change is inevitable.
As Andreas Rossberg said:
Taking The “Web” Out Of WebAssembly
We wanted to create a technology that is useful beyond “only” the Web. Despite its name (which is really a misnomer), WebAssembly is in fact carefully designed to be completely agnostic to the Web; at its core, it simply is a cross-platform low-level virtual machine that can equally be “embedded” into any other environment.https://medium.com/dfinity/why-webassembly-f21967076e4
One of the common misconceptions regarding WebAssembly is that it is intended to be working solely on the web – as it’s name suggests. As I’ve said previously, WebAssembly was originally intended for the web, but not only.
Let’s see where and how it has already been adopted.
To The Cloud
Major cloud providers saw the benefit of using WebAssembly out of the browser, and have already started incorporating Wasm in a various range of products:
- Fastly were one of the first companies to see WebAssembly’s potential on the server-side. They’ve since developed that into a serverless compute environment with startup times 100x faster than other alternatives, called Compute@Edge.
- Shopify turned to WebAssembly to use advanced customization tools pluggable by third parties. WebAssembly is used to make these customizations synchronous, secure and lightning fast.
- Solo.io in my opinion is another fascinating company. They are trying to use the OCI model as a base class for WebAssembly. Although they are focusing on ways to extend service mesh functionality, portable Wasm bundles could be a major step forward in ease of development. Just imagine a “Docker hub” for Wasm files – or as they call it – WebAssembly Hub, isn’t that cool?!
Some more cloud related projects
- Enarx is a Trusted Execution Environment. It keeps your data completely confidential, even from the hardware it’s running on.
- Krustlet is a tool to run WebAssembly workloads natively on Kubernetes.
- WaSCC implements an actor framework for connecting to cloud-native services, such as message brokers and databases.
And these are just a few use cases I saw fit to mention. This space keeps expanding as more and more vendors see the possibilities that WebAssembly brings to the table.
And I couldn’t possibly finish this section without mentioning the famous quote by Docker’s founder, Solomon Hykes from 2019:
If WASM+WASI existed in 2008, we wouldn’t have needed to created Docker. That’s how important it is. WebAssembly on the server is the future of computing. A standardized system interface was the missing link. Let’s hope WASI is up to the task!https://twitter.com/solomonstre/status/1111004913222324225
And to conclude, as solo.io put’s it: WebAssembly is the future of cloud-native infrastructure extensibility.
WebAssembly On The Blockchain
When writing this section, I came to a conclusion that this section would require a separate post to cover the history and basic terms since it is less common than other sections. Stay tuned for the dedicated Wasm & blockchain post coming soon!
That being said, let’s start with a quick intro and see why is WebAssembly on the blockchain actually needed.
A quick introduction
When Bitcoin was first created it defined the blockchain and also a scripting language for it’s blockchain called Script. Script is a very basic and Turing incomplete scripting language which is used for processing transactions within the Bitcoin network.
Bitcoin and Script laid out the foundations for smart contracts adoption, let’s see how.
Smart contracts and dApps
Ethereum, similarly to Bitcoin, is a decentralized open source blockchain but with significantly enhanced way to enable developers to compose complex smart contracts. This also led to the creation of decentralized applications (dApps).
Solidity and the EVM
The Ethereum smart contracts are written in Solidity, an object oriented language that was designed specifically for contract authoring, and are executed by the Ethereum Virtual Machine (EVM) that runs on the nodes within the network.
WebAssembly to the rescue!
Ethereum is facing a great deal of technical difficulties preventing it from growing and scaling as demand grows. One of the main issues with the current EVM is that it processes transactions sequentially.
The new EVM called eWASM stands for Ethereum WebAssembly. [..] This new architecture for the EVM will allow for much better performance and will make it possible to support smart contracts, accounts, states and much more on the new blockchain.https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62
WebAssembly has emerged as a strong candidate replacement for the current EVM. Its host independence, security sandbox and overall simplicity make it an ideal runtime for smart contracts. Furthermore, it also allows the development of contracts in a wide range of modern programming languages (Rust, C++, Go…).
Not Only Ethereum!
While Ethereum has an EVM, other infrastructure projects have a virtual machine too and are looking into WebAssembly: Polkadot, EOS, Parity, Tron, U°OS and many others. It appears that WebAssembly have become the de-facto standard for building a new blockchain.
WebAssembly is the future!
It seems that WebAssembly has a bright and interesting future coming. From the web to the cloud and on to cutting edge blockchain technologies – it seems like everyone is putting their faith into it.
WebAssembly would change the web as we know it in the near future.
That’s all for now. Feel free to follow me on twitter for regular updates and as usual like and comment at will. See you on the next one!