"Pull" APIs sometimes make the consumer's life considerably easier at the cost of sometimes making the producer's life considerably more difficult. It's easier to report good performance numbers in your component when you're in control of the processing loop. As a result, every step in the processing chain really wants a pull API on its input side and a push API on its output side...
(I'm not a great fan of event-driven systems for stream processing -- though they have value in truly asynchronous systems like user interfaces. Users really want to think of parsers as "high-level tokenizers", so pull makes a certain amount sense if it can be done efficiently. But I also think the distinction between the two models has been oversold.)
______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Sandy Tyra, in r.m.filk
