Warning

Dataflow is not a part of the Boost libraries. It was developed as a part of the Google Summer of Code program. The original proposal (for the Signal Network library, which became the Dataflow library) as well as some GSoC status updates can be found on the GSoC page.

Description

Dataflow is a generic library for dataflow programming. Dataflow programs can typically be expressed as a graph in which vertices represent components that process data, and edges represent the flow of data between the components. As such, dataflow programs can be easily reconfigured by changing the components and/or the connections.

Library Layers

The Dataflow library currently offers three layers:

  • A layer providing generic dataflow support centered around concepts, adaptable to various dataflow frameworks and data transport mechanisms.
  • The Dataflow.Signals layer, with a number of implemented components using Boost.Signals as a data transport mechanism.
  • The Dataflow.Blueprint layer, built on top of the generic layer and providing runtime reflection and network modeling using the Boost Graph Library.

The relationship of these layers is shown in the following diagram:

layers

As indicated by the diagram, classes provided by Dataflow.Signals model the concepts from the generic dataflow layer. Dataflow.Blueprint class templates require these concepts, hence they can be used with Dataflow.Signals. The idea behind providing a generic dataflow library is that other data transport mechanisms and dataflow frameworks can be easily adapted for use with the library (through modeling the appropriate concepts), and benefit from any layers built on top of the generic layer (through requiring the appropriate concepts).

Generic dataflow layer

The generic dataflow layer provides concepts which are applicable to different dataflow frameworks, and can be used to develop generic dataflow code. Currently, the concepts adress things such as Components and Ports, as well as the connection and data extraction functionality (the rationale section discusses why this is the initial focus).

Dataflow frameworks can be made to model the concepts of the generic dataflow layer by developing a Dataflow support layer for the framework. This allows anything that is built on top of the generic layer (e.g., Dataflow.Blueprint, a GUI dataflow editor, and operators which can be used to connect components in a clean, readable manner) to be used with the framework. See the future directions section for an idea of about other things in planning. See Dataflow.Signals for an example of a (very thin) support layer which makes boost::signal and boost::function model the Dataflow concepts. There is also a example showing how to do the same for VTK. Support layers for other dataflow frameworks will be added in the future.

Dataflow.Signals layer

The Dataflow.Signals layer provides Dataflow support and components which use Boost.Signals as a mechanism to transfer data between the components.

Dataflow.Blueprint layer

Dataflow.Blueprint provides run-time reflection and modeling of dataflow networks in a Boost Graph Library graph for any dataflow framework with implemented Dataflow library support.

What the Dataflow library doesn't offer (yet)

Since the development of the Dataflow library started with a dataflow framework built on top of Boost.Signals, its features are heavily biased towards the characteristics of Boost.Signals - connectability is detirmined at compile time, and evaluation of a dataflow network is driven entirely by the components. Ideally, the Dataflow library should at some point offer a native dataflow framework of a different kind - one that allows runtime specification of port/component characteristics, offers memory management for the data being exchanged between the components, as well as flexible scheduling and optimized evaluation. At this point, some work in this direction is being done in implementing a framework that keeps track of the entire network of components and takes care of component invocation scheduling. The framework is called Dataflow.Managed, but is currently completely undocumented.

Where to go from here