Live data from Hacker News

The Docker+WASM Technical Preview

docker.com

71–80 of 178 posts

Re: The Docker+WASM Technical Preview

#71

Earlier quoted context omitted.

Great question! The promise (and excitement) of Wasm is to have portable, secure, quick-to-start, and low resource usage apps. So, write code in Go, Rust, C++, or any other language that can output to Wasm (up to over 40 now!) and you're good to go! The binaries are super small too. Happy to dive in more too!

Why not run that go/rust/etc code natively on the machine though? Is there extra sandboxing, network/filesystem virtualization or anything gained by compiling to and running in a WASM environment?

One benefit of using wasm is architecture-agnostic binary. Right now you can't run x86 binary on ARM or vice-versa. So basically you need to build your containers twice if you have macbook people and x86 servers. And technically those are different images, so there's chance that you'll hit some non-trivial difference. With wasm everything could be simpler.

Re: The Docker+WASM Technical Preview

#72
post #19

Great work, WASM is the future! But on the other hand I'm not really happy with the fact that I'm waiting for GC and DOM access since 2019 or something like that and it doesn't seem like we're getting close

What compromises does WASM have relative to plain old native code?

Wasm = just a bunch of bytecode executing in a VM / a sandbox. Even with JIT, it will still be slower than the native code.

And since it is a sandbox.. either you, or your friendly wasm interpreter (via. wasi etc...) needs to provide the system access APIs for various things like storage/filesystem access, hardware acceleration via. GPU, TPU etc.. And some of the standard APIs we take for granted.

Re: The Docker+WASM Technical Preview

#73

This is great. We’ve been chatting with Docker for a little bit (I’m Syrus, from Wasmer) and it’s great to see that they are making progress on improving the developer experience around WebAssembly. However, I see Docker (and thus, Kubernetes) is as technologies of the past (I don’t intend to start any flamewar, I really believe this by heart). Metal compute (Web 1.0) lead to VMs which then lead to Containers (Web 2.…

Could you explain how WASM replaces containers? Let's say I have a backend API written in Java (spring boot). Containers basically solve two things, building and running the application. What does WASM solve here?

Re: The Docker+WASM Technical Preview

#74

For some reason I thought this was gonna be a demo of running docker in your browser through WASM. kinda disappointed that's not it :p

Funnily enough, I believe that's completely achievable with enough time spent on it (probably a few weeks of an engineer working full time).

We have technology like WebVM [1] (from leaningtech / CheerP) or Copy86 [2] that already allows x86 machine code execution/emulation on the web. If you add an OCI client layer on top that is executable in the browser, it should be possible to run Docker containers in the browser.

[1] https://webvm.io/

[2] https://copy.sh/v86/

Re: The Docker+WASM Technical Preview

#75
post #73

This is great. We’ve been chatting with Docker for a little bit (I’m Syrus, from Wasmer) and it’s great to see that they are making progress on improving the developer experience around WebAssembly. However, I see Docker (and thus, Kubernetes) is as technologies of the past (I don’t intend to start any flamewar, I really believe this by heart). Metal compute (Web 1.0) lead to VMs which then lead to Containers (Web 2.…

Could you explain how WASM replaces containers? Let's say I have a backend API written in Java (spring boot). Containers basically solve two things, building and running the application. What does WASM solve here?

Wasm "solves" running your application in a shared environment. i.e not your machine but say a cloudflare machine, that has to run dozens of applications like yours.

Without wasm, the unit of containerization for them is operating system process. Each process spins up a jvm that runs your app/backend API.

With wasm, the unit of containerization is the exact functions of your backend API. So they can fit more "containers" on a single machine, compared to docker. And that brings faster startups etc..

Re: The Docker+WASM Technical Preview

#76

Apologies in advance for a bit of a rant, but I sincerely hope the tools growing up around WASM significantly diminish the need for Docker. As an industry, we're so bad at isolation that we have to put a computer (container) inside a computer (VM) inside a computer (hardware) just to achieve any sort of sane guarantees. Then we immediately trade any semblance of sanity for container orchestration. (And please don't t…

> As an industry, we're so bad at isolation that we have to put a computer (container) inside a computer (VM) inside a computer (hardware) just to achieve any sort of sane guarantees.

We don't. But shortsighted design, rushing, and herd mentality around "hyped" tech make it a virtual certainty more like this will exist, just in different shapes and sizes.

You can run most stuff on a baremetal box or VM w/ direct install of dependencies. All of this container stuff, sorry to say, is a grift save for some extreme multi-tenant use cases.

Re: The Docker+WASM Technical Preview

#77
post #46

Earlier quoted context omitted.

I don't know Syrus nor Wasmer :) However, I'm genuinely interested - why would this make Kubernetes obsolete? If Wasm rules the future, as you believe, why shouldn't it run in a pod?

Here are some of the thoughts behind my reasoning that I posted previously in HN. Hope the are insightful! https://news.ycombinator.com/item?id=27158187 https://news.ycombinator.com/item?id=26271806

Thanks, this is interesting, but also very abstract.

What do you mean when you say "scaling on the level of a function"?

Do you mean any "plain old" function or a specific REST endpoint like AWS Lambda?

If you could just throw distributed computing resources at any function that is a bottleneck in your code, that would be alien tech.

Re: The Docker+WASM Technical Preview

#78
post #41

This is great. We’ve been chatting with Docker for a little bit (I’m Syrus, from Wasmer) and it’s great to see that they are making progress on improving the developer experience around WebAssembly. However, I see Docker (and thus, Kubernetes) is as technologies of the past (I don’t intend to start any flamewar, I really believe this by heart). Metal compute (Web 1.0) lead to VMs which then lead to Containers (Web 2.…

Solomon Hykes, the father of Docker agrees: https://twitter.com/solomonstre/status/1111004913222324225?s... the tweet is from 2019

Don’t forget this tweet from a day earlier, which he quotes:

> “So will wasm replace Docker?” No, but imagine a future where Docker runs linux containers, windows containers and wasm containers side by side. Over time wasm might become the most popular container type. Docker will love them all equally, and run it all :)

Re: The Docker+WASM Technical Preview

#79

Does anyone have a good explanation for what Docker+WASM actually is? This announcement explains what WASM is and what Docker is, but I already knew both of those and am still confused about what Docker+WASM is. Is it just wrapping a WASM binary in a Docker container?

"Docker+Wasm" is just a shorthand for the Technical Preview build, which allows you to build both traditional container apps, as well as Wasm apps. Behind the scenes, we try to let Wasm apps be developed largely without interference from any container technology — just giving you a good local environment you can use to code against. That said, if you want, we do offer the ability to run Wasm apps within a Docker Comp…

[deleted]

Re: The Docker+WASM Technical Preview

#80

Does anyone have a good explanation for what Docker+WASM actually is? This announcement explains what WASM is and what Docker is, but I already knew both of those and am still confused about what Docker+WASM is. Is it just wrapping a WASM binary in a Docker container?

I read through it at first and thought it was the docker desktop app rewritten in wasm instead of electron

I guess it’s a wasm runner

Post reply on HN