August 2018
Intermediate to advanced
380 pages
10h 2m
English
One problem with concurrent programming is the shared mutable state. Akka eliminates this problem by providing a restriction that it is impossible to access your actors as ordinary objects. This means your business logic does not have a single variable that would store an actor. Hence, it is impossible to access the values defined on the actors by ordinary object-oriented means.
The actors are exposed to the outer world via proxy types—ActorRefs. The Akka library defines this type, and only safe operations are permitted on an actor.
If you want to do something with an actor, you should do so via this proxy. Also, you do not instantiate an actor as an ordinary Java or Scala object. You do not call a constructor on it. Instead, ...