httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: eek. poor chunking behavior.
Date Tue, 12 Sep 2000 12:18:09 GMT
Tony Finch <dot@dotat.at> writes:

> Greg Stein <gstein@lyra.org> wrote:
> >Manoj Kasichainula wrote:
> >> 
> >> What are the ill effects of this? Small chunks (greater than a few
> >> hundred bytes anyway) are slightly wasteful, but not really that bad
> >> as far as I can tell. Now, if the chunks are 3 bytes, or if each chunk
> >> is being send out as a seperate packet, that would be really bad.
> >
> >Calling ap_rputc('<', r) will generate a chunk. So you have
> >single-byte chunks(!) BUFF is still present, so it is aggregating
> >network packets. But each ap_r*() function is generating a separate
> >chunk.
> >
> >> Still, preventing this would be a good thing. Maybe the buffering
> >> filter should be inserted before chunking? 
> >
> >When we get it... yes, it probably makes sense to place it before the
> >chunking.
> 
> I quite like that idea, because otherwise the same buffering logic
> would be duplicated in the chunking filter and the core filter. OTOH
> that logic is relatively simple...

One issue with such a buffering filter is that buffering is
connection-oriented but chunking is request-oriented.

Buffering is connection-oriented in that (for pipelined responses) we
want the ability to send output for multiple responses in one network
write.  (Of course, we'd flush any final output from one request if
the next request has not yet arrived.)

Chunking is request-oriented in that a chunk can't contain content
from more than one request.

When buffering is above chunking, some special bucket (sort of like
EOS but not quite the same) would be required to tell the chunk filter
where the output of one request ends and where the output of the next
request begins.

Hmmm... Thus far we are talking about five filters to replace buff:

  content character set translation filter
  buffering filter
  chunking filter
  core filter
  implementation character set filter

What is the added capability from replacing buff?  Being able to drop
in alternative transport encodings?
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message