EDIT: as pointed out below, mod_python for Apache already goes pretty far in this direction.
EDIT: as pointed out below, mod_python for Apache already goes pretty far in this direction.
The problem with this approach is that MRI Ruby has tonnes of global state, so unless you restart the interpreter for each request, you're going to end up with state leaking between requests.
Slash is designed so that many VMs can be quickly created in the same process without any shared global state. This way each request runs in its own isolated context and can't affect any other requests.
So what? That's how PHP works, and it's still pretty fast for most things. Would a mod_ruby be that much slower? Should still be faster than a CGI-style invocation.
A fast, non-shared interpreter could work very well in a threaded server, or a threaded backend to an event-based server.