Rewrite Java in Scala - Concurrency and Scalability
First Scala has this Actor concept, designed to overcome Java's Shared Memory Model issue when programming in concurrency.
An Actor is a mathematical model of concurrent computation that encapsulate data, code and its own thread of control, and communicate asynchronously using immutable message passing techniques. So the basic architecture in Scala is shared-nothing, each actor acts in its own process space.
However, it's not end of road. From Scala 2.10, Akka's actor implementation is included as part of the Scala standard library.
Akka uses Actors independently executing processes that communicate via message passing as the foundation for fault tolerant applications where individual actors can fail without crashing everything. Perfect for high volume applications that need to scale rapidly. Akka is an efficient foundation for event driven systems that want to scale elastically up and out on demand, both on multi-core processors and across server nodes.
Moreover, Akka has a STM implementation that is based on the same ideas as found in the Clojure language; Managed References working with immutable data.
Software Transactional Memory (STM) is excellent for problems where you need consensus and a stable view of the state by providing compositional transactional shared state. Some of the really nice traits of STM are that transactions compose and that it raises the abstraction level from lock-based concurrency.
Akka is not only offering good concurrency and scalability characteristics, but also is excellent for building event-based systems.