thepipelinetool organizes your Rust functions into a Directed Acyclic Graph (DAG) structure, ensuring orderly execution according to their dependencies. The DAG is compiled into a CLI executable, which can then be used to list tasks/edges, run individual functions, and execute locally. Finally, deploy to thepipelinetool_server to enjoy scheduling, catchup, retries, and live task monitoring with a modern web UI.
Features
- Easy Usage - Simply write normal rust code and let
thepipelinetoolhandle execution order, concurrent execution, timeouts, and retries - Special Tasks - Create multiple Dynamic tasks from upstream results or a control flow using Branching tasks
- Safety and Reliability - Rust's compile-time checks ensure code safety and prevent common bugs
Contents
Installation
Get started by cloning the template project
Or create a new project and add thepipelinetool dependency
Add the following to src/main
use *;
Run the complete DAG in memory:
Usage
cargo run --release your_dag_name <COMMAND>
Commands:
describe Describes the DAG
options Displays options as JSON
tasks Displays tasks as JSON
edges Displays edges as JSON
hash Displays hash as JSON
graph Displays graph
tree Displays tree
run Run complete DAG or function by name
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Documentation
- Find the latest docs here
Examples
Simple DAG
use *;
flowchart TD
id0(produce_data_0)
style id0 color:black,stroke:grey,fill:white,stroke-width:4px
id1(print_data_1)
style id1 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id1
Manually Defining Depencencies
use *;
flowchart TD
id0(produce_data_0)
style id0 color:black,stroke:grey,fill:white,stroke-width:4px
id1(print_data_1)
style id1 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id1
id2(print_data_2)
style id2 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id2
id3(print_data_3)
style id3 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id3
id4-->id3
id4(print_data_4)
style id4 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id4
id5(print_data_5)
style id5 color:black,stroke:grey,fill:white,stroke-width:4px
id8-->id5
id7-->id5
id0-->id5
id6-->id5
id6(print_data_6)
style id6 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id6
id7(print_data_7)
style id7 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id7
id8(print_data_8)
style id8 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id8
id9(print_data_9)
style id9 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id9
id10(print_data_10)
style id10 color:black,stroke:grey,fill:white,stroke-width:4px
id9-->id10
id0-->id10
id11(print_data_11)
style id11 color:black,stroke:grey,fill:white,stroke-width:4px
id10-->id11
id0-->id11
Branching Tasks
use *;
flowchart TD
id0(branch_task_0)
style id0 color:black,stroke:grey,fill:white,stroke-width:4px
id1(left_1)
style id1 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id1
id2(right_2)
style id2 color:black,stroke:grey,fill:white,stroke-width:4px
id0-->id2
Dynamic Tasks
use *;
More Examples
Find more examples here
Deployment
To deploy DAGs, the compiled binaries must be placed inside DAGS_DIR for both the server and workers to access.
Visit the template project for the docker-compose.yml example
License
AGPLv3