3 ms·
I'm not sure if it's mainstream but my thoughts on server-side WASM always run to user-provided logic. WASM provides a helpful building block for a generic user
by zrail 4y ago
I'm not sure if it's mainstream but my thoughts on server-side WASM always run to user-provided logic. WASM provides a helpful building block for a generic user-provided logic sandboxed runtime.
Think about a workflow engine embedded in a marketing product. Usually there's some kind of GUI builder which generates an AST to be interpreted directly at runtime. What if instead the GUI generated a WASM artifact to be run on sandboxed runtimes?
What if, furthermore, you offered advanced users the opportunity to upload WASM binaries where they could implement arbitrarily complex logic to be executed in the sandbox?
I think this is a super powerful concept, although of course making a business case for implementing it is the trick.
- fwsgonzo 4y agoI don't think a server-side sandbox makes sense for anything that is JIT-based (or even binary translation). We already have KVM which is actual native performance, and it can run anything you would ever want, and then some. WASM is bytecode working on a 2GB linear arena, and it fits OK in a browser.
- azakai 4y agoThe 2GB limit was a temporary browser limitation. Modern browers mostly support 4GB now. And wasm64 is testable today, which supports 64-bit pointers and more than 4GB.
- zrail 4y agoI don't think that's really the use case I'm describing. Maybe I'm doing a bad job, I dunno. The use case is essentially user logic for event stream processing, where the events are things like "received an email" or "clicked a link" or "3 days have passed". You're not going to spin up a KVM for every contact on a 2 million member email list even if you're using Firecracker, but executing a WASM blob for every event might be feasible.