2. Erlang
• The world is concurrent
• Things in the world don't share data
• Things communicate with messages
• Things fail
• - Joe Armstrong
2 Actors - Public
8. What is the Actor Model
• Light weight processes/tasks/agents
communicating through messaging
• Messages are buffered in a “mailbox”
• No shared state
• Isolated from other processes
• Normally event systems are inversion of
control
• Adding a listener to an object
• Hard to maintain in large systems
• Humans do not share memory, we
communicate through messages
8 Actors - Public
9. React or receive
• React is the “normal” actor, lightweight
process
• Receive spins out a new Java thread
• In the paper *
• 5000 threads
• 1 200 000 actors
• React uses partial functions to send the
process to the heap
• Receive runs on the stack and is
heavyweight JVM threads (like Java)
• *Actors That Unify Threads and Events P. Haller, M.
Odersky
9 Actors - Public