WebAssembly could improve security and efficiency of web services
You can bootstrap a WebAssembly virtual machine from your server side application, such as a Node.js app, and then execute high performance and potentially unsafe code inside the virtual machine. The major use cases are web applications that require native performance or must execute user-submitted code.
Native code is often used where high performance and efficiency are required. The popular Node.js runtime is written in native C/C++. Native code runs AI inference, big data analytics, image and video processing, and scientific computing. WebAssembly is a light, fast, and cross-platform container. It is a safe and managed alternative to native code. Learn more here.
User submitted code is the cornerstone of cloud native or serverless computing. For SaaS providers, users want to customize their experiences using code, or to create applications for their peers. Examples include Function as a Service, workflow apps, smart contracts, plugins, and extensions. WebAssembly supports multiple programming languages, and can provide a high performance sandbox for user submitted code with little resource consumption.
Second State provides an open source WebAssembly implementation (Second State Virtual Machine, or SSVM) that is specifically optimized for server side applications. It is
- High performance with support for JIT and AOP optimizations.
- Seamlessly supports server application frameworks, such as NodeJS. You can build high performance NodeJS apps with SSVM.
- Supports safe access to external resources, such as databases, message queues, and even new AI hardware
- Allows precise metering of computational resources for serverless apps.