I'm doing some early-stage research towards architecting a new software application. Concurrency and multithreading will likely play a significant part, so I've been reading up on the various topics.

The producer-consumer model, at least how it is expressed in Java, has some surface similarities but appears to be deeply dissimilar to the actor model in use with languages such as Erlang and Scala. I'm having trouble finding any good comparative data, or specific reasons to use or avoid the one or the other.

Is the actor model even possible with Java or C#, or do you have do use one of the languages built for the purpose? Is there a third way?


2 Answers 2


Sure, you could implement an actor-based model in both java and C#. Infact microsoft already did so. You gain a bunch of benefits though if the model is an abstraction directly in the language.

That being said the jury is still out on whether the actor-model will be the concurrency model of the future. Clojure goes with software transactional memory as it's underlying concurrency model.

Personally I think neither the actor model nor STM will end up being the de-facto concurrency model but rather an OOP/functional hybrid programming language with concurrency abstractions built directly into the language.

  • Such as Asynchronous Agents Library.
    – rwong
    Jun 5, 2011 at 0:43
  • Could you expand on that last point a little? Jun 6, 2011 at 13:21
  • 3
    Mind you, the actor abstraction is not part of the Scala language. It is, in fact, one of the best examples of Scala making it possible for libraries to rival built-in features. Jun 6, 2011 at 16:35

If you would like to try out the actor model in Java (and Scala) you might want to take a look at Akka. Libraries are also being developed for C++ (see the libraries listed on this wikipedia page).

So, it seems that the actor model need not be built-in in the programming language.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.