upvote
> If the actor was in the process of writing a file, what is left of the bytes on disk? Does another or the same actor get restarted to complete the write without introducing corruption?

It wasn't spelled out, but my reading is that an actor is never "in the process of writing a file" because that would be a blocking operation. It probably has to start with a message which requires data to be written and then copies data into a buffer and generates a message to the kernel that the buffer needs flushed along with a message to its future self about what to write next, then exits. If it wrote everything it needed into the available buffer, it would emit a different message saying the file needs closed. AFAIK it all boils down to the same coding style as Node.js where every blocking file operation becomes an async re-entry point.

reply
Hmm. Then the GP’s question ends up being about transactions (interrelated series of messages sent by an actor). What happens if an actor is killed by timeout in the midst of sending and waiting for responses from a bunch of “append bytes to file” messages?
reply
Waldo et al. (1994)

Distributed system equals partial failure and concurrent execution.

The partial failure part is where most naive map-reduce approaches get stuck. This is also where exception handling gets stuck.

reply
This is cooperative multi-tasking all over again. I don't think it's for a real, widely used OS.

Not only would the file get cut off, but tasks will run faster on one machine than on another, meaning that your program may run fine on your computer, but what it'll do on another is anybody's guess.

It also uses one thread on one processor, so it basically throws a lot of performance out of the window. Perhaps it works on embedded, although the idea of a time limit on every message seems rather harsh.

reply
It's explicitly cooperative outside of the Linux VM that it runs. It's deployed to exactly one computer sitting on the desk next to me. So no, not widely used.

> It also uses one thread on one processor

Zero threads, and 6 processors.

reply