Live data from Hacker News

mod_wasm: Run WebAssembly with Apache

wasmlabs.dev

31–40 of 54 posts

Re: mod_wasm: Run WebAssembly with Apache

#31
post #30

Does this mean I could write a web api in Rust and deploy it to e.g. Hostgator or Bluehost?

It would still require the host to have the module installed, right? That might come to be common, but it is a requirement that I don't expect everyone to decide to implement

Re: mod_wasm: Run WebAssembly with Apache

#32

What is the actual problem this is trying to solve? Are there programming languages it was previously hard to write web apps in? Do people not like setting up nginx? From my understanding the benefit of wasm on the server side is generally that you get the sandboxing inherent in the VM. Why would you want that in the context of Apache? Are people planning on running untrusted code? If mod_wasm is designed to address…

> Do people not like setting up nginx?

I don’t.

But I’m just cranky… apache httpd works well for me and I don’t feel the need for nginx.

Re: mod_wasm: Run WebAssembly with Apache

#33
post #21
post #11

Does nginx have any (third-party?) modules that are roughly equivalent to this?

wasm-nginx-module https://wasmedge.org/book/en/use_cases/frameworks/mesh/wasm-...

So it requires the nginx Lua module which is then used to load the wasm blobs? what a weird module. So somehow this thing is going through at least 2 or 3 different VMs (LuaJIT + WASI) so that you can eventually run your Python script in nginx...

Re: mod_wasm: Run WebAssembly with Apache

#34
post #14

What is the actual problem this is trying to solve? Are there programming languages it was previously hard to write web apps in? Do people not like setting up nginx? From my understanding the benefit of wasm on the server side is generally that you get the sandboxing inherent in the VM. Why would you want that in the context of Apache? Are people planning on running untrusted code? If mod_wasm is designed to address…

Running WebAssembly modules in Apache http server allows devs to run many different languages by targetting Wasm. This includes interpreted languages like the Python example from the article. With the WebAssembly sandboxing capabilities you're getting a high level of isolation without adding overhead to the system. VMs and Containers require to run more complex environment for runnning the code. And even you're runni…

I understand that, but was it really hard to deploy web apps in any of those languages before? Granted, you wouldn’t use Apache to run them, but the current reverse proxy through nginx method seems much better in terms of complexity and performance than wasm + Apache. Am I missing something?

Re: mod_wasm: Run WebAssembly with Apache

#35

What is the actual problem this is trying to solve? Are there programming languages it was previously hard to write web apps in? Do people not like setting up nginx? From my understanding the benefit of wasm on the server side is generally that you get the sandboxing inherent in the VM. Why would you want that in the context of Apache? Are people planning on running untrusted code? If mod_wasm is designed to address…

I'm not sure, other than "I can do that too" kind of things... I would probably lean towards Deno, Cloudflare's worker runtime and wasmer all before this.

Re: mod_wasm: Run WebAssembly with Apache

#36
post #23

So, is this like mod_CGI, but more modern technology?

WASM isn't more more "modern", it is just being hyped up because it caters to the JS developers.

You have that exactly backwards... WASM allows you to build in whatever language you like and target portable operation that includes a browser.

Re: mod_wasm: Run WebAssembly with Apache

#37

Earlier quoted context omitted.

One of the reasons PHP gained so much traction was because it is very easy to deploy and run, no dependency hell. WASM is self-contained and has the same property.

Now it is the battle of keeping the zillions of JavaScript packages vs PHP packages up … to … date. I think WASM may have bigger problems with external vulnerability assessment team identifying those modules by version that got broken.

WASM is the wrong level of the software stack to check for outdated versions, that's the host language's package manager's job.

Re: mod_wasm: Run WebAssembly with Apache

#38
post #23

So, is this like mod_CGI, but more modern technology?

WASM isn't more more "modern", it is just being hyped up because it caters to the JS developers.

WASM is basically a way to deliver the old JVM promise of "compiled once, run everywhere, sandbox if needed", with the additional constraint of "close-to-native performance" and "any language can compile down to it". It's a good thing if it delivers on all those promises. And it's especially a good thing if you don't like JS, because it's our best shot at dethroning JS.

Re: mod_wasm: Run WebAssembly with Apache

#39

What is the actual problem this is trying to solve? Are there programming languages it was previously hard to write web apps in? Do people not like setting up nginx? From my understanding the benefit of wasm on the server side is generally that you get the sandboxing inherent in the VM. Why would you want that in the context of Apache? Are people planning on running untrusted code? If mod_wasm is designed to address…

"Are people planning on running untrusted code?"

I run code that I pull from GitHub, PyPI and NPM every day. I'd feel a whole lot more comfortable running it in a WASM sandbox. People ship bugs!

Re: mod_wasm: Run WebAssembly with Apache

#40
post #38

Earlier quoted context omitted.

WASM isn't more more "modern", it is just being hyped up because it caters to the JS developers.

WASM is basically a way to deliver the old JVM promise of "compiled once, run everywhere, sandbox if needed", with the additional constraint of "close-to-native performance" and "any language can compile down to it". It's a good thing if it delivers on all those promises. And it's especially a good thing if you don't like JS, because it's our best shot at dethroning JS.

I think Cargo and GoReleaser already make this simple enough. Heck, even Alpine Linux has down the process of compiling for multiple architectures for multiple languages. It really isn't that much of a challenge to do so and there are already sandboxing solutions for each operating system. WASM doesn't get rid of JS, it just puts sandboxing into a JS-based engine. The last thing people should want is to run binary blobs in your browsers which is exactly what it does. The same browsers who gladly trade privacy at ever iteration. Might as well just go publish your browsing history online cause that is where this will lead.
Post reply on HN