Earlier quoted context omitted.
Indeed. The JVM did a lot of things right, however they missed three that are now solved with Wasm: * Completely tied to an ecosystem, and incompatible with another (you could not run C programs in the JVM) * Proprietary (vs based on an open standard) * They couldn't run in the browser seamlessly
I'm still flabbergasted that all these people, in the year 2023, think a hypertext markup document viewer with a terrible UX and bizarre design restrictions that takes 4GB of RAM to run and re-implements the features of an entire operating system is the end-all be-all of technology. If it doesn't run in a web browser it's worthless. I can't even come up with a metaphor for it. We're choosing to be stuck with shitty a…
Announcing WCGI: WebAssembly and CGI
91–100 of 121 posts
Re: Announcing WCGI: WebAssembly and CGI
#92Disclosure: I'm the creator
This project is different in that it builds PHP to WASI.
Re: Announcing WCGI: WebAssembly and CGI
#93Re: Announcing WCGI: WebAssembly and CGI
#94Next thing you know each wasm assembly will need a package format to ship assets with and have the app server provide common resources to all assemblies, e.g. db connection pools, some notion of security, etc. Replace Wasmer with the a JVM-based app server and WASM assemblies with JVM-bytecode. The big difference is the source language doesn't matter as long as it's able to be run/replaced by WASM bytecode. We're hea…
Re: Announcing WCGI: WebAssembly and CGI
#95I've always loved the simplicity and flexibility of CGI. To check my understanding: since CGI just takes a raw request over stdin and returns a response over stdout, would a WCGI wasm module be compatible with WAGI[1] and vice-versa? [1] https://github.com/deislabs/wagi
That would make sense, anyhoo. CGI is plain text which I don't think is optimal for this stuff.
Re: Announcing WCGI: WebAssembly and CGI
#96Earlier quoted context omitted.
Not just in the past, arbitrary program sandboxing is not possible even today.
Exactly, yet everyone pretends wasm is the exception for some reason...
Re: Announcing WCGI: WebAssembly and CGI
#97Earlier quoted context omitted.
Indeed. The JVM did a lot of things right, however they missed three that are now solved with Wasm: * Completely tied to an ecosystem, and incompatible with another (you could not run C programs in the JVM) * Proprietary (vs based on an open standard) * They couldn't run in the browser seamlessly
I'm still flabbergasted that all these people, in the year 2023, think a hypertext markup document viewer with a terrible UX and bizarre design restrictions that takes 4GB of RAM to run and re-implements the features of an entire operating system is the end-all be-all of technology. If it doesn't run in a web browser it's worthless. I can't even come up with a metaphor for it. We're choosing to be stuck with shitty a…
It can be run outside a browser, and is much more performant than using the whole browser. The future is very likely going to consolidate around WASM and WebGPU, regardless of what hardware you're targeting. If you want more performant specs, it will be driven through a public and consensus driven way... there are far too many economies of scale to standardization for it not to be.
The days of building an ecosystem around a closed, proprietary language/protocol/spec are over. The browser was just the first to bridge the gap... now we move on to WASM, and maybe 10 years from now something newer
Re: Announcing WCGI: WebAssembly and CGI
#98> Consider the challenge of running PHP programs on servers. We have two primary options: > 1. Wrap the PHP interpreter with a layer that instruments each HTTP call > 2. Use the existing php-cgi program and simply compile it to Wasm > Option 2 is not only faster, but it also enables any web application on Wasmer more efficiently. I’m confused. This seems to be suggesting that php-cgi, which has to initialise the PHP…
To me this seems a little closer to the architecture of AWS Lambda than OG CGI, though that is not a perfect analogy either since this is in a WASM runtime within their server process, rather than a separate process. But the programming interface is a handler function you provide with an interface that looks like this in Rust: `fn handler(request: Request) -> Response ` My understanding is the main function is called…
Re: Announcing WCGI: WebAssembly and CGI
#99I don't understand. Why not just compile to machine code and use plain old CGI?
Others have some good reasons to also consider. Also, launching new sandboxes in wasm is supposed to be extremely extremely extremely cheap. Where-as launching a cgi-bin executable- even a very small libcgi based one-has a significant cost, requires a lot of kernel work & context switching. With WCGI making new "processes" is nearly free & you don't have to context switch. A lot of the excitement around wasm in gener…
Re: Announcing WCGI: WebAssembly and CGI
#100Earlier quoted context omitted.
Memory usage too, right? A C++/Rust wasm won't consume a hundredth of the memory a JVM application typically uses. I like getting the job done on a 512MB RAM VPS. JVM the language might be cool; the bloat and forced-GC can be spared.
JVM ran in relatively little memory back in the day. I remember running applets on ~16 megabyte systems. Compare that to today where you need a half gig of RAM to even launch a browser.