| Great question, thanks for asking it. We'll also be reworking the docs on the way to 1.0 to make a lot of this much clearer. The short answer is that these things enable various nice features of the framework, like automatically scaling out your actors, safely managing actor restarts, and managing message delivery for you. Just to cover a few of those briefly: What is an ActorRef? An ActorRef is a reference or handle to an actor. The purpose of an ActorRef is to support sending messages to an actor through the ActorSystem. You never talk directly to an actor—you send messages to its ActorRef and the ActorSystem takes care of delivering those messages for you. What are Props? Think of Props as a recipe for making an actor. Technically, Props is a configuration class that encapsulates all the information needed to make an instance of a given type of actor. One of the reasons Props encapsulate the entire recipe for making an actor (including deployment info) is so the system can manage restarts/lifecycle safely. It also can be serialized so that you can remotely deploy actors to other machines in a cluster -- BUT, this is invisible to you (location transparency, AKA you don't care if your actors are all in one process or on 10 machines spread around the planet). What is an ActorPath? Actor path == actor position in hierarchy. Actors form intrinsic supervision hierarchies. This means there are "top level" actors, which essentially report directly to the ActorSystem itself, and there are "child" actors, which report to other actors. Every actor in this hierarchy has an address. To send a message from one actor to another, you just have to know it's address (AKA its "ActorPath"). This is what a full actor address looks like: akka.tcp://MyActorSystem@localhost:9001/user/a1/b2. What is ActorSelection? This is using the actor path to get an ActorRef (handle to an actor). So instead of getting a handle to an actor by creating it, you're "looking up" the handle by its address. Kind of like looking up someone on Skype by their username. #### You may find this post interesting to go in depth on actor hierarchies / paths / supervision: http://petabridge.com/blog/how-actors-recover-from-failure-h... Also, if you're interested in learning Akka.NET, we're launching a free, self-paced bootcamp this Saturday. Details are here: http://learnakka.net Hope this helps. |
Technically, ActorSelection does not point to a specific ActorRef, it points to every ActorRef that matches the expression given. Wildcards are supported in this expression. So it's an expression that selects 0+ actors
ActorSelection will also match two different ActorRefs with the same name if the first one dies and is replaced by another (not restarted, in which case it would be the same ActorRef).