resonatehq / resonate

a dead simple programming model for the cloud
https://www.resonatehq.io
Apache License 2.0
360 stars 28 forks source link

Callbacks and Tasks #384

Closed dfarr closed 2 weeks ago

dfarr commented 1 month ago

Callbacks:

Tasks:

Callbacks are registered on promises are converted to tasks when the promise is completed.

Tasks supervise an external process to ensure progress by implementing the following (simplified) state machine.

Init -> Enqueued -> Claimed -> Completed

At any point in time if progress cannot be verified the task will revert to the Init state and the process restarts until either the task is complete or the task times out.