You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question on this part in the documentation. So, basically it looks like multiple actors could be within one actor group. However, I didn't get how to do that properly. Cause this code doesn't work, since strategy moved due to mount method call, in previous iteration of loop.
let topology = elfo::Topology::empty();let strategy = topology.local("strategy");let md = topology.local("md");for strat_bp in strategy_container.strategy_actor{
strategy.mount(strat_bp);};
Is there a way to configure topology in such manner that we have an ActorGroup and several actors inside it.
Thanks!
The text was updated successfully, but these errors were encountered:
If I understand correctly, you're trying to achieve the following schema:
Actors in a group can be spawned only by incoming messages, and you shouldn't mount them directly (you mount the blueprint for the whole group, the same for all actors inside it). I need to clarify this in the documentation.
I've written the example to help you understand the basic concepts of elfo for your case (run with cargo run --bin md, also with RUST_LOG=trace if you want to see also messaging in logs for better understanding). Note that it uses the 0.2.0-alpha version; I suggest you use it as it is very close to being released and has a lot of differences from the 0.1.x versions).
In the example, I show slightly more complex communication (strategies subscribe to interesting markets), but you can use broadcasting from MD actors. The example is simplified (without proper error handling), but I hope it will help you.
Hi,
I have a question on this part in the documentation. So, basically it looks like multiple actors could be within one actor group. However, I didn't get how to do that properly. Cause this code doesn't work, since
strategy
moved due tomount
method call, in previous iteration of loop.Is there a way to configure topology in such manner that we have an ActorGroup and several actors inside it.
Thanks!
The text was updated successfully, but these errors were encountered: