These are chat archives for akkadotnet/akka.net
Good day folks :wave:
I am looking for some insight on weather I am painting myself into a corner or not. I am creating an actor that I think of as a "service". I want it to have a well defined public API. I do not wish to expose a set of messages that you can send the actor, I want to expose a set of operations you can try to run.
What I am currently thinking is exposing these operations as
static methods on the same class that I am implementing my actor (basically a #region on the top of the file). I have one static method called
Spawn that takes in the
ActorSystem, plus arguments that are required for my Props. The other static methods, they all take in the
ActorSystem, and, inside the (static) implementation, I do both the
ActorSelection() and the necessary
Tell/Ask depending on the guarantees I want to provide from my method. I got this inspiration from my interpretation of the "erlang way". I also desire to hide the internal akka messages that make the bridge from "outside the actor" to inside the actor (thus creating a clearer public API). What are your thoughts on this approach?
actor hierarchyfrom within the actor system, using an Ask or Tell?