This is an experiment to use unix processes as actors. This is also probably the worst actor framework in existence, but its quite small so there's that.
This will probably be outperformed be any halfway decent actor framework, because it uses the unix scheduler to schedule its work. This simplifies the architecture quite a bit, so that everything that can read and write from stdin/stdout and parse json can act as an actor in this system.
Get sources
pijul clone https://nest.pijul.com/hardliner66/uaf
git clone https://github.com/hardliner66/uaf
Build the framework and the test actor
cargo build --release --all
./target/release/uaf ./target/release/test-actor
Each actor can send a message by printing to its stdout. This can either be a data message or a props message. A data message gets routed to the actor with the given id. A props message takes the arguments from the props and spawns the executable according to the props. If one of the arguments contains the string "{ACTOR_ID}", then this will be replaced by the id of the actor itself.
Each actor can print to stderr in order to log something.
To receive messages, an actor has to read from its stdin. There are currently two types of messages that can get sent to an actor. A spawned message, telling the actor if spawning of a props succeeded or failed and the id of the spawned actor. Or a data message from another actor.
The data structures for the protocol can be found in src/lib.rs.