Akka (4) – ActorSystem

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
    • “/user”
      It is the guardian actor for all user-created top-level actors; actors crated using ActorSystem.actorOf
    • “/system”
      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.
    • “/deadLetters”
      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)
    • “/temp”
      It is the guardian for all short-lived system-created actors, e.g. those which are used in implementation of ActorRef.ask
    • “/remote”
      It is an artificial path below which all actors reside whose supervisors are remote actor references.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s