21

I was just comparing different scala actor implementations and now I'm wondering what could have been the motivation to deprecate the existing scala actor implementation in 2.10 and replace the default actor with the Akka implementation? Neither the migration guide nor the first announcement give any explanation.

According to the comparison the two solutions were different enough that keeping both would have been a benefit. Thus, I'm wondering whether there were any major problems with the existing implementation that caused this decision? In other words, was it a technical or a political decision?

Community
  • 1
  • 1
bluenote10
  • 23,414
  • 14
  • 122
  • 178

1 Answers1

21

I can't but give you a guess answer:

Akka provides a stable and powerful library to work with Actors, along with lots of features that deals with high concurrency (futures, agents, transactional actors, STM, FSM, non-blocking I/O, ...).

Also it implements actors in a safer way than scala's, in that the client code have only access to generic ActorRef. This makes it impossible to interact with actors other than through message-passing.
[edited: As Roland pointed out, this also enables additional features like fault-tolerance through a supervision hierarchy and location transparency: the ability to deploy the actor locally or remotely with no change needed on the client code.
The overall design more closely resembles the original one in erlang.]

Much of the core features were duplicated in scala and akka actors, so a unification seems a most sensible choice (given that the development team of both libraries is now part of the same company, too: Typesafe).
The main gain is avoiding duplication of the same core functionality, which would only create confusion and compatibility issues.

Given that a choice is due, it only remains to decide which would be the standard implementation.

It's evident to me that Akka has more to offer in this respect, being a full-blown framework with many enterprise-level features already included and more to come in the near future.

I can't think of a specific case where scala.actors is capable of accomplishing what akka can't.


p.s. A similar reasoning was made that led to the unification of the standard future/promise implementation in 2.10

The whole scala language and community have to gain from a simplified interface to base language features, instead of a fragmented scene made of different frameworks, each having it's own syntax and model to learn.

The same can't be said for other, more high-level aspects, like web-frameworks, where the developer gains from a richer panorama of available solutions.

pagoda_5b
  • 7,333
  • 1
  • 27
  • 40
  • 3
    In the end the ActorRef is what makes all the advanced features of supervision and location transparency possible, so yes, if you want a single-word summary that would be it. – Roland Kuhn Jan 31 '13 at 10:56