Open GoogleCodeExporter opened 9 years ago
From what I know, you have precisely described what node.js does :)
I have always developed v8cgi with Apache in mind, so running a custom js-based
HTTP
server is might be somewhat problematic. All the questions you posed are
actually
solved pretty nicely in Apache, so this resembles reinventing the wheel a bit:
- how to determine what "page" to serve: mod_rewrite. In v8cgi, we would need
our own
similar impl.
- whether to serve static content: default handler. In v8cgi, we would need
something
similar to http://cz.php.net/manual/en/function.fpassthru.php
- how to isolate exceptions and VM crashes: apache MPM. In v8cgi, we would need
to
support either forking (this is actually already on TODO) or multithreading.
Original comment by ondrej.zara
on 30 Apr 2010 at 1:59
Good tip - i forgot about node.js :).
About fork: i implemented fork() for SpiderMonkey some years ago... maybe it'll
be of
help:
http://spiderape.svn.sourceforge.net/viewvc/spiderape/plugins/SystemFuncs/system
_func
s.cpp?view=markup
(search for "fork(" - it's the last function in the file)
Original comment by sgbeal@googlemail.com
on 30 Apr 2010 at 2:13
Original issue reported on code.google.com by
sgbeal@googlemail.com
on 30 Apr 2010 at 1:24