BinChengZhao / delay-timer

Time-manager of delayed tasks. Like crontab, but synchronous asynchronous tasks are possible scheduling, and dynamic add/cancel/remove is supported.
Apache License 2.0
315 stars 24 forks source link

are there plans to support distributed scheduling? #7

Closed eliasyaoyc closed 2 years ago

BinChengZhao commented 3 years ago

No description provided.

Yes, while this lib is basically stable (probably v0.3.5), I will start developing a distributed scheduling system.

Containing a web admin panel, with multiple nodes distributed across the machines.

eliasyaoyc commented 3 years ago

sounds good, what can i do that help you reach stablity quickly ?

BinChengZhao commented 3 years ago

sounds good, what can i do that help you reach stablity quickly ?

4 Thank you very much, I don't know how well you have mastered the asynchrony of rust, whether it is possible to encapsulate a state machine in order to make it easier for the user to dynamically cancel the running instances generated by the task through a handle, and expose the events that occur inside the specified task.

If you have some experience in this area, I can work with you to accomplish this. :)

https://github.com/BinChengZhao/delay-timer/issues/4#issuecomment-767381469

eliasyaoyc commented 3 years ago

trytry

BinChengZhao commented 3 years ago

trytry

// Here is an expected implementation for DelayTimer::add_task , which is not yet determined.
**Do you have a better opinion?**

///```
// let delay_timer = DelayTimer::default();
//
// let join_handle = delay_timer.add_task(_).unwrap();
//
// let peek : Option<Peek<&Instance>> = join_handle.peek().await;
// let peek : Result<Option<Peek<&Instance>>> join_handle.try_peek();
//
// let instance : Option<Intance> =  join_handle.next().await.unwrap();
// let instance : Result<Option<Intance>> =  join_handle.try_next().unwrap();
//
// instance.cancel();
//
///```
eliasyaoyc commented 3 years ago

i spent some time on the delay_timer these days,now i hava general idea of it.
i think you gave me a good plan.

eliasyaoyc commented 3 years ago

haha,holidy is coming soon do it

BinChengZhao commented 3 years ago

i spent some time on the delay_timer these days,now i hava general idea of it. i think you gave me a good plan.

Thank you, we can work together in one piece, so the energy will be great.

BinChengZhao commented 3 years ago

delicate Distributed scheduling platform, the first release has been stabilized, V1.1.0 will be released soon. :)