carnival-data / carnival

JVM property graph data unification framework
https://carnival-data.github.io/carnival/
GNU General Public License v3.0
7 stars 2 forks source link

Migrate from GPars to Java concurrency #21

Closed augustearth closed 4 years ago

augustearth commented 4 years ago

GPars is no longer being maintained and has some very old dependencies. Java concurrency has come a long way. Our uses of GPars could be migrated to core Java (fairly) easily.

augustearth commented 4 years ago
augustearth commented 4 years ago

Carnival Core

Vine.groovy

Used in a single method callAsync, which does not appear to be used anywhere else in the code.

TimeEstimator

Uses task to start a monitor thread. The monitor thread uses DataflowReadChannel to poll for updates.

QueryProcess

Uses task to start a monitor thread. Uses DataflowBroadcast and DataflowReadChannel to do a pub/sub thing.

augustearth commented 4 years ago

Proposed Approach

Since Vine.groovy callAsync is not used anywhere, we can just remove this code. The Vine code will be heavily re-worked anyway. TimeEstimator, QueryProcess, and StatusUpdate are all sequestered in carnival.core.graph.query. They are neat, but will probably have to be significantly re-written as there are no analogs to DataflowReadChannel and DataflowBroadcast in Java. We can break this code out into another project carnival-async that builds upon carnival core and contains the gpars dependency, which can be removed from carnival-core. The code will be pegged at the current version of carnival and will not work with v2.

augustearth commented 4 years ago

Tasks

augustearth commented 4 years ago

We ended up pulling GPars out of Carnival altogether now residing in https://github.com/pmbb-ibi/carnival-async. If we want to re-implement concurrency in Carnival, it will be a re-design and re-write. Will open a new issue if/when that happens.