San Diego Scala Users April Meetup


Details
For the April Meetup we will conduct a workshop about the Actors model of concurrent computation in which we read, hack, and discuss this model of computation as it relates to Scala, Scala actors, and the Akka library.
Attendees are encouraged to read relevant background materials and have Scala and Akka up and running in their environment so we can collaboratively work and discuss.
Ruben Savanne has an excellent article (http://ruben.savanne.be/articles/concurrency-in-erlang-scala) about the Actor Model in Erlang and Scala. This is part of it describing the Actor Model:
"The Actor Model, which was first proposed by Carl Hewitt in 1973 and was improved, among others, by Gul Agha. This model takes a different approach to concurrency, which should avoid the problems caused by threading and locking.
In the actor model, each object is an actor. This is an entity that has a mailbox and a behaviour. Messages can be exchanged between actors, which will be buffered in the mailbox. Upon receiving a message, the behaviour of the actor is executed, upon which the actor can: send a number of messages to other actors, create a number of actors and assume new behaviour for the next message to be received.
Of importance in this model is that all communications are performed asynchronously. This implies that the sender does not wait for a message to be received upon sending it, it immediately continues its execution. There are no guarantees in which order messages will be received by the recipient, but they will eventually be delivered.
A second important property is that all communications happen by means of messages: there is no shared state between actors. If an actor wishes to obtain information about the internal state of another actor, it will have to use messages to request this information. This allows actors to control access to their state, avoiding problems like the lost-update problem. Manipulation of the internal state also happens through messages.
Each actor runs concurrently with other actors: it can be seen as a small independently running process."
References and good reads:
1: https://en.wikipedia.org/wiki/Actor_model
3: http://doc.akka.io/docs/akka/snapshot/general/index.html
4: http://dspace.mit.edu/bitstream/handle/1721.1/6952/AITR-844.pdf?sequence=2
5: http://www.scala-lang.org/node/242
6: http://www.scala-lang.org/api/current/scala/actors/package.html

San Diego Scala Users April Meetup