Open jbenet opened 10 years ago
@deian tell me why this is stupid/already has been done.
@substack, you might like this
Processes extremely cheap
I've been looking at using v8 isolates to start "child node processes" instead of a new kernel processes. The biggest reasons for that are not performance however, but that it provides complete isolation of your child process.
There may be a performance gain because you're not loading a new copy of v8 into memory, but I think the truth is in the nonexistent benchmark.
The current cost of spawning processes in the linux kernel has given rise to a many odd side effects when high performance is a concern (so always):
These all fly in the face of the UNIX principles.
What if we got process spawning to be about as cheap as userland green threads. This sounds absurdly hard given all the traps/verification that currently happens to syscalls. But consider a microkernel, or a fork of linux, that virtualizes the default process spawn to make it live under the same (or virtually the same) userland sandbox. We get great modularity, multiprocessing, and pipes back!
Think Docker but inside the kernel. "you think you're spawning another
VMProcess, but you're really not! we're just virtualizing that and cleverly isolating it!" (... in a cheaper way than the old, less clever, expensive (and already virtual!) isolation we were doing before...)This could be a huge win for software engineering.