SlideShare a Scribd company logo
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
WebAssembly (on the server)
Massimo Re Ferrè
Senior Principal Technologist
AWS
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
I spent 16 years at IBM
I spent 8 years at VMware
Current: 5 years at AWS
28 years in IT (I am old)
x86 server (and virtualization)
Virtualization (and containers)
Containers / Serverless (and …)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Obligatory link to Solomon’s tweet (2019)
https://twitter.com/solomonstre/status/1111004913222324225
That sounds like a
bold statement,
let’s dig in
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
OK what’s the fuss about? (2021)
TWItter, WE nEEd tHe EdIT BUttON!
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Docker announces WASM support (2022)
https://www.docker.com/blog/docker-wasm-technical-preview/
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Chapter 1 – Current Status
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Physical Server
Where are we (technologically speaking)?
Virtual Machine
Virtual Machine
Container
Container
Container
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
30 years in 30 seconds
• 1990-2000 The dark age (phisical servers deployments)
• Provisioning lead times of weeks
• Exaggerated resource wasting with gigantic unit of work
• Lots of manual processes
• 2000-2015 The hope (hardware virtualization)
• Provisioning lead times of hours
• Optimized resource configurations with dynamically sizable unit of work
• Still many manual processes (seeds of DevOps)
• 2015-today The light out of the tunnel (containers for the masses)
• Provisioning times of minutes/seconds
• Optimized resource configurations with OS sharing
• Full automation
Fun fact: none of the new stuff
replaced the previous iteration
(niche exceptions apply e.g.
containers on bare metal)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Chapter 2 – WebAssembly
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
WebAssembly (abbreviated Wasm) is a binary instruction
format for a stack-based virtual machine. Wasm is designed as
a portable compilation target for programming languages,
enabling deployment on the web for client and server
applications.
What is WebAssembly?
https://webassembly.org/
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A WebAssembly artifact is a (portable) binary file (.wasm) that
executes “somewhere"
What is WebAssembly?
That’s how I like to think about it
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do you get to this .wasm file?
For example, in Rust, by doing this:
cargo build --manifest-path ./spin-hello-world/Cargo.toml --target wasm32-wasi --release
In go, by doing this:
tinygo build -o myapp.wasm -target wasm ./myapp.go
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
WebAssembly.instantiateStreaming(fetch(”myapp.wasm"), importObject).then(
(obj) => {
// Call an exported function:
obj.instance.exports.exported_func();
// or access the buffer contents of an exported memory:
const i32 = new Uint32Array(obj.instance.exports.memory.buffer);
// or access the elements of an exported table:
const table = obj.instance.exports.table;
console.log(table.get(0)());
}
);
Where is WebAssembly (today)?
Mostly on the browser
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Chromium
Where is WebAssembly (today)?
V8 (JS and WASM engine)
JavaScript code
WASM artifact
user interaction
execution
execution
(Very) rough visual representation of Chromium support for WebAssembly
(the Firefox runtime is called SpiderMonkey and it would look similar-ish)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1. Small footprint (relative to what?)
2. Near native performance / almost no cold starts (relative to what?)
3. Secure sandbox (relative to what?)
4. Multi-language (if the language supports it)
5. Compiled artifact is OS independent (Mac, Linux, Windows)
6. Compiled artifact is CPU independent (hello Arm!)
Why WebAssembly?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Chapter 3 – WASI
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Traditional
computing (non browser)
Browser
Can we bring WASM everywhere?
Cloud region / Data Center
Edge
location
Edge
location
Edge
location
Edge
location
Edge
location
Edge
location
Browser
Browser
Browser
Browser
Browser
Browser
Browser
Browser
Browser
Browser
How can we run WASM
byte-code on non
browser traditional
computing?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“Developers are starting to push WebAssembly beyond the
browser… but we don’t yet have a solid foundation to build upon.
Code outside of a browser needs a way to talk to the system—a
system interface. And the WebAssembly platform doesn’t have
that yet.”[ Lin Clark, 2019 ]
Why WASI?
https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“WASI stands for WebAssembly System Interface. It's an API …
that provides access to several operating-system-like features,
including files and filesystems, Berkeley sockets, clocks, and
random numbers… It's designed to be independent of browsers,
so it doesn't depend on Web APIs or JS, and isn't limited by the
need to be compatible with JS…”
What is WASI?
https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-intro.md
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• The list of runtimes that supports WASI/WASM is long and growing
• They are written in different languages, some use V8, some use
other technologies
• They are (often) available for multiple OSes and architectures
• This is a list of all available WASM/WASI runtimes
(https://github.com/appcypher/awesome-wasm-runtimes)
Where is WASI?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Docker adds WASM support
One of the many
WASM runtimes
Your standard
Linux containers
https://www.docker.com/blog/docker-wasm-technical-preview/
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Native run experience Vs Docker run experience
> docker run --runtime=io.containerd.wasmedge.v1 
--platform=wasi/wasm32 
mreferre/hello-rust:latest
Hello from main!
FROM scratch
COPY hello-rust.wasm /hello-rust.wasm
ENTRYPOINT [ "hello-rust.wasm" ]
hello-rust.wasm
> wasmer hello-rust.wasm
Hello from main!
Dockerfile
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Chapter 4 – What are people doing w/ WASM?
[ Warning: this is where it gets complicated ]
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How people are using WASM
(outside of the browser and in no particular order)
Operating System
NGINX
NGINX Interpreter Interpreter
App
App module
Program binary
module
WASM/WASI runtime
Program binary
module
WASM-ified object
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Chapter 5 – Detour: how to think about containers
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• They are essentially a packaging format
• Containers alone and per se no longer describe runtime
characteristics and requirements
• I can use containers to package traditional applications and run
them as long-running processes on ECS/Fargate or Kubernetes
• I can use containers to package functions and run them in Lambda
• And yes you can also package WASM modules in containers !
How should we think about containers?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Physical Server
“Containers” characteristics and requirements
VM
Container
microVM
Container
I use this as a ”fat” container
- Bring any code you want
- Better life cycle than VMs
- Immutability over patching
- Dockerfile over AMI
- Infrastructure agnostic
- Security is critical
- Cold starts are nice to (NOT) have
- Not wasting resources is desirable
I use this as a ”function” container
- Focus on writing code
- Forget about infrastructure
- Dockerfile over Zip
- Security is critical
- Cold starts are critical
- Not wasting resources is critical
Fargate task
Lambda function
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Chapter 6 – Where does WASM fit?
[ …into the compute primitives we know ]
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Physical Server
What is the role of WASM in the current stack?
Virtual Machine
Virtual Machine
Container
Container
Container
Should/could WASM replace the container?
(and run inside the VM)
Should/could WASM replace the VM?
(and run on bare metal)
Should/could WASM run inside the container?
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• It’s incredibly hard to compare technologies when they are used with
different characteristics and for different purposes
• Containers as “functions” or as “fat containers”?
• WASM as “a function” or as “a packaging mechanism for NGINX / the
Python interpreter”?
• WASM is definitely throwing a big curveball into the industry
They are all hard questions
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers/VMs Vs WASM value prop overlap
Containers
VMs
WASM
Language agnostic libraries
Infrastructure packaging
Sandboxing untrusted code
Dev features
Ops features
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Both VMs and containers are application agnostic technologies
• You can take anything a dev built and run it in a VM or container
• WASM requires dev intention
• The line between “code” and “its ops” is blurry
• There is no clear Dev and Ops decoupling in WASM
• WASM tooling still maturing (some languages are ahead than others)
Important
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Chapter 7 – A science experiment (for fun)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
WAGI (run WebAssembly WASI binaries as HTTP handlers)
Source: https://www.youtube.com/watch?v=9NDwHBjLlhQ
The Fermyon Spin framework
supports WAGI
(https://github.com/fermyon/spin)
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Spin on multi-compute (EC2, Fargate, Lambda)
ALB
Fargate Fargate
Fargate
EC2
ECS service
Lambda
EFS
ASG
This adpter turns an event
into a local HTTP request
AMI packaging
Container image
packaging
Multi-concurrency
Single-concurrency
(1 instance per http request)
Wasm files
Web process binary (Spin)
https://github.com/mreferre/spin-wasm-multi-compute
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
WAGI (run WebAssembly WASI binaries as HTTP handlers)
Source: https://www.youtube.com/watch?v=9NDwHBjLlhQ
This is what you may want to do
https://www.cncf.io/blog/2021/0
8/25/webassembly-serverless-
functions-in-aws-lambda/
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
WAGI (run WebAssembly WASI binaries as HTTP handlers)
Source of screenshots (credit): https://www.youtube.com/watch?v=9NDwHBjLlhQ
But this is what we are doing
in our experiment
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Spin on multi-compute (EC2, Fargate, Lambda)
Lambda cold start (@ first invoke)
EC2, Fargate and Lambda target groups
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• WASM (and to some extent WASI) have been in the cooking for some
time…
• … but the “wow effect” (outside of specific circles) has not been close
to that of VM and containers technologies
• “Containers have been around for 30 years and grew big only in the
last 7-8” I hear you say…
• … it almost feels like WASM needs a “Docker”. Will Docker be it? Or
Fermyon? Or…..?
Conclusion
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- https://it20.info
- https://twitter.com/mreferre
- https://github.com/mreferre
Thanks & stay in touch!

More Related Content

What's hot

Introduce Google Kubernetes
Introduce Google KubernetesIntroduce Google Kubernetes
Introduce Google KubernetesYongbok Kim
 
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideKaran Singh
 
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
Infrastructure-as-Code with Pulumi- Better than all the others (like Ansible)?Infrastructure-as-Code with Pulumi- Better than all the others (like Ansible)?
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?Jonas Hecht
 
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as CodeAWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as CodeAmazon Web Services
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionStefan Schimanski
 
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20Amazon Web Services Korea
 
Containers on AWS: An Introduction
Containers on AWS: An IntroductionContainers on AWS: An Introduction
Containers on AWS: An IntroductionAmazon Web Services
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideBytemark
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking OverviewSreenivas Makam
 
Kubernetes networking
Kubernetes networkingKubernetes networking
Kubernetes networkingSim Janghoon
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesSlideTeam
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 introTerry Cho
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container SecuritySuraj Khetani
 
Ceph Object Storage Performance Secrets and Ceph Data Lake Solution
Ceph Object Storage Performance Secrets and Ceph Data Lake SolutionCeph Object Storage Performance Secrets and Ceph Data Lake Solution
Ceph Object Storage Performance Secrets and Ceph Data Lake SolutionKaran Singh
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 

What's hot (20)

Introduce Google Kubernetes
Introduce Google KubernetesIntroduce Google Kubernetes
Introduce Google Kubernetes
 
Deep Dive - CI/CD on AWS
Deep Dive - CI/CD on AWSDeep Dive - CI/CD on AWS
Deep Dive - CI/CD on AWS
 
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing Guide
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
 
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
Infrastructure-as-Code with Pulumi- Better than all the others (like Ansible)?Infrastructure-as-Code with Pulumi- Better than all the others (like Ansible)?
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
 
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as CodeAWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
 
Kubernetes Architecture and Introduction
Kubernetes Architecture and IntroductionKubernetes Architecture and Introduction
Kubernetes Architecture and Introduction
 
ansible why ?
ansible why ?ansible why ?
ansible why ?
 
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
 
Containers on AWS: An Introduction
Containers on AWS: An IntroductionContainers on AWS: An Introduction
Containers on AWS: An Introduction
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Kubernetes networking
Kubernetes networkingKubernetes networking
Kubernetes networking
 
AKS
AKSAKS
AKS
 
AWS CDK Introduction
AWS CDK IntroductionAWS CDK Introduction
AWS CDK Introduction
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container Security
 
Ceph Object Storage Performance Secrets and Ceph Data Lake Solution
Ceph Object Storage Performance Secrets and Ceph Data Lake SolutionCeph Object Storage Performance Secrets and Ceph Data Lake Solution
Ceph Object Storage Performance Secrets and Ceph Data Lake Solution
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 

Similar to Web Assembly (on the server)

WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?Brainhub
 
AWS Fargate deep dive - MAD303 - New York AWS Summit
AWS Fargate deep dive - MAD303 - New York AWS SummitAWS Fargate deep dive - MAD303 - New York AWS Summit
AWS Fargate deep dive - MAD303 - New York AWS SummitAmazon Web Services
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationBrad Beiermann
 
Serverless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftServerless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftAmazon Web Services
 
AWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWSAWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWSMassimo Ferre'
 
A Deeper Look at How Veeam is Evolving Availability on AWS (STG206-S) - AWS r...
A Deeper Look at How Veeam is Evolving Availability on AWS (STG206-S) - AWS r...A Deeper Look at How Veeam is Evolving Availability on AWS (STG206-S) - AWS r...
A Deeper Look at How Veeam is Evolving Availability on AWS (STG206-S) - AWS r...Amazon Web Services
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the WebCodeValue
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019AWS Summits
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019Amazon Web Services
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
 
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitGetting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitAmazon Web Services
 
Architecting security and governance through policy guardrails in Amazon EKS ...
Architecting security and governance through policy guardrails in Amazon EKS ...Architecting security and governance through policy guardrails in Amazon EKS ...
Architecting security and governance through policy guardrails in Amazon EKS ...Amazon Web Services
 
Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Amazon Web Services
 
Breaking the monolith (an example)
Breaking the monolith (an example)Breaking the monolith (an example)
Breaking the monolith (an example)Massimo Ferre'
 
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...Amazon Web Services
 
Innovate - Breaking Down The Monolith
Innovate - Breaking Down The MonolithInnovate - Breaking Down The Monolith
Innovate - Breaking Down The MonolithShouvikKnightmare
 

Similar to Web Assembly (on the server) (20)

WebAssembly
WebAssemblyWebAssembly
WebAssembly
 
WASM! WASI! WAGI! WAT?
WASM! WASI! WAGI! WAT?WASM! WASI! WAGI! WAT?
WASM! WASI! WAGI! WAT?
 
WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?
 
AWS Fargate deep dive - MAD303 - New York AWS Summit
AWS Fargate deep dive - MAD303 - New York AWS SummitAWS Fargate deep dive - MAD303 - New York AWS Summit
AWS Fargate deep dive - MAD303 - New York AWS Summit
 
WebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction PresentationWebAssembly WASM Introduction Presentation
WebAssembly WASM Introduction Presentation
 
Serverless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftServerless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up Loft
 
Using Containers on AWS
Using Containers on AWSUsing Containers on AWS
Using Containers on AWS
 
AWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWSAWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWS
 
A Deeper Look at How Veeam is Evolving Availability on AWS (STG206-S) - AWS r...
A Deeper Look at How Veeam is Evolving Availability on AWS (STG206-S) - AWS r...A Deeper Look at How Veeam is Evolving Availability on AWS (STG206-S) - AWS r...
A Deeper Look at How Veeam is Evolving Availability on AWS (STG206-S) - AWS r...
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the Web
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
 
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitGetting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
 
Architecting security and governance through policy guardrails in Amazon EKS ...
Architecting security and governance through policy guardrails in Amazon EKS ...Architecting security and governance through policy guardrails in Amazon EKS ...
Architecting security and governance through policy guardrails in Amazon EKS ...
 
Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK
 
Breaking the monolith (an example)
Breaking the monolith (an example)Breaking the monolith (an example)
Breaking the monolith (an example)
 
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
Running Containers without Servers: Introduction to AWS Fargate - SRV214 - To...
 
Innovate - Breaking Down The Monolith
Innovate - Breaking Down The MonolithInnovate - Breaking Down The Monolith
Innovate - Breaking Down The Monolith
 
Cloud ibrido nella PA
Cloud ibrido nella PACloud ibrido nella PA
Cloud ibrido nella PA
 

More from Massimo Ferre'

Generative AI for the rest of us
Generative AI for the rest of usGenerative AI for the rest of us
Generative AI for the rest of usMassimo Ferre'
 
IDI_2023_MRF-Final.pdf
IDI_2023_MRF-Final.pdfIDI_2023_MRF-Final.pdf
IDI_2023_MRF-Final.pdfMassimo Ferre'
 
IDI 2022: Making sense of the '17 ways to run containers on AWS'
IDI 2022: Making sense of the '17 ways to run containers on AWS'IDI 2022: Making sense of the '17 ways to run containers on AWS'
IDI 2022: Making sense of the '17 ways to run containers on AWS'Massimo Ferre'
 
Codemotion 2020 - Containers Meet Serverless
Codemotion 2020 - Containers Meet ServerlessCodemotion 2020 - Containers Meet Serverless
Codemotion 2020 - Containers Meet ServerlessMassimo Ferre'
 
ContainerDay 2020 - Using Docker as a frontend for Amazon ECS and AWS Fargate
ContainerDay 2020 - Using Docker as a frontend for Amazon ECS and AWS Fargate ContainerDay 2020 - Using Docker as a frontend for Amazon ECS and AWS Fargate
ContainerDay 2020 - Using Docker as a frontend for Amazon ECS and AWS Fargate Massimo Ferre'
 
IDI 2020 - Containers Meet Serverless
IDI 2020 - Containers Meet ServerlessIDI 2020 - Containers Meet Serverless
IDI 2020 - Containers Meet ServerlessMassimo Ferre'
 
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020Massimo Ferre'
 
From 0 to Blue-Green deployments on AWS Fargate
From 0 to Blue-Green deployments on AWS Fargate From 0 to Blue-Green deployments on AWS Fargate
From 0 to Blue-Green deployments on AWS Fargate Massimo Ferre'
 
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureAWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureMassimo Ferre'
 
Meetup CNCF Torino - Amazon EKS March 29th 2019
Meetup CNCF Torino - Amazon EKS March 29th 2019 Meetup CNCF Torino - Amazon EKS March 29th 2019
Meetup CNCF Torino - Amazon EKS March 29th 2019 Massimo Ferre'
 
End-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesEnd-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesMassimo Ferre'
 
Containers at AWS: State of the Union
Containers at AWS: State of the Union  Containers at AWS: State of the Union
Containers at AWS: State of the Union Massimo Ferre'
 

More from Massimo Ferre' (12)

Generative AI for the rest of us
Generative AI for the rest of usGenerative AI for the rest of us
Generative AI for the rest of us
 
IDI_2023_MRF-Final.pdf
IDI_2023_MRF-Final.pdfIDI_2023_MRF-Final.pdf
IDI_2023_MRF-Final.pdf
 
IDI 2022: Making sense of the '17 ways to run containers on AWS'
IDI 2022: Making sense of the '17 ways to run containers on AWS'IDI 2022: Making sense of the '17 ways to run containers on AWS'
IDI 2022: Making sense of the '17 ways to run containers on AWS'
 
Codemotion 2020 - Containers Meet Serverless
Codemotion 2020 - Containers Meet ServerlessCodemotion 2020 - Containers Meet Serverless
Codemotion 2020 - Containers Meet Serverless
 
ContainerDay 2020 - Using Docker as a frontend for Amazon ECS and AWS Fargate
ContainerDay 2020 - Using Docker as a frontend for Amazon ECS and AWS Fargate ContainerDay 2020 - Using Docker as a frontend for Amazon ECS and AWS Fargate
ContainerDay 2020 - Using Docker as a frontend for Amazon ECS and AWS Fargate
 
IDI 2020 - Containers Meet Serverless
IDI 2020 - Containers Meet ServerlessIDI 2020 - Containers Meet Serverless
IDI 2020 - Containers Meet Serverless
 
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
Containers Meetup (AWS+CNCF) Milano Jan 15th 2020
 
From 0 to Blue-Green deployments on AWS Fargate
From 0 to Blue-Green deployments on AWS Fargate From 0 to Blue-Green deployments on AWS Fargate
From 0 to Blue-Green deployments on AWS Fargate
 
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureAWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
 
Meetup CNCF Torino - Amazon EKS March 29th 2019
Meetup CNCF Torino - Amazon EKS March 29th 2019 Meetup CNCF Torino - Amazon EKS March 29th 2019
Meetup CNCF Torino - Amazon EKS March 29th 2019
 
End-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesEnd-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS services
 
Containers at AWS: State of the Union
Containers at AWS: State of the Union  Containers at AWS: State of the Union
Containers at AWS: State of the Union
 

Recently uploaded

Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backElena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1DianaGray10
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 

Recently uploaded (20)

Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 

Web Assembly (on the server)

  • 1. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. WebAssembly (on the server) Massimo Re Ferrè Senior Principal Technologist AWS
  • 2. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. I spent 16 years at IBM I spent 8 years at VMware Current: 5 years at AWS 28 years in IT (I am old) x86 server (and virtualization) Virtualization (and containers) Containers / Serverless (and …)
  • 3. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Obligatory link to Solomon’s tweet (2019) https://twitter.com/solomonstre/status/1111004913222324225 That sounds like a bold statement, let’s dig in
  • 4. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. OK what’s the fuss about? (2021) TWItter, WE nEEd tHe EdIT BUttON!
  • 5. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Docker announces WASM support (2022) https://www.docker.com/blog/docker-wasm-technical-preview/
  • 6. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Chapter 1 – Current Status
  • 7. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Physical Server Where are we (technologically speaking)? Virtual Machine Virtual Machine Container Container Container
  • 8. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 30 years in 30 seconds • 1990-2000 The dark age (phisical servers deployments) • Provisioning lead times of weeks • Exaggerated resource wasting with gigantic unit of work • Lots of manual processes • 2000-2015 The hope (hardware virtualization) • Provisioning lead times of hours • Optimized resource configurations with dynamically sizable unit of work • Still many manual processes (seeds of DevOps) • 2015-today The light out of the tunnel (containers for the masses) • Provisioning times of minutes/seconds • Optimized resource configurations with OS sharing • Full automation Fun fact: none of the new stuff replaced the previous iteration (niche exceptions apply e.g. containers on bare metal)
  • 9. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Chapter 2 – WebAssembly
  • 10. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine. Wasm is designed as a portable compilation target for programming languages, enabling deployment on the web for client and server applications. What is WebAssembly? https://webassembly.org/
  • 11. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. A WebAssembly artifact is a (portable) binary file (.wasm) that executes “somewhere" What is WebAssembly? That’s how I like to think about it
  • 12. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do you get to this .wasm file? For example, in Rust, by doing this: cargo build --manifest-path ./spin-hello-world/Cargo.toml --target wasm32-wasi --release In go, by doing this: tinygo build -o myapp.wasm -target wasm ./myapp.go
  • 13. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. WebAssembly.instantiateStreaming(fetch(”myapp.wasm"), importObject).then( (obj) => { // Call an exported function: obj.instance.exports.exported_func(); // or access the buffer contents of an exported memory: const i32 = new Uint32Array(obj.instance.exports.memory.buffer); // or access the elements of an exported table: const table = obj.instance.exports.table; console.log(table.get(0)()); } ); Where is WebAssembly (today)? Mostly on the browser
  • 14. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Chromium Where is WebAssembly (today)? V8 (JS and WASM engine) JavaScript code WASM artifact user interaction execution execution (Very) rough visual representation of Chromium support for WebAssembly (the Firefox runtime is called SpiderMonkey and it would look similar-ish)
  • 15. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1. Small footprint (relative to what?) 2. Near native performance / almost no cold starts (relative to what?) 3. Secure sandbox (relative to what?) 4. Multi-language (if the language supports it) 5. Compiled artifact is OS independent (Mac, Linux, Windows) 6. Compiled artifact is CPU independent (hello Arm!) Why WebAssembly?
  • 16. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Chapter 3 – WASI
  • 17. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Traditional computing (non browser) Browser Can we bring WASM everywhere? Cloud region / Data Center Edge location Edge location Edge location Edge location Edge location Edge location Browser Browser Browser Browser Browser Browser Browser Browser Browser Browser How can we run WASM byte-code on non browser traditional computing?
  • 18. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. “Developers are starting to push WebAssembly beyond the browser… but we don’t yet have a solid foundation to build upon. Code outside of a browser needs a way to talk to the system—a system interface. And the WebAssembly platform doesn’t have that yet.”[ Lin Clark, 2019 ] Why WASI? https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/
  • 19. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. “WASI stands for WebAssembly System Interface. It's an API … that provides access to several operating-system-like features, including files and filesystems, Berkeley sockets, clocks, and random numbers… It's designed to be independent of browsers, so it doesn't depend on Web APIs or JS, and isn't limited by the need to be compatible with JS…” What is WASI? https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-intro.md
  • 20. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. • The list of runtimes that supports WASI/WASM is long and growing • They are written in different languages, some use V8, some use other technologies • They are (often) available for multiple OSes and architectures • This is a list of all available WASM/WASI runtimes (https://github.com/appcypher/awesome-wasm-runtimes) Where is WASI?
  • 21. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Docker adds WASM support One of the many WASM runtimes Your standard Linux containers https://www.docker.com/blog/docker-wasm-technical-preview/
  • 22. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Native run experience Vs Docker run experience > docker run --runtime=io.containerd.wasmedge.v1 --platform=wasi/wasm32 mreferre/hello-rust:latest Hello from main! FROM scratch COPY hello-rust.wasm /hello-rust.wasm ENTRYPOINT [ "hello-rust.wasm" ] hello-rust.wasm > wasmer hello-rust.wasm Hello from main! Dockerfile
  • 23. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Chapter 4 – What are people doing w/ WASM? [ Warning: this is where it gets complicated ]
  • 24. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. How people are using WASM (outside of the browser and in no particular order) Operating System NGINX NGINX Interpreter Interpreter App App module Program binary module WASM/WASI runtime Program binary module WASM-ified object
  • 25. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Chapter 5 – Detour: how to think about containers
  • 26. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. • They are essentially a packaging format • Containers alone and per se no longer describe runtime characteristics and requirements • I can use containers to package traditional applications and run them as long-running processes on ECS/Fargate or Kubernetes • I can use containers to package functions and run them in Lambda • And yes you can also package WASM modules in containers ! How should we think about containers?
  • 27. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Physical Server “Containers” characteristics and requirements VM Container microVM Container I use this as a ”fat” container - Bring any code you want - Better life cycle than VMs - Immutability over patching - Dockerfile over AMI - Infrastructure agnostic - Security is critical - Cold starts are nice to (NOT) have - Not wasting resources is desirable I use this as a ”function” container - Focus on writing code - Forget about infrastructure - Dockerfile over Zip - Security is critical - Cold starts are critical - Not wasting resources is critical Fargate task Lambda function
  • 28. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Chapter 6 – Where does WASM fit? [ …into the compute primitives we know ]
  • 29. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Physical Server What is the role of WASM in the current stack? Virtual Machine Virtual Machine Container Container Container Should/could WASM replace the container? (and run inside the VM) Should/could WASM replace the VM? (and run on bare metal) Should/could WASM run inside the container?
  • 30. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. • It’s incredibly hard to compare technologies when they are used with different characteristics and for different purposes • Containers as “functions” or as “fat containers”? • WASM as “a function” or as “a packaging mechanism for NGINX / the Python interpreter”? • WASM is definitely throwing a big curveball into the industry They are all hard questions
  • 31. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers/VMs Vs WASM value prop overlap Containers VMs WASM Language agnostic libraries Infrastructure packaging Sandboxing untrusted code Dev features Ops features
  • 32. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. • Both VMs and containers are application agnostic technologies • You can take anything a dev built and run it in a VM or container • WASM requires dev intention • The line between “code” and “its ops” is blurry • There is no clear Dev and Ops decoupling in WASM • WASM tooling still maturing (some languages are ahead than others) Important
  • 33. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Chapter 7 – A science experiment (for fun)
  • 34. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. WAGI (run WebAssembly WASI binaries as HTTP handlers) Source: https://www.youtube.com/watch?v=9NDwHBjLlhQ The Fermyon Spin framework supports WAGI (https://github.com/fermyon/spin)
  • 35. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Spin on multi-compute (EC2, Fargate, Lambda) ALB Fargate Fargate Fargate EC2 ECS service Lambda EFS ASG This adpter turns an event into a local HTTP request AMI packaging Container image packaging Multi-concurrency Single-concurrency (1 instance per http request) Wasm files Web process binary (Spin) https://github.com/mreferre/spin-wasm-multi-compute
  • 36. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. WAGI (run WebAssembly WASI binaries as HTTP handlers) Source: https://www.youtube.com/watch?v=9NDwHBjLlhQ This is what you may want to do https://www.cncf.io/blog/2021/0 8/25/webassembly-serverless- functions-in-aws-lambda/
  • 37. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. WAGI (run WebAssembly WASI binaries as HTTP handlers) Source of screenshots (credit): https://www.youtube.com/watch?v=9NDwHBjLlhQ But this is what we are doing in our experiment
  • 38. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Spin on multi-compute (EC2, Fargate, Lambda) Lambda cold start (@ first invoke) EC2, Fargate and Lambda target groups
  • 39. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. • WASM (and to some extent WASI) have been in the cooking for some time… • … but the “wow effect” (outside of specific circles) has not been close to that of VM and containers technologies • “Containers have been around for 30 years and grew big only in the last 7-8” I hear you say… • … it almost feels like WASM needs a “Docker”. Will Docker be it? Or Fermyon? Or…..? Conclusion
  • 40. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. - https://it20.info - https://twitter.com/mreferre - https://github.com/mreferre Thanks & stay in touch!