[dataflow][iostreams]Can someone Compare/Contrast

If it has already been done I appologize. They seem very similar to me. Is it just a matter of style? It seems like dataflow lends itself better to dealing with blocks/frames of data than the iostreams library. I would appreciate any clarification though.

On Mon, Nov 24, 2008 at 11:09 PM, Duane McKinney
If it has already been done I appologize. They seem very similar to me. Is it just a matter of style? It seems like dataflow lends itself better to dealing with blocks/frames of data than the iostreams library. I would appreciate any clarification though.
I've looked at the iostreams documentation several times but never actually used it - so my understanding here might be incomplete or inaccurate: Iostreams is limited to processing components that operate on a single type (char_type), and either produce, consume, or filter that type. Dataflow allows you to construct components that can have many inputs / outputs and of different types. Iostreams is also more geared to stream processing - where you can specify how many elements you want to insert / extract. Dataflow doesn't have a framework ATM that facilitates that. In Dataflow, you can connect components through any pair of Connectable ports. With iostreams, you make 'connections' by attaching Filters to a Device. This allows you to construct chain-like processing topologies, as well as branching using the tee functionality. Iostreams expects you to pull data from a source, and push it into a sink. With Dataflow, it depends on the framework used (you can have sources/producers that push data out, and sinks/consumers that pull it). Boost.Iostreams is a seemingly stable/mature boost library, and Dataflow is very much experimental. HTH, Stjepan

Duane McKinney wrote:
If it has already been done I appologize. They seem very similar to me. Is it just a matter of style? It seems like dataflow lends itself better to dealing with blocks/frames of data than the iostreams library. I would appreciate any clarification though. I believe I may have answered my own question, correct me if I am wrong. It seems to me that the main difference between boost::iostreams and boost::dataflow is the unit of work on which they operate.
boost::iostreams performs processing on a continuous stream of information boost::dataflow performs its processing in function blocks, where the output of one function is passed to the input of the next.
participants (2)
-
Duane McKinney
-
Stjepan Rajko