Re: [Boa-devel] Dynamic Content
Brought to you by:
jnelson
From: Jon N. <jn...@ja...> - 2003-02-04 17:07:03
|
On Tue, 4 Feb 2003, Allan Wind wrote: > On 2003-02-04 07:52:49, Jon Nelson wrote: > > Another possibility that I've been playing with recently is SCGI: > > http://www.mems-exchange.org/software/scgi/ > > I read the SCGI specification eariler, and found the pre-pending of > string size a little odd, it leaves them with only \0 to seperate header > field and value. Is it _that_ time consuming to parse http headers > twice? Isn't the header names a fixed set (possible extended from > HTTP to provide the information the environment does in CGI)? What > about SOAP (which I know hardly anything about, btw)? SOAP is expensive. Basically SCGI uses the netstrings specification, which when boiled down means that every "string" is prefixed by its length, and \0 is the seperator (versus \n, \r\n, \r, tab, and others). Header names are not from a fixed set. There are some environment variables that should always be present, others that are usually present, and yet others that are purely optional. If you send to a CGI the header "foo: bar" the CGI should get HTTP_FOO=bar in its environment. All "unrecognized" header values get prefixed with HTTP_. However the mechanism, it's an unimportant detail really. It's far easier IMO that the FastCGI spec which is quite a bit more complex. Furthermore, if I read it properly, I don't think the httpd even needs to re-parse the output, making SCGI a "smarter" NPH. Another bonus of SCGI is that the httpd has its choice if reliable transports (tcp/ip or fifo/socket), thus the SCGI "server" could be on a different machine than the httpd, the bonus there being able to sustain far higher load and possibly even load balancing *right at the network layer*. -- Democracy is two wolves and a sheep voting on what to have for dinner. Liberty is two wolves attempting to have a sheep for dinner and finding a well-informed, well-armed sheep. Jon Nelson <jn...@ja...> C and Python Code Gardener |