Akka is a toolkit which provides by actor model, featured by concurrency, fault-tolerance and scalability. So this post talks about ActorSystem.
- An ActorSystem is heavyweight structure that will allocated 1…N thread, so create one per logical application.
- Every actor is supervised and (potentially) the supervisor of its children.
- Using the ActorSystem will create top-level actors, supervised by the actor system’s provided guardian actor, while using an actor’s context will create a children actor.
- An actor reference designates a single actor and the life-cycle of the reference matches the actor’s life cycle; an actor path represents a name which may or may not inhabited by actor and the path itself does not have a lief cycle, it never becomes invalid.
- top-level actors
It is the guardian actor for all user-created top-level actors; actors crated using ActorSystem.actorOf
It is the guardian actor for all system-created top-level actors, e.g. logging listeners or actors automatically deployed by configuration at the start of the actor system.
It is the dead letter actor, which is where all messages sent to stopped or non-existing actors are re-routed (on a best-effort basis: messages may be lost even within the local JVM)
It is the guardian for all short-lived system-created actors, e.g. those which are used in implementation of ActorRef.ask
It is an artificial path below which all actors reside whose supervisors are remote actor references.