httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <...@dotat.at>
Subject Re: PLEASE READ: Filter I/O
Date Mon, 26 Jun 2000 00:46:17 GMT
Greg Stein <gstein@lyra.org> wrote:
>Tony Finch wrote:
>
>In the hook scheme, there are two options to the large database content
>issue:
>
>1) suck the whole thing into memory and return an ioblock pointing to it
>2) suck in a portion, return it in an ioblock, and return "call me again
>   because I have more to give you."
>
>I have labeled (2) as an "asynchronous style of programming."

I prefer to call it event-driven. "Async" seems to have too many
different meanings. This style is the main point of the hooked filters.

>The hook-based scheme would need filters to return portions of their overall
>response. As these portions are dropped to the network, they can block
>continued processing. The "return portions" implies that filters need to be
>programming in an async-style to deal with the "return a bit; call me again
>for more" mechanism.

I think this is also true for linked filters: if a filter is passed a
block of data that's unparsable because a syntactic element is missing
its end (presumably because it'll be passed down in the next chunk)
then it'll have to hold it back for next time. You end up with exactly
the same problems that the hook scheme is designed to address from the
start. The link scheme will have to aggregate blocks of data in order
to fix this problem which implies copying.

But I should review Roy's suggestion because I wasn't paying so much
attention before...

Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
390 more porridge for the engorged

Mime
View raw message