Docker partners with WasmEdge to release WebAssembly support

At the Cloud native Wasm day event of KubeCon NA 2022 , the WasmEdge Runtime project of Docker and CNCF released a technical preview of Docker+Wasm . With just one command docker compose up, tens of millions of Docker developers can instantly build, share, and run a complete Wasm application.

Wasm was originally developed as a security sandbox in web browsers. It has found many applications in recent years as a secure, lightweight, fast and portable alternative to VMs and Linux Containers (LXC) on the server side. The field of Linux containers was originally pioneered by Docker.

The standard demo application in Docker+Wasm is provided by Second State. This is a database driven web application with a WasmEdge "container" for the entire web service (microservice), and two Linux containers for the backing service: one for the MySQL database, one for Niginx, Serves static HTML pages for the front-end UI. These three containers run side by side on the same network and form one application. Microservices are written in Rust and compiled to Wasm. It has a high-performance (non-blocking) HTTP server, an event handler (business logic for processing HTTP requests), and a MySQL database client. The entire "containerized" Wasm microservice is only 3MB, while the database and Nignix's Linux containers require hundreds of MB.

Source: Introducing Docker+Wasm Technology Preview

Docker Compose not only runs these Wasm applications alongside side containers, but also builds the Rust source code into Wasm. Developers don't even need to install the Rust compiler toolchain, as the entire build environment is also containerized by Docker. Docker+Wasm is a true end-to-end solution.

Docker's commitment to supporting Wasm in today's "multi-runtime" world is all the more important as Docker kicks off the container revolution that ushered in the cloud-native era.

The release of Docker+Wasm is very meaningful. We no longer live in a single runtime world: there are linux containers, Windows containers, and Wasm containers. OCI can package them all and I should be able to build and run them with docker. Solomon Hykes, co-founder of Docker.

The technology behind Docker+Wasm mainly comes from the open source community. For example, Docker relies on a container shim called runwasi , originally created by Microsoft's DeisLabs , to launch WasmEdge and execute Wasm programs.

It may be far more than just the Docker family who are deeply involved in open source. For example, the Red Hat team has integrated Wasm runtime support into the OCI runtime crun . This enables the entire Kubernetes stack to seamlessly support WasmEdge applications. In fact, the Liquid Reply team demoed Podman+Wasm with WasmEdge a few days before KubeCon .

Other Wasm applications showcased at the KubeCon event include AI inference applications, Dapr-based microservices , and data processing functions in streaming pipelines . Now with Docker+Wasm, developers can easily build, share and run these applications.

{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4532842/blog/5589039