httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Apache 2.0 API
Date Tue, 16 Jan 2001 18:43:30 GMT
Some ramblings. Hopefully will generate some more discussion.... Dean, your
recent posts regarding the Apache 2.0 API have reintroduced some topics of
earlier discussions on the list.  I personally am not too keen on the bucket
API being the only API available to module writers, it is far too complicated
for most module writers and I think we are seeing more and more that it is
difficult to implement the API efficiently.  I'd prefer to maintain the ap_r*
style API as an efficient option.  So far, we have investigated 3 different
'solutions' to the mod_include problem introduced by getting rid of BUFF:

1. coalesce filter - coalesce multiple small buckets into a single large
bucket before the brigade was passed to the chunking filter.  It is a generic
way of handling ap_r* generated content within the context of buckets. As you
mentiond, the coalesce filter results in 2 additional data moves.

2. Introduce BUFF like code to the ap_r* API. Victor has posted a patch that
does this. As Greg has pointed out, you better not mix ap_r* calls with bucket
API calls (and I would add unless you know EXACTLY what you are doing).

3. Rewrite mod_include to exclusively use the bucket API.  The rewrite was
done by Paul Reder and is elegant in a bucketish kind of way :-)

I think you have hinted at another solution (a variation of 2) above):  Extend
the bucket API to allow a bucket to be allocated (out of a pool) with a 4K
byte buffer:  Enable to ap_r* APIs to incrementally append to this buffer,
triggering a flush when the bucket is full. Today we do not have the
capability to incrementally add bytes to a bucket.

You mentioned putting i/o buffering into APR; how can that be done (and
exploited by Apache) and still keep Apache's bucket API?

I am against going for a beta until the API is fixed (yes, I have changed my
mind). We can make alpha binaries available if we are looking for feedback.

Bill


Mime
View raw message