Slide 1

Slide 1 text

Cloud-Na)ve vNext with WebAssembly and Spin Thorsten Hans @ Thinktecture System Architektur

Slide 2

Slide 2 text

Consultant @ Thinktecture #Azure #Kubernetes #CloudNative #Docker [email protected] thinktecture.com thorsten-hans.com @ThorstenHans Microsoft MVP | Docker Captain Thorsten Hans

Slide 3

Slide 3 text

• WebAssembly (Wasm) • WebAssembly System Interface (WASI) • WebAssembly Gateway Interface (WAGI) Introduction

Slide 4

Slide 4 text

WebAssembly (Wasm) • It’s virutal machine that processes stack-based instructions • Instruction are in binary format • For us - as developers - It’s a compiler target. Meaning we compile our code into WebAssembly Introduction

Slide 5

Slide 5 text

WebAssembly (Wasm) • Fast 🏃‍‍‍ • Near native execution performance, leveraging available hardware capabilities • Safe 💪‍ • Wasm is a sandboxed, memory-safe execution environment • Portable 🧊 • All major browsers support Wasm & multiple ”server” Wasm runtimes available Introduction

Slide 6

Slide 6 text

WebAssembly System Interface (WASI) • Platform Integration 🧬 • WASI is a wrapper for underlying platform (OS) capabilities • Think of things like File::open() • Portable 🚀 • WASI could become the default compiling target for EVERYONE! • Secure 👮‍ • Permissions can be defined per app (module) Introduction

Slide 7

Slide 7 text

Portability Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

Slide 8

Slide 8 text

Security Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

Slide 9

Slide 9 text

Security Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

Slide 10

Slide 10 text

Security Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

Slide 11

Slide 11 text

Security Introduction https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/

Slide 12

Slide 12 text

WebAssembly Gateway Interface (WAGI) • Use WebAssembly modules as HTTP handlers • Think of a hyper-focused microservices runtime • Comman Gateway Interface (CGI) implementation • HTTP headers become environment variables • HTTP payloads are piped to stdin • HTTP responses must be written to stdout Introduction

Slide 13

Slide 13 text

Fermyon Spin

Slide 14

Slide 14 text

• A framework for building even—driven microservices using Wasm components • Wasm components -> WebAssembly component model • Spin comes with lightweight, tailored SDKs for Rust, TinyGo, Swift, C, Zig • You can use any language that compiles to wasm32-wasi • A runtime that runs Wasm components and links it configurable ”triggers” • A CLI that we –as developers – use to create, build, and run our microservices What is Spin

Slide 15

Slide 15 text

Let’s give spin a spin 🚀 - Create a microservice with spin - Run microservices with spin Demo

Slide 16

Slide 16 text

• A platform for running spin applications • Fermyon Platform uses Nomad as platform • HashiCorp Consul is used for service discovery • Bindle is used for storing our applications packages • HTTP traffic is proxied to the applications using Traefik • You can run Fermyon Platform in the public cloud, in private datacenters or on your bare metal Fermyon Platform

Slide 17

Slide 17 text

further questions?!?! @ThorstenHans Consultant Don’t be afraid. Shoot your question now, or tweet later @ThorstenHans