2 releases
0.1.1 | Nov 22, 2022 |
---|---|
0.1.0 | Nov 18, 2022 |
#1342 in Rust patterns
72KB
2K
SLoC
What is bronze?
A workflow scheduler in rust
Get Started
TODO
Examples
- Create workflow by macro
dag
and submit to scheduler with cron expression
use bronzeflow::prelude::*;
fn main() {
// Create a session to submit task/workflow to scheduler
let mut s = SessionBuilder::default().build().unwrap();
// Create a workflow
let wf = dag!(
"A" => || println!("Task A") => dag!(
"A1" => || println!("Task A1"),
"A2" => || println!("Task A2"),
"C1" => dag!(
"C1" => || println!("Task C1") => dag!(
"C11" => || println!("Task C11")
)
)
)
)
.build()
.unwrap();
// Print the dependencies tree
wf.print_tree();
// Submit workflow to scheduler
s.submit("1/2 * * * * *", wf).unwrap();
// Sleep 5 seconds
std::thread::sleep(std::time::Duration::from_secs(5));
}
Development
Build from source
TODO
Todo list
Core features
- Add executor plugin system for dag and task.
- Support async function and routine.
- Use github CI/CD
- Save and load task from dynamic link libraries(ffi)
- Optimization task design for better expansion
- Multi-language support.
- Add time trigger with native event loop(epoll, kqueue, etc.).
- Add not thread safe version for high performance.
- Add "exactly once" execute semantics.
- Add uniform common storage support which will used by other storage plugin, like database, zk etc.
- Add database storage.
Dependencies
~7–14MB
~166K SLoC