Repeated timers/Intervals
Our internal timers abstraction right now can only schedule timers, but not deschedule them, nor it supports intervals. By adding support for intervals we could:
- Expose a cron scheduling functionality to the user, e.g. something like a built in service
Cron#Create(service_to_invoke, interval) - Simplify implementing internal functionalities like the inactivity timeout in the
RemoteContext: https://github.com/restatedev/restate/pull/840
I'm a temporal user since long time ago. Restate seems interesting, Cron & Continue-as-new is critical for real cases.
Thanks a lot for the feedback @Code2Life. Improving the scheduling primitives that Restate exposes is very important to improve the ergonomics and make use cases simpler to implement.
Regarding continue-as-new, Restate supports it natively since a virtual object is stateful and every invocation of a handler starts a new journal (event history). So by calling yourself, you would finish the current event history and start a new one but keep the state of the virtual object to propagate context if needed.