Académique Documents
Professionnel Documents
Culture Documents
The model
The actor model is a conceptual model to deal with
concurrent computation. It defines some general
rules for how the system's components should
behave and interact with each other. The most
famous language that uses this model is probably
Erlang. I'll try to focus more on the model itself and
1/8
9/23/2015
Actors
An actor is the primitive unit of computation. It's the
thing that receives a message and do some kind of
computation based on it.
The idea is very similar to what we have in objectoriented languages: An object receives a message (a
method call) and do something depending on which
message it receives (which method we are calling).
The main difference is that actors are completely
isolated from each other and they will never share
memory. It's also worth noting that an actor can
maintain a private state that can never be changed
directly by another actor.
2/8
9/23/2015
What actors do
When an actor receives a message, it can do one of
these 3 things:
http://www.brianstorti.com/the-actor-model/
3/8
9/23/2015
Fault tolerance
Erlang introduced the "let it crash" philosophy. The
4/8
9/23/2015
Distribution
Another interesting aspect of the actor model is that
it doesn't matter if the actor that I'm sending a
message to is running locally or in another node.
Think about it, if an actor is just this unit of code with
http://www.brianstorti.com/the-actor-model/
5/8
9/23/2015
6/8
9/23/2015
Subscribe
Written by
Brian Storti
http://www.brianstorti.com/the-actor-model/
7/8
9/23/2015
0Comments
Recommend
BrianThomasStorti
Share
Login
SortbyNewest
Startthediscussion
Bethefirsttocomment.
WHAT'STHIS?
ALSOONBRIANTHOMASSTORTI
DesigninggoodAPIsAvoiding
thetypemarshallingtrap
ImplementingaPriorityQueuein
Ruby
2commentsayearago
8comments8monthsago
KimPastroThanksforsharing.I'll
FredIt'sbeenawhilesinceI've
usethisapproachfromnowon.
exploredtheBinaryHeapstructurein
therealmofalgorithms.Thiswas
refreshingtoread.Thanksforsharing!
Stopusingtailf(mostly)
58comments6monthsago
BrielleOr,youcouldjusthit
controlstopausetheoutput,scroll
backupthroughthescrollbackand
findwhatyouarelookingfor,then
http://www.brianstorti.com/the-actor-model/
UnderstandingBundler'ssetup
process
1comment7monthsago
ferdinandrosarioGreatArticle.I'm
alwayscurioustoknowaboutthe
internalsandthisposthelpedmetoget
thatclearaboutbundler.Thanksfor
8/8