Five-Project Series

Rust and WebAssembly Microservices you own this product

prerequisites
basic server-side application architecture • any compiled programming language (eg Java, C, C++, Go)
skills learned
design applications using the microservice architecture • Rust web and database application development • deploy lightweight microservices in the cloud in the WasmEdge runtime • use Dapr to build and connect complex microservices • use Github Actions to continuously test and validate microservices
Michael Yuan
5 weeks · 4-6 hours per week average · BEGINNER

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Congratulations! You’re the new developer at UMET Inc. UMET is a successful U.S.-based e-commerce startup that lets social media influencers offer time-limited deals. It is crucial that the UMET web app can quickly scale up to handle large spikes of traffic while remaining nimble to orchestrate those deals with influencers. When UMET was started, it was built on a classic 3-tier stack with a web server, a Java application server, and a relational database. However, as UMET’s business grows, its monolithic architecture makes it difficult to scale and add or change features. The microservice pattern promises to support adding, removing and scaling service components on-demand to address fast-moving business requirements.

You’ve been tasked with transitioning its backend technology stack to microservices. You’ll create server-side WebAssembly (Wasm) applications using Rust and securely run them in portable WasmEdge runtime containers. Avoiding the pitfalls of heavyweight microservices, you’ll use the Rust Tokio and hyper crates to create a minimally viable HTTP web service, then you’ll enhance the application by creating a new microservice that depends on the previously created microservice. You’ll also use Docker Compose to manage multiple Wasm and Linux containers in a single application.

To enable your new interdependent microservices to integrate with existing order systems, you’ll build a microservice in Rust that can read and save data from UMET’s MySQL relational databases. You’ll reduce the overhead of managing the new microservices—including those built by other UMET teams as a result of the successful template you’ve created—by refactoring them to work with the Distributed Application Runtime (Dapr) framework, reducing complexity and, ultimately, overhead costs. When you’re finished, you’ll have the skills and knowledge to create lightweight, fully featured, highly performant microservices using Rust, Wasm, Docker, and Dapr.

These projects are designed for learning purposes and are not complete, production-ready applications or solutions.

This series was challenging, interesting, and also extremely relatable to actual work. I feel like I can now use Rust and Wasm for actual work projects.

Nick Miller, Independent computational linguist

here's what's included

Project 1 HTTP Server

UMET Inc. is growing! To support its increasingly complex features and services, the CTO has decided to refactor its backend technology stack, and the dev team has chosen the memory-safe, high-performance Rust programming language for this important investment in the company’s future. As a new developer at UMET, your task is to build proof-of-concept (PoC) Rust applications using Cargo or Docker tools, then securely run the applications in portable WasmEdge runtime containers to validate that the new backend stack meets all the necessary requirements. When you’re done, you’ll have mastered Rust basics for application development, including working with strings, managing complex data structures, and creating an HTTP web server.

Project 2 A First Business Microservice

You’re a new developer at UMET Inc., an e-commerce platform that’s modernizing its backend technology stack with Rust. Your task is to create a simple HTTP service that looks up sales tax rates for U.S. ZIP codes and then deploy it in a lightweight container. To build the service, you’ll use Rust Tokio and hyper crates. You’ll compile, run, and test it in a lightweight WasmEdge container and use GitHub Actions to automatically test and validate any changes that you make. When you’re finished, you’ll have hands-on experience building, updating, and testing a minimally viable microservice using Rust and WebAssembly.

Project 3 Multiple Connected Microservices

UMET Inc. is off to a great start in its efforts to refactor its backend to a modern technology stack using the popular, high-performance Rust programming language. As a new developer for the e-commerce platform, your task is to create a microservice for calculating order totals that depends on another microservice that looks up sales tax rates. Using HTML and JavaScript, you’ll create a web user interface for the microservices so that UMET product managers can test them in a browser. You’ll build and test your new application using Rust reqwest and Serde crates to make web service calls and also use Docker Compose to manage multiple Wasm and Linux containers in a single application. When you’re finished, you’ll have firsthand experience using WasmEdge command-line interface (CLI) tools to build a cloud-native application with interdependent microservices.

Project 4 A Stateful Microservice

To support its rapid growth, e-commerce company UMET Inc. relies on lightweight, interdependent, cloud-native microservices written in Rust that can compute sales tax rates and e-commerce order totals. As a developer at UMET, it’s up to you to integrate these microservices with existing order systems. To do that, you’ll need to turn the order total microservice into a database-backed stateful service. You’ll build and test the microservice in Docker and model the application data into relational database records. You’ll connect the microservice application to a MySQL database server, and you’ll use Docker to compose and manage all components of the microservice. When you’re done, you’ll have built an order management microservice in Rust that can read and save data from UMET’s MySQL relational databases and later serve as a template for other UMET microservices.

Project 5 The Sidecar Pattern

UMET Inc.’s mission to modernize its software infrastructure has been a great success. The e-commerce company now uses Rust microservices that run in lightweight Wasm containers so that they can be deployed anywhere in the cloud. However, as more microservices are created, the overhead for managing them is becoming a problem. Using the Distributed Application Runtime (Dapr) sidecar, a commonly used design pattern, you’ll create a proof of concept (PoC) that demonstrates the pattern’s benefits, including reducing the complexity of connecting multiple microservices and infrastructure services (e.g. databases and web proxies). When you’re finished, you’ll have refactored UMET’s microservices to work with Dapr, reducing the overhead required to manage them.

book resources

When you start each of the projects in this series, you'll get full access to the following book for 90 days.

choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • Rust and WebAssembly Microservices project for free

Content is very well selected.

Volker Roth, SRC Security Architect, Bundesagentur für Arbeit

Explanations are very clear. The format suits me well, and projects clearly match my interests.

Olivier Stas, Senior Full-Stack Developer/Business Analyst, Licent

project author

Michael Yuan

Dr. Michael Yuan is the founder and maintainer of the open -source WasmEdge project — one of the most popular WebAssembly (Wasm) runtimes for server and edge applications. He is also the creator of LlamaEdge, a cross-platform, embeddable, and cloud-native runtime for AI applications, supporting LLMs and popular vision and speech models. Dr. Yuan is the author of 5 books on software engineering and a frequent speaker at conferences such as KubeCon, Open Source Summit, QCon, Rust Conf, VMWare Explore, COSCon, and Wasm I/O. He has designed and implemented enterprise applications and server-side software infrastructure since the early 2000s. Dr. Yuan holds a PhD in Astrophysics from the University of Texas at Austin.

Prerequisites

These liveProjects are for Rust beginners interested in learning to create lightweight, fully featured, highly performant microservices using Rust and Wasm. To begin these liveProjects you’ll need to be familiar with the following:

TOOLS
  • Rust programming basics (syntax, standard libraries, and building tools such as Cargo and crates.io)
  • Linux basics (use the command line, sudo, and open/map ports to the outside world)
  • Basics of Git, GitHub, and GitHub Actions
  • GitHub account (registration is free)
  • Docker basics (commands, Dockerfile structure, Docker Compose, and the docker-compose.yml file)
TECHNIQUES
  • Basic Rust programming
  • Intermediate WasmEdge application development
  • Intermediate web services architecture
  • Basic Docker + Wasm
  • Basic Dapr

features

Self-paced
You choose the schedule and decide how much time to invest as you build your project.
Project roadmap
Each project is divided into several achievable steps.
Get Help
While within the liveProject platform, get help from other participants and our expert mentors.
Compare with others
For each step, compare your deliverable to the solutions by the author and other participants.
book resources
Get full access to select books for 90 days. Permanent access to excerpts from Manning products are also included, as well as references to other resources.