welcome to section two playing with
actors in the previous section we
introduced the actor model and some
important terminologies to get ourselves
started we ended the section by creating
a hello world app in this section we
will take a look at the actor system and
hierarchical structure for actors next
we'll delve into the actor component and
actor lifecycle we then move on to actor
definition and creation with props I
know we created greeter actor in the
previous section but in this section we
will go deeper into the act of creation
and recommended best practices then we
will talk to actors finally we'll
discuss supervision and monitoring
let's start our first video actor system
and hierarchical structure in this video
we will take a look at the actor system
and hierarchical structure for actors
defining the actor system and finally
end with the actor system component
let's get rolling then the actor is an
object that encapsulates the state and
behavior the actors communicate by
exchanging messages you can think about
the actor is a person in the previous
section in the first video itself we
considered you and your friend is an
example from real life in this video we
have another example from our life to
express the hierarchical structure of
actors like in a software team actors
naturally form hierarchies let's express
our life in our team the project manager
receives requirements from the project
owner or a client he applies some
processes on it and distributes it over
the development teams every team leader
takes the requirements and splits it
into smaller tasks and distributes them
over to his entire team every member in
the team takes up a task and completes
it according to his responsibilities and
when he finishes it he reports it to his
leader he gives the status as per
whatever he has completed or hasn't
completed because of some issues in
other words every team member needs to
complete a particular task maybe do it
himself or split it into smaller tasks
distribute them over to his team and
managers team to complete it let's
Express the situation in the actor world
one actor which is to oversee a certain
function in the program might want to
split up its tasks into smaller more
manageable pieces for this purpose it
starts child actors which it supervises
and if one actor does not have the means
for dealing with a certain situation it
sends a corresponding failure message to
its supervisor asking for help now for
the question of the hour
what's the actor system the actor system
is our route of the actors structure the
actor system as a collaborating failure
ensemble of actors is the natural unit
for managing shed pasilla
tee's such as scheduling services
configuration and logging now let's take
an overview of the actor system
components the dead-letter office is an
actor structurally no different from any
other actor anytime a message is
destined for an actor that either
doesn't exist
or is not running it goes to the
dead-letter office the user guardian
actor is the parent of all actors we
create from the actor system for
internal actors that Acker creates to
assist you there is a system Guardian
actor it serves the same purpose as the
user guardian actor but for system
actors the scheduler is a part of the
actor system responsible for scheduling
things that may arise in the future the
event stream is the main event bus of
each actor system it is used to carry
log messages and dead letters you can
also use it to publish messages across
your entire actor system akka uses a new
configuration system that's useful for
configuring akka and your application
you can access it from the actor system
the part of the actor system with which
we've interacted mostly has been the
user guardian the user guardian is the
parent for the actors we create from
actor system which watches and takes
care of them to summarize the concepts
of this video we have talked about actor
system its components and the
hierarchical structure for actors