## Actors that Unify Threads and Events

In this paper we present an abstraction of actors that combines the benefits of thread-based and event-based concurrency. Threads support blocking operations such as system I/O, and can be executed on multiple processor cores in parallel. Event-based computation, on the other hand, is more lightweight and scales to large numbers of actors. We also present a set of combinators that allows a flexible composition of these actors.

Philipp Haller and Martin Odersky also wrote Event-Based Programming without Inversion of Control which was discusssed here last year. You may also remember A Language-based Approach to Unifying Events and Threads (Li and Zdancewic).

## Comment viewing options

### distributed processes?

In Erlang, apparently distributing processes across machines is not much more work than keeping the whole system on a single machine, is that true of Scala as well?

Are there any plans to provide behaviors such as gen_fsm or gen_server?

### Distribution of Scala actors

Distribution of Scala actors is similar to Erlang. An actor is made remotely accessible by declaring that it is alive (for TCP: on some port), and registering a name for it. After that, it can be accessed by selecting its name from the remote node. Since the user's manual is not yet available, I point you to the Scala API documentation which contains an example in the ScalaDoc for RemoteActor in package scala.actors.remote.

David Pollak is also working on integrating JXTA as transport layer. In the process of this effort we might also consider redesigning and extending support for remote actors. So far, our focus has been on (local) concurrency for multi-core machines.

### gen_fsm, gen_server

I am not (yet) familiar with gen_fsm and gen_server. However, if people provide us with convincing use cases on the Scala mailing list, we might come up with something. ;-)