|
Boost Users : |
Subject: Re: [Boost-users] [dataflow][iostreams]Can someone Compare/Contrast
From: Stjepan Rajko (stjepan.rajko_at_[hidden])
Date: 2008-11-25 12:34:07
On Mon, Nov 24, 2008 at 11:09 PM, Duane McKinney
<duane.mckinney_at_[hidden]> 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'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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net