Dataflow programming in Java

bearophile bearophileHUGS at
Mon Nov 22 18:47:44 PST 2010

I have just found some slides that show DataRush, a library that allows to use in Java another programming paradigm (dataflow programming):

The dataflow code for the Java DataRush library doesn't look too much bad, and there is even a GUI to draw it:

ApplicationGraph app = GraphFactory.newApplicationGraph();
ReadDelimitedTextProperties rdprops = ...
RecordFlow leftFlow = app.add(new ReadDelimitedText("UnitPriceSorted.txt", rdprops), "readLeft").getOutput();
RecordFlow rightFlow = app.add(new ReadDelimitedText("UnitSalesSorted.txt", rdprops), "readRight").getOutput();
String[] keyNames = { "PRODUCT_ID", "CHANNEL_NAME" };
RecordFlow joinedFlow = app.add(new JoinSortedRows(leftFlow, rightFlow, FULL_OUTER, keyNames)).getOutput();
app.add(new WriteDelimitedText(joinedFlow, “output.txt", WriteMode.OVERWRITE), "write");;

A similar library that allows similar code is probably possible in D2 too.


More information about the Digitalmars-d-learn mailing list