[concurrency-interest] Fork/Join Use cases

Kirk Pepperdine kirk at kodewerk.com
Fri Dec 12 02:16:19 EST 2014

Hi Richard,

Good questions and one that I’ve not been able to answer myself.

Another question.. Spliterator on Streams.  I can see use cases which implies it’s a nice abstraction over Fork-Join. However, that you need a terminating condition to trigger the action certainly makes them far less useful than I initially hoped for. React seems far more useful but the API in RxJava seem unfortunately like something that only the elite could every possibly understand!


On Dec 12, 2014, at 3:16 AM, Richard Warburton <richard.warburton at gmail.com> wrote:

> Hi,
> 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 threads.
> 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 fork/join.
> 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.
> regards,
>   Richard Warburton
>   http://insightfullogic.com
>   @RichardWarburto
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20141212/e099b12f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20141212/e099b12f/attachment.bin>

More information about the Concurrency-interest mailing list