Mailing List Archive

Nonblocking I/O, was: Re: [mod_backhand-users] Odd/even IP-adresses
> If you want a more flexible way to log in apache (much more on the fly
> and cleaner), look into mod_log_spread... It takes some time to set up,
> but the monitoring that cam be done with it and its flexibility are
> worth the investment of time.
> http://www.lethargy.org/~george/mod_log_spread/

OK, I'll try this, look's great..

> This will allow you to rotate logs without ever touching apache. (Except
> for a very minor one time configuration change)
>
> > Just another small problem: I have a web application that tooks
> > very long to load (calculates information in realtime while
> > customer waits to get the response). I want to output the
> > header of the page immediately to give the user some response.
> > I figured out that mod_backhand doesn't support this directly,
> > right? There must be buffering of some kind in it. I'm not
> > very familar with C (just a Perl/Java-App-Coder ;-), so is there
> > an easy solution for this?
>
> Hmm... It might do that now? Do you see it behaving differently? I
> don't do any buffer in mod_backhand. I let Apache take of that when it
> sets the send and receive buffers on the TCP sockets. But, in the
> mod_backhand code, I basically perform a:
> while(read some amount) { write some amount }
> I guess if your header is small, it will be blocked waiting for more. I
> intended on write a non blocking I/O loop to more aggressively push I/O,
> but this is first time I have heard it needed.

My webapp just sends out small status messages describing the
status of the calculation, these should be displayed as soon
as the server sends them.

Before I tried mod_backhand, I tried out mod_rewrite in combination
with mod_proxy and squid. mod_proxy did cache results up as mod_backhand
seems to do, squid worked without problems. But squid isn't
the optimal solution because it gets very fat in RAM and
wasn't done for this type of forwarding...


> I will try to get that
> into the next versions of mod_backhand.

Hey, great.

> It is hard to make that
> portable code.

This is why I code just perl+java ;-)

Matt