I have been learning Erlang, but also I'm keeping my eyes open to other technologies such as Scala. Does anyone know how Scala's multi node performance compares to Erlang?
[Disclaimer: I'm on the Akka team]
I really encourage you to take a good look at the Scala framework Akka
We really strive to provide a platform that scales horizontally AND vertically, and that embraces failure to enable self-healing systems.
Features: Actors for concurrency Software Transactional Memory (STM) for concurrent transactional composition Supervisor hierarchies for fault-tolerance Cluster Membership Java API with ActiveObjects (Java Actors sort of) Distributed persistence through MongoDB, Cassandra or Redis REST support through exposing Actors as JAX-RS endpoints + (Comet/Ajax Push) + much much more
Hope to see you on the mailing list soon!
Scala is limited somewhat by the fact that Java threads are rather heavy. It won't scale in number of threads as much as Erlang does.
To put it plainly, forget about running thousands of actors in Scala in the short term. EDIT: see comment below to an experience to the contrary. In my defense, I meant thousands of actors on thousands of threads.
However, actors are not part of the base language. They are just a library which, because of Scala's intrinsic strengths, look as if they are part of the language. The importance of that is that actors are replaceable. There are two important alternative actor libraries for Scala. The most famous one is Akka, of which others have spoken about, and which I can only endorse as being worth a serious look at. The other one is Lift's actors, which go the other way, by providing a more simple (and reliable) actor implementation that meets Lift's own needs, and doesn't try to go beyond that.
Another promising development is the addition of delimited continuations to Scala 2.8. Delimited continuations, while difficult to use, enable a very fast actor implementation. Just to be clear, it is difficult to write libraries (such as actors) with delimited continuations, but such library wouldn't be any different to use than the others actor libraries.
Scala is not designed as a coherent platform (like erlang) and therefore does not include robust distribution capabilities by default. The scala actor library is more like erlang's process model refitted on the language. There are libraries which provide OTP-like capabilities and clustering, i.e. Akka.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With