Slide 1

Slide 1 text

Mega Mergers Thorsten Hans @ThorstenHans Cloud-Native with Containers and WebAssembly

Slide 2

Slide 2 text

Cloud-Native Business Applications Day Uhrzeit Titel Sprecher 09:00 – 10:00 Cloud-Native-all-the-Things: Definition, Praktiken und Patterns Christian Weyer Thorsten Hans 10:30 – 11:30 Containerbasierte Entwicklung für .NET-Entwickler Tobias Fenster 12:00 – 13:00 Cloud-Native Generative AI mit Fermyon Serverless AI Thorsten Hans 15:15 – 16:15 Cloud-Native Microservices, on-premises oder in der Cloud – mit Dapr Christian Weyer 16:45 – 17:45 Mega Mergers: Cloud-Native-Architekturen mit Containern und WebAssembly Thorsten Hans

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

• Intro • Let’s meet Fermyon Spin • Patterns & Practices • Conclusion Agenda

Slide 5

Slide 5 text

• Intro • Let’s meet Fermyon Spin • Patterns & Practices • Conclusion Agenda

Slide 6

Slide 6 text

WebAssembly will change the way we architecture distributed systems in the future

Slide 7

Slide 7 text

Why?

Slide 8

Slide 8 text

• Cloud-vendor interest: • They can put more apps on a compute resource as today • Wasm and WASI give them a strict security and isolation model • Wasm workloads are way smaller than everything else • They can scale to zero due to super-fast bootstrapping <1msec Intro Why will Wasm have such a big impact?

Slide 9

Slide 9 text

• Developer interest: • They can use any language that compiles to wasm32_wasi • They can ship just the app • They can reduce cloud spendings • Same workloads will be cheaper because they consume less resources and execute faster Intro Why will Wasm have such a big impact?

Slide 10

Slide 10 text

Wasm on the server relates to containers in the same way containers related to virtual machines 10+ years ago

Slide 11

Slide 11 text

• Intro • Let’s meet Fermyon Spin • Patterns & Practices • Conclusion Agenda

Slide 12

Slide 12 text

• Intro • Let’s meet Fermyon Spin • Patterns & Practices • Conclusion Agenda

Slide 13

Slide 13 text

Fermyon Spin is: • A serverless runtime build using Wasm, WASI, and the WebAssembly Component Model (leveraging wasmtime internally) • A collection of SDKs for many popular languages • A super focussed developer tooling Intro Let’s get everybody on track! 🦀

Slide 14

Slide 14 text

With Spin we can build • Reactive applications that respect to the key pillars of Wasm • Fast: Near-native speed • Lightweight: Super small distributable units (Wasm Modules) • Secure: Sandboxed execution environment Intro Let’s get everybody on track!

Slide 15

Slide 15 text

Let’s meet Fermyon Spin Walk through the demo application Demo

Slide 16

Slide 16 text

• Spin provides triggers that the runtime uses to invoke our code • The runtime instantiates our Wasm Module and invokes our code • Currently, Spin provides the following triggers • HTTP • Publish / Subscribe Let’s meet Fermyon Spin Triggers & Outputs

Slide 17

Slide 17 text

Outputs allow our code to interact with the surrounding world • Databases (SQLite, MySQL & PostgreSQL) • Key-Value Storage (SQLite, Redis) • Publish / Subscribe (Redis Channels) • Outbound HTTP Let’s meet Fermyon Spin Triggers & Outputs

Slide 18

Slide 18 text

• Considering Fermyon Spin? 💡 Try to spot reactive parts of your application • Check, if the necessary libraries are available for the wasm32_wasi platform • Deploy Fermyon Platform to your infrastructure of trust Intro How to adopt Wasm on the server / in the cloud

Slide 19

Slide 19 text

Where we started Architectural blueprint of the sample app

Slide 20

Slide 20 text

Where we landed Architectural blueprint of the sample app

Slide 21

Slide 21 text

• Intro • Let’s meet Fermyon Spin • Patterns & Practices • Conclusion Agenda

Slide 22

Slide 22 text

• Intro • Let’s meet Fermyon Spin • Patterns & Practices • Conclusion Agenda

Slide 23

Slide 23 text

When building HTTP-based applications with Spin we must • specify a route on which Spin should invoke our code • Implement code for handling different HTTP request types Although Spin SDK is tiny, it simplifies building full-fledged HTTP APIs Patterns & Practices

Slide 24

Slide 24 text

Routing capabilities in HTTP-based Spin applications Demo

Slide 25

Slide 25 text

Regardless of whether we must invoke backend APIs or 3rd party endpoints, Outbound HTTP is an easy to grasp, yet important capability provided by the Spin SDK. Patterns & Practices Outbound HTTP

Slide 26

Slide 26 text

Outbound HTTP leveraging the Spin SDK Demo

Slide 27

Slide 27 text

Configurability is mission-critical when building software that is executed in different environments. Spin apps are no exception here. We must use proper mechanisms to deal with sensitive and non-sensitive configuration data. Patterns & Practices Configuration Management

Slide 28

Slide 28 text

• The Spin Manifest spin.toml is the center of gravity. All configuration aspects are defined here. • We use variables to specify non-sensitive configuration data • For sensitive configuration data, we can use HashiCorp Vault • We link HashiCorp Vault to our app using a runtime-config file Patterns & Practices Configuration Management

Slide 29

Slide 29 text

Configuration data for Spin apps Demo

Slide 30

Slide 30 text

• Publish is achieved using the Spin SDK • Constructing messages is up to us, which means we can modernize (read: replace containers) with ease, using cloudevents or by mimicking existing messages • When subscribing to messages, we must implement filters on our own Patterns & Practices Publish / Subscribe

Slide 31

Slide 31 text

Publish / Subscribe in distributed apps with Spin Demo

Slide 32

Slide 32 text

• Intro • Let’s meet Fermyon Spin • Patterns & Practices • Conclusion Agenda

Slide 33

Slide 33 text

• Intro • Let’s meet Fermyon Spin • Patterns & Practices • Conclusion Agenda

Slide 34

Slide 34 text

• With Spin, Fermyon demonstrates how WebAssembly will change the way we build software for the next wave of cloud-computing • We’re able to combine best from both worlds, Containers and WebAssembly to build distributed architectures for the upcoming years • Available Spin SDKs and plain WAGI support makes it super easy to get started (using any language that compiles to wasm32_wasi) Conclusion

Slide 35

Slide 35 text

• Hyperscalers want Wasm to drive hardware utilization, lift smaller application packages, get proper isolation and security in place and scale horizontally to and from 0 without facing the dilemma of cold-start times (Looking at you, Azure Functions *scnr*). • Application developers on the otherside had to tacklequite some pitfalls to adopt Wasm (SDKs., dev tooling, etc) • From my point of view, Fermyon is able to close the gap and drive Wasm adoption on the server and in the cloud to whole new level Conclusion

Slide 36

Slide 36 text

Thanks for your attention @ThorstenHans @Thinktecture