$30 off During Our Annual Pro Sale. View Details »

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

    View Slide

  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

    View Slide

  3. Confidential │ © VMware, Inc. 3
    Serverless and
    WebAssembly

    View Slide

  4. 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.

    View Slide

  5. Serverless and Wasm
    Adopting WebAssembly
    Developers
    Focus on writing the code.
    Reuse existing knowledge to
    develop the workers.

    View Slide

  6. “How do I get started?”
    WebAssembly introduces a new set of concepts and tooling

    View Slide


  7. Wasm Workers Server
    Serverless ❤ WebAssembly
    We want developers to be productive
    quickly while creating apps that fully
    benefit from WebAssembly

    View Slide

  8. 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.

    View Slide

  9. 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

    View Slide

  10. Wasm Workers Server
    How does it work?

    View Slide

  11. 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.

    View Slide

  12. Confidential │ © VMware, Inc. 12
    Everyone,
    Everywhere

    View Slide

  13. “Documenting and improving
    interoperability of web platform APIs
    across runtimes (especially non-browser
    ones)”
    Platforms
    WinterCG conventions
    WinterCG

    View Slide

  14. Languages
    Supporting multiple languages
    Wasm Language Runtimes is an OSS project that
    provides popular language runtimes (Ruby, Python, …)
    precompiled to WebAssembly.

    View Slide

  15. Wasm Workers Server
    Ensure everyone is productive
    “I'm glad Ruby
    wasn't left behind
    this time”
    Yukihiro Matz,
    Ruby’s “daddy”

    View Slide

  16. Wasm Labs
    No app gets left behind
    with WebAssembly

    Wasm Workers Server
    Ensure everyone is productive

    View Slide

  17. Confidential │ © VMware, Inc. 17
    Next steps

    View Slide

  18. Wasm Workers Server
    Try it!
    https://workers.wasmlabs.dev/quickstart
    https://workers.wasmlabs.dev/examples
    @vmwwasm wasmlabs.dev

    View Slide

  19. Wasm Workers Server
    What’s next?
    • Support new languages
    • Provide workers with new features
    • Fetch
    • Persistance
    • Component-model

    View Slide

  20. Wasm Workers Server
    Serverless ecosystem
    https://developer.fermyon.com/spin/
    https://wasmcloud.com/
    https://suborbital.dev/
    https://scale.sh/

    View Slide

  21. Thank You
    Confidential │ © VMware, Inc.
    https://wasmlabs.dev

    View Slide