httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: cvs commit: apache-2.0/src/main http_core.c http_protocol.c
Date Mon, 02 Oct 2000 22:20:52 GMT

> I don't see what the big deal is about a buffer filter.  Coalescing
> is necessary if the data that is about to be sent out the network
> is less than a defined (configurable) threshold and the stream is
> not in a non-buffering mode.  That coalescing can take place either
> within the TCP_CORK (if we are lucky to have one) or a buffering
> layer.  Assuming that the module will implement writes "efficiently"
> is not a reasonable thing for the server to do.
> This is not a question of design purity -- I was always assuming
> that such a layer would exist, for the same reason that BUFF exists.

AFAIAC, it is not a question of whether or not we coalesce data, it is
where we coalesce it.  I would personally prefer to coalesce data at the
lowest possible location, so that we aren't copying things multiple
times.  In my head, that means that we have two possible locations to do
the coalescing.  1 in a separate filter that just does buffering, or 2 in
the core filter.  As much as I am in favor of small filters that do one
thing and do them well, I really believe the core filter needs to be the
thing to do the coalescing.  The core filter is the one filter that really
understands the network that it is writing to.  If some other filter does
the buffering, then we are forced to always buffer the same way regardless
of what type of writing we are doing.

I need to take a much closer look at Bill's latest re-vamp of
core_output_filter.  Hopefully I will have time later tonight to really
dig into it.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message