Related piece I wrote some time ago: https://www.morling.dev/blog/building-durable-execution-engi...