3 ms·
> Another characteristic of Actors is that Actors can spawn other Actors. But it's entirely up to the actor if it wants to or not. I could imagine an actor su
by louthy 2y ago
> Another characteristic of Actors is that Actors can spawn other Actors.
But it's entirely up to the actor if it wants to or not. I could imagine an actor supervision-hierarchy with directory-actors that have child file-actors and other child directory-actors. The file-actors could just be leaves in the hierarchy.
Each write operation on a file would be guaranteed to be single threaded via the file-actor. But a file-actor could also launch ephemeral child-actors that do read-only processing on a snapshot of the file. So, parallel processing would be possible for read-only operations.
A file-system does fit quite elegantly into the actor model imho. Whether it would be efficient or not, who knows, but at least on the surface it fits.
- RossBencina 2y agoFor what it's worth, I have developed an actor-based async file i/o framework that does multiplexing, caching and format translation. Files are actors and pages (which serve fixed size blocks out of a particular file) are actors. The main motivation was to support caching and prioritised i/o. It doesn't target io_uring yet though.
- gigatexal 2y agoSounds interesting. When can you share it with us on HN?