Live data from Hacker News

WASM will replace containers

creston.blog

151–160 of 371 posts

Re: WASM will replace containers

#151

WASM solves a different problem to containers. Where WASM does well is in running sandboxed code efficiently, because that's where it started out. I think WASM will likely take over as the standard for shipping things like Functions-as-a-Service implementations, and other forms of plugins, where one host application/server of some kind wants to efficiently run pieces of untrusted logic. Containers don't solve that pr…

Cloudflare, Fastly, and Amex use WASM in their FaaS implementations

Yeah and that's where it makes a lot of sense. Less sense is replacing containers where you're using much more of the stack. FaaS hasn't replaced VMs, Kubernetes, Containers, etc, so it seems unlikely that WASM would for similar reasons.

Re: WASM will replace containers

#152
post #89
post #57

Earlier quoted context omitted.

>But then you've got to figure out and prevent all the security holes that can be introduced by adding file access, networking, etc. So an operating system?

Yes. Wasm does to my knowledge not have an answer for this, even if some projects patch in their bridge logics. Networking and file systems, and the permission model, is "the rest of the fucking owl". Linux isn't standardized, but at least it's Linux. Without consensus on the fundamental APIs I don't see how we can get to a platform agnostic experience. Even an https call isn't simple: you need TCP and you need to pu…

Check out WASI, it's exactly what you are talking about.

Re: WASM will replace containers

#153

One benefit of being an old engineer is watching how excited people get when they rediscover something that has gone around the bend over and over again. I swear if you fuckers reinvent DCOM I will shit in your hats.

I actually didn't mind COM and DCOM. I didn't overuse it, so it never bit me. I guess it's why I love using Microsoft Orleans. The virtual actor model is enough for me to solve almost every problem. If Cloudflare Durable Objects (https://developers.cloudflare.com/durable-objects) can reduce latency they might have the winning product.

Re: WASM will replace containers

#154
Some pretty bold claims with what I felt was shaky justification and a simplistic understanding of the foundations.

>> I am a software developer for a top 100 app. I've written code you've probably used. That makes me qualified to say stuff.

Ah... that explains a bunch of it.

Re: WASM will replace containers

#155
They're different things, solving different problems:

- Containers are wrappers for binaries. Any binary can be contained, and when run, it gets a constrained (fake) view of the kernel.

- WASM defines a portable binary format. WASM is intermediate-representation, in the same vein as Java byte-code.

You could reasonably put WASM binaries inside containers

Re: WASM will replace containers

#156
post #117

Earlier quoted context omitted.

Lots of people use wasm in production right now, and toolchain support is in a good place across several languages. In that sense we are already there. You likely visited a website using wasm today without realizing it, and major apps like Photoshop have been ported to wasm, which was the original dream behind it all. That has all succeeded. But if you want to replace containers specifically, as this article wants, t…

There's a difference between a handful of sites that use wasm and it being the mainstream way in which we write web applications and run hosted software. It's still a very very niche platform that has not fulfilled its promise of either being a first party web tool or a universal runtime. Like, how easy is it to write a web application in Wasm? Or how easy is it to compile your average program written for a native pl…

You're right, but wasm's goals were never to be a mainstream way to write web applications. It was designed very specifically to allow things like Photoshop, Unity, and other high-end applications to run on the Web, things that just didn't run at all, and were really important. But despite their importance, those applications are a small fraction of total websites.

Wasm succeeded at its initial goals, and has been expanding into more use cases like compiling GC languages. Perhaps some day it will be common to write websites in wasm, but personally I doubt it - JavaScript/TypeScript are excellent.

Re: WASM will replace containers

#157

Earlier quoted context omitted.

As somebody who's in the process of building a sandbox for RISC-V 64 Linux ELF executables, even I'm still on the fence. The problem is that in WASM-land we're heading towards WASI and WAT components, which is similar to the .NET, COM & IDL ecosystems. While this is actually really cool in terms of component and interface discovery, the downside is that it means you have to re-invent the world to work with this flavo…

> The problem is that in WASM-land we're heading towards WASI and WAT components, which is similar to the .NET, COM & IDL ecosystems. While this is actually really cool in terms of component and interface discovery, the downside is that it means you have to re-invent the world to work with this flavor of runtime. At the application level, you're generally going to write to the standards + your embedding. Companies th…

I'm really eager to see what happens in the near future with WAT & WASI, but I'm also very aware of seeing a repeat of DLL hell.

There are a few niches where standardization of interfaces and discoverability will be extremely valuable in terms of interoperability and reducing the development effort to bring-up products that deeply integrate with many things, where currently each team has to re-invent the wheel again for every end-user product they integrate with, with the more ideal alternative being that each product provides their own implementations of the standard interfaces that are plugged into interfaces.

But, the reason I'm still on the fence is that I think there's more value in the UNIX style 'discrete commands' model, whether it's WASM or RISC-V I don't think anybody cares, but it's much more about self-describing interfaces with discoverability that can be glued together using whatever tools you have at your disposal.

Re: WASM will replace containers

#158

WASM solves a different problem to containers. Where WASM does well is in running sandboxed code efficiently, because that's where it started out. I think WASM will likely take over as the standard for shipping things like Functions-as-a-Service implementations, and other forms of plugins, where one host application/server of some kind wants to efficiently run pieces of untrusted logic. Containers don't solve that pr…

Cloudflare, Fastly, and Amex use WASM in their FaaS implementations

There are a lot of package compatibility issues, not everyone has migrated or will migrate away from things like fs access

I'm going through this now, giving a full Cloudflare tech stack a shot, but I'm nearing a limit before I just go back to containers

Re: WASM will replace containers

#159

Earlier quoted context omitted.

Wasm: client, user's device Containers: server, dev's device Cmon OP try to keep up

Well, not quite, that's an oversimplification. As I mentioned I think there's a place for WASM as the common unit of business logic, for things like plugins. Implementing a FaaS runtime like Lambda is actually quite hard to do in a way that is both safe and multi-language. Compiling down to a safe, sandboxed bytecode, is not a bad idea, regardless of whether you're doing that to run it in a user's browser, or to run…

This is what CUE is exploring for WASM, the ability to have custom functions or plugins that can be shipped with modules and run anywhere. It will be super cool, but they are blocked on upstream changes to the WASM runtime

Re: WASM will replace containers

#160
post #110
post #102

Earlier quoted context omitted.

ActiveX had this sorted out 25 years ago. Code signing with different levels available for access outside the sandbox controllable by the user.

And a nice centralized authority that judges the trustworthiness of a given application by staring at a binary extensively?

Sounds good!
Post reply on HN