Why is the future of software services necessarily web assembly?
Web assembly (wasm) was originally developed by Mozilla, Google, Microsoft, apple and other famous companies of W3C. It is a high-performance execution engine of browser applications. With wasm becoming more and more popular in the developer community, wasm is also migrating from the client side to the server side, becoming a new cutting-edge technology of the server side.
It provides performance close to native code without sacrificing security.
Photo source: https://steveklabnik.github.i
Compared with containers such as 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.This works well with today’s cloud native microservice architecture.
Wasm consumes much less memory and resources than operating system level containers. Its modular security model allows the configuration of hardware and operating system resources for each function call, thus maintaining the local performance while ensuring security.
If we already have wasm + Wasi in 2008, we don’t need to start docker at all. Wasm is so important! Web assembly on the server is the future of computing. – Solomon hykes, co founder of docker
In addition, the server-side wasm has benefited from the significant innovation from the blockchain community in recent years.
At present, the server-side wasm is in the early stage, and there are still a lot of work to be done, including optimization, development tools and integration libraries, before it can be applied in large-scale enterprises. However, developers have applied it to micro services in emerging fields such as enterprise computing and decentralized blockchain applications.
The blockchain smart contract is unchangeable and automatically executed code. Decentralized applications (or dapps) can interact with smart contracts through a web interface. This makes smart contracts a natural micro service.
Large public blockchain networks (public chains) such as Ethereum, EOS and Polkadot are all committed to adopting wasm as their next generation execution engine. Therefore, public chain is the best platform for writing and deploying wasm services.
The server-side wasm benefits from billions of dollars of R & D investment in blockchain in recent years. Many of these blockchain R & D innovations are highly related to enterprise applications.
- Application determined by execution results
- Accurate billing of shared resources at the opcode level
- No trust consensus on calculation results
- Support for digital money infrastructure
- Formal verification of applications
- Zero Knowledge Computing
Let the code speak
Using second state’s buidl development tool, in a few minutes, you can deploy microservices on the blockchain network, and then build a decentralized web application around it.
The “back end” of the sample program in the document is the blockchain smart contract (microservice). It’s decentralized and cloud native.
Buidl of second state can also deploy wasm smart contract to ewasm test network of Ethereum foundation.
The next burst point of server-side wasm is the enterprise application outside the blockchain. In the data center, wasm provides multi language services (supports the rule on the server side!) It supports a variety of hardware and operating system platforms, consumes little computing resources, and can directly touch the underlying hardware (such as GPU and AI chips). Here you can see a conceptual demonstration of running the rule service in wasm.
The upcoming second state virtual machine (SSVM) is a wasm optimized for server-side applications.
In the field of blockchain, second state has been at the forefront of the world, providing virtual machine (ewasm) for the next generation of Ethereum compatible blockchain system. SSVM for blockchain natively supports 256 bit integer operations. Compared with other ewasm implementations, SSVM can process the unsupported opcodes in the virtual machine and realize the accurate calculation of gas, which greatly improves the performance.
In the field of cloud services, SSVM optimizes the functions of wasm for enterprises, such as efficient storage of program state, high-performance input and output, multithreading support, and direct support for hardware accelerator. Through cooperation with Qualcomm, SSVM can directly access the AI SDK of Qualcomm chip when running on Qualcomm chip.
The future of wasm is full of hope.
Join us and move forward to the next generation of cloud architecture!