Directed Graph Processing in Java

前端 未结 4 1499
长发绾君心
长发绾君心 2020-12-17 21:49

I am looking to implement a Java application that will compute a set of tasks to execute. The tasks will have dependencies on each other, forming a directed graph. Is ther

4条回答
  •  执念已碎
    2020-12-17 22:46

    I have created a Java library that does exactly what you are requesting. You can construct a directed graph consisting of Runnable objects and their dependencies. You then pass this graph to an executor that runs the objects as their dependencies are fulfilled, in an executor.

    Download the library's jar file here: https://github.com/idooley/DAGExecutor/downloads

    Or clone the whole repository and compile it yourself: https://github.com/idooley/DAGExecutor

    Hopefully this will be of use to others. Feel free to contribute any patches, new unit tests, or other changes to make it work the way you want for your projects.

提交回复
热议问题