Akka Documentation, Release 2.1.0
one path, where all but one involve some translation which decouples part of the path from the actor’s actual
supervision ancestor line; these specialities are described in the sub-sections to follow.
An actor path consists of an anchor, which identifies the actor system, followed by the concatenation of the path
elements, from root guardian to the designated actor; the path elements are the names of the traversed actors and
are separated by slashes.
Actor Path Anchors
Each actor path has an address component, describing the protocol and location by which the corresponding actor
is reachable, followed by the names of the actors in the hierarchy from the root up. Examples are:
"akka://my-sys/user/service-a/worker1" // purely local
"akka://my-sys@host.example.com:5678/user/service-b" // local or remote
"cluster://my-cluster/service-c" // clustered (Future Extension)
Here, akka is the default remote protocol for the 2.0 release, and others are pluggable. The interpretation of the
host & port part (i.e. serv.example.com:5678 in the example) depends on the transport mechanism used,
but it must abide by the URI structural rules.
Logical Actor Paths
The unique path obtained by following the parental supervision links towards the root guardian is called the logical
actor path. This path matches exactly the creation ancestry of an actor, so it is completely deterministic as soon as
the actor system’s remoting configuration (and with it the address component of the path) is set.
Physical Actor Paths
While the logical actor path describes the functional location within one actor system, configuration-based remote
deployment means that an actor may be created on a different network host as its parent, i.e. within a different
actor system. In this case, following the actor path from the root guardian up entails traversing the network, which
is a costly operation. Therefore, each actor also has a physical path, starting at the root guardian of the actor
system where the actual actor object resides. Using this path as sender reference when querying other actors will
let them reply directly to this actor, minimizing delays incurred by routing.
One important aspect is that a physical actor path never spans multiple actor systems or JVMs. This means that
the logical path (supervision hierarchy) and the physical path (actor deployment) of an actor may diverge if one
of its ancestors is remotely supervised.
Virtual Actor Paths (Future Extension)
In order to be able to replicate and migrate actors across a cluster of Akka nodes, another level of indirection has to
be introduced. The cluster component therefore provides a translation from virtual paths to physical paths which
may change in reaction to node failures, cluster rebalancing, etc.
This area is still under active development, expect updates in this section for the 2.1 release.
2.4.3 How are Actor References obtained?
There are two general categories to how actor references may be obtained: by creating actors or by looking them
up, where the latter functionality comes in the two flavours of creating actor references from concrete actor paths
and querying the logical actor hierarchy.
While local and remote actor references and their paths work in the same way concerning the facilities men-
tioned below, the exact semantics of clustered actor references and their paths—while certainly as similar as
possible—may differ in certain aspects, owing to the virtual nature of those paths. Expect updates for the 2.1
release.
2.4. Actor References, Paths and Addresses 17