[concurrency-interest] Fork/Join Use cases

Richard Warburton richard.warburton at gmail.com
Thu Dec 11 21:16:21 EST 2014


Something I have noticed with fork/join is the absence of clear-cut and
common motivating examples and use cases. Many times people provide
examples of fork/join code that only solves a simple problem. For example
calculates Fibonacci numbers or performs a merge sort. This is great for
the educational purpose of understanding the API but isn't so convincing of
the efficacy of fork/join as a general parallel programming framework.

What I would like to see is an example of a more complex use of fork join.
For example something like training a neural network. Now its that I can't
see how such a problem don't fit into the fork/join model - but the
question is why one would conclude it to be such a general model as to
warrant inclusion into Java SE. Other than problems whose algorithms
naturally follow a recursive structure (eg fibonacci) everytime I try to
fit a parallel programming problem into the fork/join model in my head it
doesn't seem to offer me much over the ability to run a series of parallel

I'm ruling out the simpler problems alone because implementing such tasks
in parallel is often not difficult enough to warrant a framework or of
particular use. I'm not looking for:

a. Other parallel programming frameworks which depend upon fork/join (eg:
parallel streams). I'm asking for actual direct application level usage of

b. Other models - I'm just asking about fork/join.

c. Fitting problems into fork/join which can be made to work but either
have as code that's as complex as using threads or have poor performance.
The ideal example would have also some kind of open source code with
comparisons in other approaches, but I appreciate I'm asking for a lot here
when trying to satisfy my own understanding.


  Richard Warburton

  @RichardWarburto <http://twitter.com/richardwarburto>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20141211/aae6b5b9/attachment.html>

More information about the Concurrency-interest mailing list