On Wed, Aug 28, 2002 at 12:06:19PM -0700, Aaron Bannert wrote:
> On Wed, Aug 28, 2002 at 11:45:39AM -0000, [EMAIL PROTECTED] wrote:
> > gstein      2002/08/28 04:45:39
> > 
> >   Added:       docs     notes-filter-chains.txt
> >   Log:
> >   A transcript of a conversation that Justin and I just had on IRC. This
> >   still needs to be massaged down to its key points.
> 
> It's going to take awhile to catch up on all this, but one quick comment:
> 
> Filters should not think in terms of bytes.
> 
> The app should not request any thing in terms of "bytes" it should request
> a type of data. "Give me body data" or "Give me abstract things until
> one of them can be identifed as a body data thingy" or something along
> those lines. This rids us of the need to deal with "spillover" or
> any other buffering problems at the filter level, so we only have to
> think about it in terms of specifical data types.

Agreed.

However, it may be important to note that your "give me FOO" is based on the
"pull" model. IMO, we should encourage more "push" model development. The
latter is usually much more efficient.

One comment about the "give me FOO". How does a caller specify FOO, and how
does it know that the filter stack can respond appropriately? Is it possible
for a stack to return "I don't know what FOO" means? This would be quite
possible, because I have got to imagine that FOO needs to be dynamic -- that
we cannot possibly specify all types of FOO-ness in the serf library.

Is passing a request for FOO to the next filter the right behavior, if you
don't understand it? But that doesn't seem to make much sense. If NEXT
returns a FOO, then SELF needs to apply its filter operation before
returning it to the caller. At that point, it would be FOO'. Is that still
valid for the caller? I would think not. The caller wanted FOO. You may have
altered FOO in appropriate ways.

Thus, I think if a filter F doesn't not understand a type-request of FOO,
then it must bail. Of course, this now means that the app needs to have some
kind of fallback request types. Where does it end? Is there a minimum set of
types that a filter must be able to respond to?

Aaron: your idea, you get to solve it :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Reply via email to