Live data from Hacker News

WASM will replace containers

creston.blog

231–240 of 371 posts

Re: WASM will replace containers

#231
post #200

Earlier quoted context omitted.

https://en.m.wikipedia.org/wiki/List_of_JVM_languages https://en.m.wikipedia.org/wiki/List_of_CLI_languages https://en.m.wikipedia.org/wiki/IBM_i#TIMI Really this is only new for those that weren't around, many other examples, even older available.

Except developers have consistently chosen not to embed the JVM, CLR, or IBMi. wasmtime (the current reference runtime implementation) is much more embeddable than these other options were/are, and is trivially embeddable in many languages today, with good performance. On top of being an option, it is being used , and WebAssembly is spreading cross-language, farther than the alternatives ever reached. These things ma…

As if developers are consistently chosing to embedd WASM, just wait after the hype cycle dies.

What we have now is lots of hype, mostly by folks clueless of their history, in the venture to sell their cool startup idea based on WASM.

Re: WASM will replace containers

#232

Earlier quoted context omitted.

> 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…

> The sandboxing abilities of WASM are near unmatched, along with it's startup time and execution speed compared to native. Could you expand on this? I think everyone would agree with the first two of these - sandboxing is the whole point of WASM, so it would be excellent at that. And startup latency matters a great deal to WASM programs, again not surprised that runtimes have optimised that. But execution speed comp…

Ah this could have been clearer -- the context is userland emulation (and I expand that to broadly mean emulation/VMs and even containers -- i.e. the current group of options). It's not that Wasm is likely to run faster than native, it's that it runs reasonably close to native speed when compared to the other options.

Separately, it also matters what you consider "native" -- it is possible to write programs in a more efficient language (ex. one without a runtime), apply reasonable optimizations, and with AOT/JIT be faster than what could be reasonably written idiomatically in the host language (e.g. some library that already exists to do X but just does it inefficiently).

Re: WASM will replace containers

#233
post #231

Earlier quoted context omitted.

Except developers have consistently chosen not to embed the JVM, CLR, or IBMi. wasmtime (the current reference runtime implementation) is much more embeddable than these other options were/are, and is trivially embeddable in many languages today, with good performance. On top of being an option, it is being used , and WebAssembly is spreading cross-language, farther than the alternatives ever reached. These things ma…

As if developers are consistently chosing to embedd WASM, just wait after the hype cycle dies. What we have now is lots of hype, mostly by folks clueless of their history, in the venture to sell their cool startup idea based on WASM.

> As if developers are consistently chosing to embedd WASM, just wait after the hype cycle dies. > > What we have now is lots of hype, mostly by folks clueless of their history, in the venture to sell their cool startup idea based on WASM.

I don't think there's much of a hype cycle -- most of the air has been sucked out of the room by AI.

There aren't actually that many Wasm startups, but there are companies leveraging it to great success, and some of these cases are known. There is also the usefulness of Wasm as a target, and that is growing -- languages are choosing to build in the ability to generate wasm bytecode, just as they might support a new architecture. That's the most important part that other solutions seemingly never achieved.

The ecosystem is aiming for a least-changes-necessary approach -- integrating in a way that workflows and existing code does not have to change. This is a recipe for success.

I think it's a docker-shaped adoption curve -- most people may not think it is useful now, but it will silently and usefully be everywhere later. At some point, it will be trivial to ship a small WASM binary inside (or independent of) a container, and that will be much more desirable than building a container. The artifact will be smaller, more self-describing, work with language tooling (i.e. a world without Dockerfiles), etc.

Re: WASM will replace containers

#234
This blog post's promise is all "pink fluffy unicorns", but for a single use case: "Long running containers powering microservices, probably in bigger installations, for consumer facing applications and APIs".

Containers are much more than that. They're service providers for small installations, short-running VeryFatBinaries, close to the metal, yet isolated complex applications in HPC environments.

WASM will be all and well, it'll be a glorified CGI, and might be a good one at that, we'll see, but it'll not and can't snipe containers with one clean headshot and be done with that.

It'll replace Kubernetes? Don't be silly. Not everyone is running K8S for the same reason, and I'm telling that as a person who doesn't like K8S.

Re: WASM will replace containers

#235

Disagree: While this might be the case for a handful of languages such as Rust of Go - Many lanugages need a whole lot of other stuff to run (eg, Python needs a lot bunch of dependencies).

I thought the same at first, but found Python Cloudflare Workers already run in WASM: https://developers.cloudflare.com/workers/languages/python/h...

Re: WASM will replace containers

#236

Earlier quoted context omitted.

> I think the browser problem is a marketshare/market power problem, and Wasm doesn't have that problem. No, it really isn’t. For more than the last two decades every browser bar IE looked towards compatibility and only included differences as browser-specific extensions. And even when Microsoft eventually caved and started the Edge project to create a compatible browser, they ended up admitting defeat and pivoted to…

