Like the article says, we would record a log of all the interactions with the outside world. The lower level parts of the system had the capability of transferring an in-progress call from one server to another. SIP and RTP traffic would be moved to another server, and finally the workflow log was sent. The server that took over the call would then replay the script and arrive at the same execution state that the first server had before the call was moved. Workflow authors didn't have to care about any of this. To them it looked like the call started and ended on the same server.
When "letting it crash" is not enough
11–20 of 84 posts
Re: When "letting it crash" is not enough
#12It's called checkpoint/restart, and was a feature of some early operating systems. Mostly for programs whose run time exceeded the mean time before failure of the system.
Tandem's whole system concept was built around that.
Amusingly, Second Life, of all things, has durable execution of the little LSL programs that make in-world objects go. They're checkpointed every minute or two, and if a region crashes, they are restarted, stack, heap, and all. They survive machine crashes and ports to new hardware. Even migration from a dedicated data center to AWS. Some have been running for well over a decade. Internally, they are Mono programs.
Re: When "letting it crash" is not enough
#13The entire point of crashing early is to reset the state of the program completely, hoping that the path that crashes it will not be taken too often. (and it only works well in the situations where crashing means negligible interruption of the service) By preserving the state between crashes, you diminish the pool of possible non-crashing states.
Re: When "letting it crash" is not enough
#14[0]: https://learn.microsoft.com/en-us/azure/azure-functions/dura...
Re: When "letting it crash" is not enough
#15I thought the idea of "exactly once" was a very questionable claim given what we know about computing, specially distributed. Then somewhere else you see this gem. > Workflows in flawless are written in Rust, in fact they are just regular Rust functions. This means that they can contain arbitrary logic. But instead of native code, the functions are compiled to WebAssembly and executed in a completely deterministic en…
Exactly Once is basically a solved problem. The CAP theorem says you can either get consistency or availability in a system that has network partitions. If you give up consistency, you end up corrupting data every once in a while. If you don’t, then you can have exactly once, but it might take a long time if there’s a network failure. NFSv3 solved this back in the 1980’s. (V2 and V1 may have, but I don’t know.) It di…
1. Exactly Once is absolutely not a solved problem. CAP says nothing about 'exactly once', it's about design choices for your data. But you can do all sorts of side-effectful things when it comes setting the data.
2. Giving up consistency does not mean you "corrupt your data every once in awhile". I don't know why you would say that. Choosing availability means you have to make decisions about how your data becomes consistent, but nothing about that means it is corrupted.
3. Choosing consistency says nothing about "exactly once". Consider this basic workflow backed by a consistent database: request comes into service, service sends email, services goes to store that email was sent in consistent database and crashes, user gets crash back, reruns request, email sent again. Oh so send the email AFTER it's stored in the database, well service crashes after saving in database, same problem.
Re: When "letting it crash" is not enough
#16Re: When "letting it crash" is not enough
#17Re: When "letting it crash" is not enough
#18The approach of check-pointing computation such that it is restartable sounds similar to a time-traveling debugger, like rr or WinDbg: https://rr-project.org/ https://learn.microsoft.com/windows-hardware/drivers/debugge... Some Googling found Checkpoint/Restore In Userspace, or CRIU. It’s like Flawless, but for Linux processes: https://criu.org/Main_Page I bet that Flawless can make better guarantees about reliabilit…
[0] https://www.linux-kvm.org/images/d/d0/02x06b-DeterministicRe...
Re: When "letting it crash" is not enough
#19Flawless sounds a lot like https://temporal.io/ . I'm wondering if it has the same scalability concerns - sticking everything in Postgres is fine at small-ish scale, but what happens when you outgrow Postgres, either because you have higher availability requirements (can't handle primary DB restarts) or because of the sheer volume of the workload?
https://temporal.io/blog/time-travel-debugging-production-co...
Anyways I wish all the best for flawless as this problem is worth solving/popularizing.
Re: When "letting it crash" is not enough
#20Some feedback: this paragraph lands like a Reddit post from a teenager, who just took a big drag off a joint, and thinks they've invented a new field of science. (And also hasn't completed it so isn't ready to share it yet!)
Of course, everything's already been thought of. What you've described so far as durable computing sounds indistinguishable from event sourcing.
The code snippet is intriguing, though. We're abstracting event sourcing away from the developer---it happens automatically for every non-purely-functional operation---so the programmer can just write normal code.
Though, you'd have a lot of events, and I'd wonder about performance and scalability for larger apps.
Also, assuming events are at the finest level of granularity, I also imagine this starts to look like the equivalent of some kind of intermittent heap dump.