httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: Server push problem
Date Tue, 24 Oct 1995 04:08:39 GMT
On Sat, 21 Oct 1995, Ben Laurie wrote:
[server-push problems]
> --------------------------------------
> 
> This is of course, true - we buffer in great big lumps, and this will totally
> stuff server push. Would anyone care to express views on these possibilities?
> 
> 1. Don't buffer CGI output.
> 
> 2. Recognise the MIME multipart header and look for the separator.
> 
> 3. Add a timeout.
> 
> 4. Do a combination of 2 & 3.
> 
> 5. Do any of the above on a configuration file flag.
> 
> 6. Declare server push to be a non-standard extension and ignore the problem.

There are two ways to do server-push with Apache with a minimum of hassle:

1) Make your CGI script an NPH script, by prepending the name with "nph-" 
(a hack if ever there was one!) This has another important benefit, which 
is that it detaches the script from the server process so you don't tie 
up resources while someone downloads your 600K server push over a 14.4 
modem.  However, you can't get size or content-type information in the log 
file.

2) Cat the output of your script into its own file and serve it up as an 
as-is file.  This has the drawback in that one can't set sleeps() to 
simulate controlled animation, but it does give you file and content-type 
information and it tends to be easier on your server.  One bash script 
I've seen that implements server-push fires off 10 + 4X shell processes 
(where X is the number of frames) to accomplish its task - ICK!

Might be cool to document this somewhere. 

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  brian@hyperreal.com  http://www.[hyperreal,organic].com/


Mime
View raw message