It looks good. What you should take into account is that by default the participants have a “no more than one time” delivery guarantee, so you should take into account that when communicating with your actor you cannot get an answer. (Network failure, remote remote hosts, etc.)
In the local system, it is very unlikely that the message will be lost, but, theoretically, the actor system can crash if someone does something too wild with it, and thus the actors die.
Thus, when communicating with an actor using Ask , it is better to be safe and provide a timeout and handle this exception, rather than blocking / waiting forever.
Async / Await is supported with the latest bits of pre release (pre 1.0). However, this is not recommended. it’s best to stick with PipeTo and be explicit.
Another thing that iffy can get is that in your example, you see the actor as a repository of key values, and that's all right. And your posts are also unchanged, which is also good. But if the Key or Value properties are ref types, and people can mutate them from the outside, for example. IGetSet consumers who can cause RC problems inside the actor, because the actor can read these values when another thread mutates them.
ActorSystems also quite expensive, try to avoid the reversal of many systems that focus on one system per process.
In addition, you are good to go.
Roger Johansson
source share