Open sphaero opened 11 months ago
I think it's a good idea to reduce the actor to just being a function which receives messages (data) and can send data but just returns its state. So we don't return messages to be sent anymore. This opens the possibility to have multiple sockets.
We can provide automatic API handling (process special message signatures) or just let the user do that. If we use OSC we can use a special first character in the address string to signal it's an API message.
We can run this function on a thread, a green thread or a process.
We should look into opening the possibility to run your own loop in which you can just poll sockets etc. This makes it easier to integrate in existing loops.
Look into https://libcsp.dev/
Misty is a new language supporting actors as well. Ref: https://www.crockford.com/misty/actors.html
Why?