Re: estimated Content-Length with chunked encoding

On Mon, 20 Oct 2008, William A. Rowe, Jr. wrote:

>
> Jamie Lokier wrote:

> > In some circumstances you may be able to refine the estimate as the
> > message is being transmitted.
> >
> > Chunk extensions ("chunk-extension") would suit that:
> >
> >     1000;estimated-remaining=299000
> >     (1000 bytes)
> >     1000;estimated-remaining=298000
> >     (1000 bytes)
> >
> > I don't know if chunk extensions break in the real world, though.
>
> Or, permit
>
>      1000;completed=25%
>      (1000 bytes)
>      1000;completed=25%
>      (1000 bytes)

Either % completed or estimated remaining requires computing an estimate
of the total data to be transfered. I don't see a difference in the impact
of either choice on a server. I think there are many cases where a
generated result can be estimated to a 95%+ accuracy, but not to the exact
size needed for content-length. There is no incentive to do it today, but
if it could be utilized to improve the user's experience, many web
application developers would be happy to do so. In addition, a jsp/php/asp
engine could even watch the actual size generated for each request and
recognize some pages with a small standard deviation in generated size.
Use that value automatically.

I'd rather see raw sizes from a recipient's perspective as I might
be able manage resources better. A percentage is only useful for end
user presentation without interpolating from the amount of data already
received. Raw numbers make computation of a percentage trivial while more
easily supporting other use cases.

David Morris

Received on Tuesday, 21 October 2008 01:12:08 UTC