tags:

views:

1125

answers:

7

What is a dataflow programming language? Why use it? and are there any benefits to it?

+5  A: 

Excel (and other spreadsheets) are essentially dataflow languages. Dataflow languages are a lot like functional programming languages, except that the values at the leaves of the whole program graph are not values at all, but variables (or value streams), so that when they change, the changes ripple and flow up the graph.

Barry Kelly
I don't agree; constraint-solvers generally work by discovering optima within search spaces by propagating constraints. Spreadsheets propagate values, not constraints.
Barry Kelly
Solve is a supplementary feature most people don't use. And trees are graphs too; moreover, if any two cells refer to the same third cell, they form a dag and are no longer a tree.
Barry Kelly
"Spreadsheets propagate values, not constraints." Yes, the flow of values is what makes it "dataflow".
Dan
+3  A: 

Dataflow programming languages are ones that focus on the state of the program and cause operations to occur according to any change in the state. Dataflow programming languages are inherently parallel, because the operations rely on inputs that when met will cause the operation to execute. This means unlike a normal program where one operation is followed by the next operation, in a dataflow program operations will execute as long as the inputs are met and thus there is no set order.

Often dataflow programming languages use a large hashtable where the keys are the data of the program and the values of the table are pointers to the operations of the program. This makes multicore programs easier to create in a dataflow programming language, since each core would only need the hashtable to work.

A common example of a dataflow programming language is a spread sheet program which has columns of data that are affected by other columns of data. Should the data in one column change, other data in the other columns will probably change with it. Although the spread sheet program is the most common example of a dataflow programming language, most of them tend to be graphical languages.

Anton
+1  A: 

Mozart has support for dataflow-like synchronization, and it does have some commercial applications. You could also argue that make is a dataflow programming language

JesperE
+3  A: 

Some examples of dataflow languages:

  • LabVIEW
  • SCADE/Lustre, used in defence, aerospace and power plant industries
  • VHDL and Verilog are essentially dataflow
  • Spreadsheets are essentially dataflow
  • Pure Data, dataflow for audio processing
  • Max/MSP

Some lesser known ones:

Dan
+3  A: 

One kind of dataflow programming is reactive programming. When this style of programming is used in a functional language, it's called functional reactive programming. An example of a functional reactive programming language for the web is Flapjax.

Also, anic is a dataflow language recently discussed on Hacker News.

Another example is Martlet from Oxford.

Jeff Hammerbacher
+1  A: 

Many ETL tools are also in this realm. The dataflow tasks in MS SSIS are a good example. Graphical tool in this case.

Teun D
+1  A: 

It is actually quite an old concept - in the 70's, there was even a language + machine built for efficient dataflow programming and execution (-> manchester data flow machine).

The great thing about it is its duality to lazy functional languages like Haskell. Therefore, if your processing steps are pure functional, and given you have enough processing units to evaluate them and pass results around, you get maximum parallelity for free - automatically and without any programming effort!

blabla999