3 ms·
This depends on how lightweight are those chunks. If you goal is <0.1 sec startup -- yeah, then you'll need WASM. If you are OK with 1-5 second of startup, yo
by theamk 6y ago
This depends on how lightweight are those chunks.
If you goal is <0.1 sec startup -- yeah, then you'll need WASM.
If you are OK with 1-5 second of startup, you have a ton of options. Apache Spark uses JVM magic to send out the the raw bytecode. You can start up docker container. If you are willing to rewrite stdio, you can exec machine code under seccomp/pledge.
There are even full-blown VM solutions -- Amazon Firecracker, which claims that: "Firecracker initiates user space or application code in as little as 125 ms and supports microVM creation rates of up to 150 microVMs per second per host."
- threeseed 6y agoAnd for people that don't know. AWS Lambda uses Firecracker under the hood.