вторник, 8 октября 2013 г.

Is concurrent programming really hard? Not always. Instead of trying to parallelize  inherently sequential program, isolate subtasks and think: what input data each subtask require? You'll end up with a picture like these: Dataflow diagram.

Then, program each node as a procedure which takes input parameters from input arcs and send results to output arcs, to be delivered to other procedures' parameters.

To glue all together, use dataflow for java framework. If your picture happened to be a linear pipeline, consider using Pipeline extention.