Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Develop Serverless apps with Wasm Workers Server

Develop Serverless apps with Wasm Workers Server

In this talk, we will explore how WebAssembly brings new benefits to the Serverless architecture and how to develop and run applications following this model with the Wasm Workers Server Open-Source project. You will learn how to create your first serverless application as Wasm modules!

This architecture is not new. It allows you to focus on the business logic of your applications. You develop the functions that process users’ requests and return a result. These independent units compose services. Then, frameworks and providers connect these pieces so users can access them.

WebAssembly is a natural fit for this model. The small binary format simplifies the distribution process. The ability to compile multiple languages into Wasm opens the possibility to mix and match them in the same project. The sandboxing and capability-based model ensures the functions are isolated without the cold start of other solutions like VMs and containers.

Wasm Workers Server is an Open-Source project to develop applications following this model. It simplifies how to create and run serverless applications in different languages. All the functions, or workers, run inside the WebAssembly sandbox.

Ángel M

March 28, 2023
Tweet

More Decks by Ángel M

Other Decks in Programming

Transcript

  1. Confidential │ © VMware, Inc. Develop Serverless Apps with Wasm

    Workers Server Create worker-based apps on top of WebAssembly Angel M Miguel & Rafael Fernández Wasm Labs / VMware OCTO
  2. 👋 Hello Angel M Miguel Staff Engineer @_angelmm angel.kiwi Rafael

    Fernández Staff Engineer @ereslibre ereslibre.es Wasm Labs @ VMware OCTO “We create and contribute to projects that showcase the possibilities of WebAssembly, and help developers adopt this new and exciting technology” @vmwwasm wasmlabs.dev
  3. Serverless and Wasm Bringing the Wasm benefits to serverless Serverless

    is a popular cloud computing model that abstracts developers from the underlying infrastructure. Your service is composed by individual units called functions or workers.
  4. Serverless and Wasm Adopting WebAssembly Developers Focus on writing the

    code. Reuse existing knowledge to develop the workers.
  5. “ Wasm Workers Server Serverless ❤ WebAssembly We want developers

    to be productive quickly while creating apps that fully benefit from WebAssembly
  6. Wasm Workers Server Serverless ❤ WebAssembly Wasm Workers Server is

    an open- source project for developing and running serverless apps on WebAssembly. It exposes workers as an HTTP API, receiving requests and returning responses.
  7. Wasm Workers Server Get started in less than 5 minutes

    1. Download wws 2. Create a file (.wasm / .js) 3. Run wws 4. Open your browser
  8. Serverless maps Protomaps on Wasm Workers Server “Protomaps is a

    serverless system for planet-scale maps” https://protomaps.com/ It’s an alternative to hosted map services.
  9. “Documenting and improving interoperability of web platform APIs across runtimes

    (especially non-browser ones)” Platforms WinterCG conventions WinterCG
  10. Languages Supporting multiple languages Wasm Language Runtimes is an OSS

    project that provides popular language runtimes (Ruby, Python, …) precompiled to WebAssembly.
  11. Wasm Workers Server Ensure everyone is productive “I'm glad Ruby

    wasn't left behind this time” Yukihiro Matz, Ruby’s “daddy”
  12. Wasm Labs No app gets left behind with WebAssembly “

    Wasm Workers Server Ensure everyone is productive
  13. Wasm Workers Server What’s next? • Support new languages •

    Provide workers with new features • Fetch • Persistance • Component-model