On 10 Sep 2014, at 18:19, Jim Jagielski <j...@jagunet.com> wrote: > On Sep 10, 2014, at 12:07 PM, Graham Leggett <minf...@sharp.fm> wrote: >> >> Having thought long and hard about this, giving filters an opportunity to >> write has nothing to do with either data or metadata, we just want to give >> the filter an opportunity to write. “Dear filter, please wake up and if >> you’ve setaside data please write it, otherwise do nothing, thanks”. Empty >> brigade means “do nothing new”. > > "Hey filter, here is an empty brigade, meaning I have no data for you; if you > have setaside data, now is the time to push it thru."
If someone is new to writing filters, I think that's a bit of a gotcha. An empty brigade meaning “do nothing new” is easy to code for and unsurprising. I'm thinking about how I'd help httpd cope with a filter that didn't know about this special behaviour. I would introduce a new bucket: NUDGE, and use that to wake up filters. If a filter doesn't understand NUDGE, this could cause a hang from the client's point of view. To avoid this, I'd have a configurable timeout after which a NUDGE-d filter would get a FLUSH bucket - say 30 seconds as a default, nice and high because FLUSH is an expensive operation. Server admins could drop this if they know that they have a problematic filter. If a filter gets a NUDGE and returns APR_SUCCESS I think it makes sense to NUDGE the next downstream filter. A new metadata bucket has all sorts of compatibility issues that need thinking about (and I don't know enough about). Changing the meaning of “empty brigade” also has compatibility issues but they will show up much later than build time. -- Tim Bannister – is...@jellybaby.net