I have been reading the book Reactive Messaging Patterns with the Actor Model, Applications and Integration in Scala and Akka by Vaughn Vernon.
Reactive Applications
Reactive applications are responsive, resilient, elastic, message-driven and capable of producing a real-time feel.
See http://www.reactivemanifesto.org for more details on the four principles.
The Actor Model
More specifically actors must not share any mutable state with other actors. Actors have individual mailboxes and don't share queues.
When designing reactive systems using the Actor Model, try to anticipate the unexpected. That doesn't mean you can think of every possible situation up front, but you can build resiliency through supervision which will deal with what you cannot know up front.
Akka
Reactive Applications
Reactive applications are responsive, resilient, elastic, message-driven and capable of producing a real-time feel.
See http://www.reactivemanifesto.org for more details on the four principles.
The Actor Model
An actor is a computational entity that in response to a message it receives can do the following.
- Send a finite number of messages to other actors
- Create a finite number of new actors
- Designate the behaviour to be used for the next message it receives
There is no assumed sequence to these actions and they will be carried out in parallel.
When designing reactive systems using the Actor Model, try to anticipate the unexpected. That doesn't mean you can think of every possible situation up front, but you can build resiliency through supervision which will deal with what you cannot know up front.
Akka
Akka implements the Actor Model. Akka Actors give you:
At the next part I will be looking at some example reactive applications using Akka.
No comments:
Post a Comment