galatea-associates / fuse-starter-java

Starter project for Galatea java projects
17 stars 73 forks source link

Provide a template parallel task executor - documentation update #74

Open paulo-reichert opened 7 years ago

paulo-reichert commented 7 years ago

For work that needs to be forked out for parallel processing it is useful to have a framework similar to Actors in Scala or Task in C#/.NET. It would be useful if FUSE provided a similar construct for Java, based on Quasar (http://docs.paralleluniverse.co/quasar/), AKKA (http://akka.io/) or something similar.

GalateaRaj commented 6 years ago

3 use cases:

  1. Queue listener or web service -- let spring handle that for you

  2. Handle batches of requests in parallel to the same "service" or "database" -- java 8 streams. Issue to be raised by @GalateaRaj

  3. Perform N distinct operations that need to happen in parallel e.g. call 3 different enrichment services that should happen in parallel so that you can update your object with reference data -- we recommend at @Async. If you need to do something more sophisticated, take to your lead. Look at issue #35 for an example of how to use @Async.

Limitations of just using @Async -- keyed execution -- reducing concurrency issues by detecting/preventing access to shared resources

GalateaRaj commented 6 years ago

Need to put this into the google doc on slack.

mikegajda commented 4 years ago

Work is to put this knowledge into the README