-
I found your project and I'm liking very very much what I see. But I'm still trying to wrap my head around it and I'd like to confirm the right approach to do what I want to build. In essence, I need to have a group for actors with a "supervisor" that coordinates their work, like a tree of height 1. But the thing is one (or more) of those actors could be internally another group of actors with its own supervisor. And that group could be in the same thread, or have a dedicated separate thread. This structure can be repeated several times. I'm still not sure what the best aproach would be using stakker, or even if stakker is the right tool for this, even after reading the why single threaded faq. I think that I'm forced enable the thank you very much in advance for any insights |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The whole heirarchy of actors is easy to do within a single thread. For running another heirarchy in another thread, the supervisor actor in the first thread can start that other thread and start a stakker runtime and whatever actors are required in that thread. Maybe the The big question is what kind of communication will you require between the actors in the first and second threads? Stakker doesn't (yet) provide a way to proxy actor calls remotely (i.e. between threads or between machines). So you'll need to use mutex-protected shared memory, or queues, or channels, or some other means to pass data one way and the other. If the communication is relatively simple this should be straightforward. But if your actors will need to make a lot of calls backwards and forwards between the threads, and between different actors, it could be a bit more involved to set up as things stand right now. (Note that you can use any kind of inter-thread crate that suits your use case, and use Stakker's If you describe what kind of calling patterns you'd expect to see between the threads, maybe it would help me understand the requirements. This would also help for when I come to design and implement remote calls. |
Beta Was this translation helpful? Give feedback.
The whole heirarchy of actors is easy to do within a single thread. For running another heirarchy in another thread, the supervisor actor in the first thread can start that other thread and start a stakker runtime and whatever actors are required in that thread. Maybe the
PipedThread
implementation could give you some ideas about making sure that things clean up correctly. MaybePipedThread
itself would be sufficient. So that part is doable.The big question is what kind of communication will you require between the actors in the first and second threads? Stakker doesn't (yet) provide a way to proxy actor calls remotely (i.e. between threads or between machines). So you'll need to use mut…