Tutorial: Create and Deploy a Lightweight Microservice in WebAssembly - Tai Hung-Ying & Vivian Hu
Channel: CNCF [Cloud Native Computing Foundation]
Date: 2023-05-01

Tutorial: Create and Deploy a Lightweight Microservice in WebAssembly - Tai Hung-Ying & Vivian Hu, Second State

As companies and dev teams adopt the microservice architecture on a large scale, it is now common for large applications to have hundreds or even thousands of microservices on the backend. Running, managing, and scaling those microservices in VMs and even Linux containers have become increasingly complex and expensive. The WebAssembly (Wasm) runtime provides a compelling alternative as a lightweight and secure “container” to run microservices. The Wasm containers are often only 1% the size of comparable Linux containers. Wasm container apps can start and stop instantly, enabling zero-cost scalability. In this hands-on tutorial, we will go over the basics and architecture of Wasm-based microservices. Using their own laptops and cloud VMs, participants will learn how to create database-backed and event-driven microservices in both Rust and JavaScript and enhance them with AI inference (PyTorch) features and rich web services like Dapr. We will then run these microservices in the WasmEdge Runtime and deploy the Wasm containers using Docker and K8s tools.