link-move icon indicating copy to clipboard operation
link-move copied to clipboard

Parallel task execution support

Open andrus opened this issue 9 years ago • 2 comments

In many cases that I've seen multiple interdependent LmTasks are run sequentially, wrapped in a single job. Users can parallelize these sequences via Java 8 CompletableFuture , still it takes a bit of skill and a bit of code to connect those things together.

Perhaps we can provide an API for users to build a task dependency graph , and let LM figure out parallel/sequential execution flow based on the dependency model. Or should we go full AI and check the extractor target semantics?

andrus avatar Jun 02 '16 12:06 andrus

One caveat is that LmTask is not a functional interface, so we'll need to figure out how to deal with passing parameters and sync tokens between the stages.

andrus avatar Jun 02 '16 12:06 andrus

After further analysis, the low hanging fruit here is executing batches of the same task in parallel. Batches are presumably independent from each other.

andrus avatar Jul 01 '16 16:07 andrus