Maybe I'm just not understanding, but I'm not sure how this precludes it being a marketshare problem -- the thing is that the marketshare leader doesn't have to worry about compatibility/being interoperable. > And even when Microsoft eventually caved and started the Edge project to create a compatible browser, they ended up admitting defeat and pivoted to Chromium themselves. This can be interpreted as a problem of m…

IE hasn’t been the market share leader in a long time and couldn’t even retain compatibility with itself, let alone any ACID tests nor wider formalised standards.

And these days the problem is simply that the specifications are so complex and fail mode so forgiving that it’s almost impossible for two different implementations to output entirely the same results across every test suite.

Neither of these are market leader problems. The former is just Microsoft being their typical shitty selves. While the latter is a natural result of complex systems designed for broad use even by non-technical people.

Re: WASM will replace containers

#237

The second paragraph is perhaps something you experience on a very small team in a very small company, but definitely not everyone's day-to-day experience and it sounds like the author would like to impose their own limited experience onto the whole industry. In a lot of companies the DevOps usually jump in and handle the entire management of the pipeline, including the build and release of containers. For most of de…

I think WASM is misfortune because for most websites (forget backend for a moment!), anything it can do can be done better and faster using as JS and server side split. JS gets heavily optimised by V8. And add in the download time for the WASM and the learning curve and it isn't too attractive.

It needs something to make it a must have for some area of adoption. I just don't see it yet.

Re: WASM will replace containers

#238
post #223

Earlier quoted context omitted.

I believe at least one consulting company in this Indian city is still training new graduates in COBOL and setting them up with dead end careers.

COBOL just had a new release, COBOL 2023 is the most recent standard. Also does objects nowadays. Additionally, given all the AI prompts being used nowadays writing long English texts instead of proper programming, COBOL was actually a language ahead of its time.

Ah COBOL, Fortran, Perl and PHP.... all chant: "No no.... we're actually modern now guys!!!"

Re: WASM will replace containers

#239
post #13

"The main thing holding back wider adoption is a lack of system interfaces. File access, networking, etc. But it's just a matter of time before these features get integrated." But then you've got to figure out and prevent all the security holes that can be introduced by adding file access, networking, etc. That's what killed the Java write-once, run-anywhere promise. Maybe put the whole thing into a container? Oops,…

> That's what killed the Java

It's a similar but quite different solution.

Java

- was designed with a lot of tight system integration foremost, sand boxing being secondary

- a ton of the sandbox enforcement where checks run in the same VM/code as the code they where supposed to sandbox, like you Java byte code decided if Java byte code should be able to access file IO etc.

- Java Applets are, at lest for somewhat more modern standard, a complete security nightmare _in their fundamental design_, not just practically due to a long history of failure.

- a lot of the security design was Java focused, but the bytecode wasn't limited to only representing possible Java code

- Java "sandboxing" targeted a very different use-case/context the "WASM replace containers" blog is speaking about, mainly the blog is about (maybe micro-) servies while Java sandboxing was a lot about desktop application. I.e. more comparable with flatpack and their sandboxing is also (sadly) more about compatibility then security (snap does that better, but has other issues).

And especially the last point one is one to really important as we are not speaking about WASM replacing sandboxing e.g. for dev tools and similar but sandboxing for deployment of micro services written with it in mind. In such context

1. you (should))always run semi trusted code, not untrusted code

2. when giving access to other resources (e.g. file system) it's often in a context where you normally don't need any form of dynamic access management (like you need on a desktop) which means _all the tech underlying to containers can be used with WASI_. Like there is no reason not to still use cgroups, dropping privileges and co integrated in your WASI VM in the same way docker and co uses them.

3. (I kinda thing) there is a (subtle/very slow) trend to not rely only on container isolation but e.g. have a firecracker micro vm run multiple closely coupled containers (a pod/side care container) but place not closely coupled containers in different micro VMs.

The true challenge isn't WASI, but that it's competing with docker->kubernets where docker is "one thing fit's all (badly)" solution which can not only run your services but can also run all kind of dev tooling, legacy applications etc. without requiring any changes to them and can (badly but often good enough) simulate your deployment locally with compose. Then to make the competition hard kubernets has been become somewhat of a "standard" interface to deployment, especially in the cloud, this might suck, but also mean you use OIC images both locally in in production. And that is what the WASI for service sandboxing use-case is competing with OIC images and software running them, nut just docker.

Re: WASM will replace containers

#240

No. Wasm is not useful enough yet. Neither are containers.

Damn. I didn't get the memo on containers being useless. Better tell my boss my last 3 months work is actually going to take a year.

On a serious note. What's missing in containers? Maybe they could be a bit more Nixxy? (Just use Nix to make the container)

Post reply on HN