Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's 2021 and we still don't have scalable computer systems with continuations support - that's why his cronjob does not work reliably in the first manner if that script crashed or the machine reboots, it will run again.

The idempotence is nice and I use it as much as possible, but, his case is very simplistic. Imagine you have a complex data migration process, which crashes in the middle - how you safely continue from where you crashed or safely roll back?



SOmetimes you can write the migrations as a set of idempotent operations:

"If table doesn't have column X, add it. If row Y doesn't exist in table Z, add it." etc.


Well, I did not mean a sequential one and only involving the database, but, let's say, you have forks (i.e. parallel executions) and merges (waiting to sme dependent tasks to complete), etc. What if execution halts in the middle of a step and you don't really have transaction support outside of the DB? I typically would use a workflow engine, but rollback is not something workflow engines support either.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: