Skip to content
Newer
Older
100644 37 lines (24 sloc) 1.56 KB
5056eba @claudioc Readme
authored Jul 27, 2010
1
d7e9cf5 @claudioc Readme
authored Jul 27, 2010
2 Node SCGI client interface
3 ==========================
5056eba @claudioc Readme
authored Jul 27, 2010
4
5 This module gives you a (raw) interface for talking to SCGI "servers".
6
e12350e @claudioc Readme
authored Jul 27, 2010
7 This could be useful, for example, on a mixed environment where Node.js acts
5056eba @claudioc Readme
authored Jul 27, 2010
8 as the frontend serving some kind of requests while something "behind"
9 could serve some other kind of requests (ie: Python scripts)
10
11 At this stage the module is so simple that is not even documented: you can
12 learn what it does simply reading the one page long code source :)
13
14 If you want to try it, just install python-scgi (this is needed by the example
15 scgi server that you find in the node-sgi directory).
16
17 The example scgi server sits on the port 4000 and does nothing more that
18 saying "hello" (as usual). Running it is just a matter of executing
19 "python ./node-sgi.py -F" (-F keeps the server on foreground, better for
f4c222c @claudioc Readme
authored Jul 27, 2010
20 testing purposes). The server has been hacked over the existing Quixote scgi
21 server example on the python-scgi Debian distribution.
5056eba @claudioc Readme
authored Jul 27, 2010
22
23 The scgi module roughly writes and inteprets HTTP headers (on the request
24 and the response), so be aware of the (quite standard) way it expect them on the
25 response if you need to modify them. Again, the example scgi server should
26 be really enough.
27
f4c222c @claudioc Readme
authored Jul 27, 2010
28 Keep in mind that the overall codebase, at the moment, is more or less of proof of concept.
5056eba @claudioc Readme
authored Jul 27, 2010
29
30 Performances are quite good (about 300 r/s) using a virtualbox Ubuntu linux setup,
31 and apache's ab benchmark via OSX.
32
85b0f7e @claudioc Readme
authored Jul 27, 2010
33 The nodejs server shipped with this module will serve SCGI requests when
5056eba @claudioc Readme
authored Jul 27, 2010
34 the URL contains the /scgi/ pattern. Something like wget http://localhost:8000/scgi/foobar
35
36
Something went wrong with that request. Please try again.