WebAssembly (WASM) was originally developed by Mozilla of W3C, Google, Microsoft, Apple and other famous companies. It is a high-performance execution engine for applications in the browser. As WASM becomes more and more popular with the developer community, it is also migrating from client to server, becoming the new edge of server technology.

Value proposition

The migration of WASM from client to server follows in the footsteps of previous generations of technologies such as Java and JavaScript. WASM offers some important value on the server side compared to existing solutions.

Compared to Java and JavaScript engines, WASM supports over 20 programming languages through the LLVM toolchain, giving developers the freedom to choose their language tools and greatly improving productivity. In particular, it supports influential new programming languages such as Rust. At the same time, WASM can easily support hardware functions such as CPUS, Gpus, AI-optimized chips and FPgas.

It provides near-native code performance without sacrificing security.

Steveklabnik. Making. IO/booster2018…

Compared with containers like Docker, it provides developers with a more abstract code execution environment, thus improving development efficiency. It can deploy code and applications directly without having to start the operating system. The Wasm program runs on different operating systems without modification. This works well with today’s cloud-native microservices architecture.

WASM consumes much less memory and resources than operating system-level containers. Its modular security model allows hardware and operating system resources to be configured for each function call, thus preserving native performance while ensuring security.

If we had WASM + WASI in 2008, we wouldn’t have started Docker at all. Wasm is so important! WebAssembly on the server is the future of computing. — Solomon Hykes, Docker co-founder

In addition, server-side WASM has benefited from significant innovations that have come out of the blockchain community over the years.

Blockchain is one step ahead

Server-side WASM is in its early stages and there is still a lot of work to be done, including optimizations, development tools, and integration libraries, before it can be used on a large scale in the enterprise. But developers are already using it for microservices in emerging areas like enterprise computing and decentralized blockchain applications.

Blockchain smart contracts are immutable and automatically executed code. Decentralized applications (or Dapps) can interact with smart contracts through a Web interface. This makes smart contracts a natural microservice.

Large public blockchain networks such as Ethereum, EOS and Polkadot are working on adopting WASM as their next generation execution engine. As a result, the public chain is the best platform for writing and deploying WASM services today.

The server WASM has benefited from billions of dollars of research and development investment into blockchain in recent years. Many of these blockchain innovations are highly relevant to enterprise applications.

  • Execution results determine the application
  • Accurately charge shared resources at the opcode level
  • Untrusted consensus on the results of the calculations
  • Support for digital currency infrastructure
  • Formal validation of the application
  • Zero knowledge computing

Let the code speak

Blockchain applications have made demos of decentralized microservices. Taking the example of developing a blockchain application with Second State’s BUIDL development tool, it takes a few minutes to deploy microservices on a blockchain network and then build a decentralized Web application on top of it.

The “back end” of the sample program in BUIDL is a blockchain smart contract (microservice). Smart contracts are decentralized and cloud-native.

Second State’s BUIDL will also be able to deploy WASM smart contracts to the Ethereum Foundation’s Ewasm test network.

The next flashpoint for server-side WASM is enterprise applications outside of blockchain. In data centers, WASM provides services in multiple languages (with support for Rust! On the server) , supports multiple hardware and operating system platforms, consumes few computing resources, and can directly access the underlying hardware (such as Gpus and AI chips). You can see a conceptual demonstration of running the Rust service in WASM here.

The road ahead

The upcoming Second State Virtual machine (SSVM) is WASM optimized for server-side applications.

In the blockchain field, Second State is already at the forefront of the world, providing virtual machines (Ewasm) for the next generation of Ethereum-compatible blockchain systems. SSVM for blockchain natively supports 256 bit integer arithmetic. Compared to other Ewasm implementations, SSVM denies the execution of opcodes with uncertain results, such as floating point calculations, within the virtual machine, while also enabling accurate calculations of GAS, thus greatly improving performance.

In the cloud services space, SSVM optimizes WASM’s functionality for the enterprise, such as efficient storage of program state, high performance I/O, multithreading support, and direct support for hardware accelerators. Through a partnership with Qualcomm, SSVM has direct access to the QUALCOMM CHIP’S AI SDK when running on the Chip.

The prospects for server-side WASM are promising.

Join us as we move towards the next generation of cloud architecture!