Lists Home |
Date Index |
Rich Salz wrote:
> > why not to buffer events and run them through different processing pipelines?
> > it should be easy to do with pullparser that buffers events and has replay
> > function.
> Sure, it CAN be done, I just think the result ends up being ugly and
> fragile, if only because each event-getter has to cooperate in making
> sure that "the next guy" gets his chance.
> If you have multiple readers interested in an event, it's easier for the
> reader to push it out, or have a central dispatch push it out, to all
> the readers. Typical pub/sub stuff.
i think i am missing something ...
you can easily create multiple event input sources
based on one common input (essentially doing UNIX tee)
there can be multiple consumers each using its own teeed
input source (each source could implement pull parser interface
and for consumer it would look like working with the input directly)
actually it seems that having each reader to pull events
from the source is much easier to program than maintaining
state between push callbacks.
i wonder what is the example scenario you were thinking about?