This page is no longer maintained — Please continue to the home page at www.scala-lang.org

scala actors or akka? And what about the book

12 replies
Tim P
Joined: 2011-07-28,
User offline. Last seen 1 year 4 weeks ago.

Hi
I'm about to look at Actors. Should I go straight to Akka or look at
scala.actors?
Also, I like learning from books. If I were to use Akka, would the
Artemis Scala book still be valid?
Thanks
Tim

Tim P
Joined: 2011-07-28,
User offline. Last seen 1 year 4 weeks ago.
Re: scala actors or akka? And what about the book

Sorry that should have be Artima Actors in Scala book

On 13 December 2011 12:28, Tim P wrote:
> Hi
> I'm about to look at Actors. Should I go straight to Akka or look at
> scala.actors?
> Also, I like learning from books. If I were to use Akka, would the
> Artemis Scala book still be valid?
> Thanks
> Tim

Philipp Haller
Joined: 2009-01-13,
User offline. Last seen 42 years 45 weeks ago.
Re: scala actors or akka? And what about the book

The Artima book ("Actors in Scala") also covers the basics of Akka, plus remoting. We're also planning on updating and extending the material for Akka 2.0. Also, the first few chapters are pretty much API agnostic, so apply to both.

Also, Scala 2.10 is going to provide a smoother migration path from scala.actors to Akka actors. In the next major release after 2.10, scala.actors will be removed.

You can always start playing with scala.actors in the REPL. Once you know the basics, I'd recommend going straight to Akka.

Cheers,
Philipp

On Dec 13, 2011, at 1:39 PM, Tim Pigden wrote:

> Sorry that should have be Artima Actors in Scala book
>
> On 13 December 2011 12:28, Tim P wrote:
>> Hi
>> I'm about to look at Actors. Should I go straight to Akka or look at
>> scala.actors?
>> Also, I like learning from books. If I were to use Akka, would the
>> Artemis Scala book still be valid?
>> Thanks
>> Tim

--
Co-author, "Actors in Scala" (Artima Inc, 2011)
Postdoc, EPFL and Stanford University

Tim P
Joined: 2011-07-28,
User offline. Last seen 1 year 4 weeks ago.
Re: scala actors or akka? And what about the book

Hi Philipp and Heiko
Thanks for the response. Philipp I already bought the book this afternoon :-)

Tim

On 13 December 2011 22:10, Philipp Haller wrote:
> The Artima book ("Actors in Scala") also covers the basics of Akka, plus remoting. We're also planning on updating and extending the material for Akka 2.0. Also, the first few chapters are pretty much API agnostic, so apply to both.
>
> Also, Scala 2.10 is going to provide a smoother migration path from scala.actors to Akka actors. In the next major release after 2.10, scala.actors will be removed.
>
> You can always start playing with scala.actors in the REPL. Once you know the basics, I'd recommend going straight to Akka.
>
> Cheers,
> Philipp
>
>
> On Dec 13, 2011, at 1:39 PM, Tim Pigden wrote:
>
>> Sorry that should have be Artima Actors in Scala book
>>
>> On 13 December 2011 12:28, Tim P wrote:
>>> Hi
>>> I'm about to look at Actors. Should I go straight to Akka or look at
>>> scala.actors?
>>> Also, I like learning from books. If I were to use Akka, would the
>>> Artemis Scala book still be valid?
>>> Thanks
>>> Tim
>
> --
> Co-author, "Actors in Scala" (Artima Inc, 2011)
> Postdoc, EPFL and Stanford University
>
>
>

Philipp Haller
Joined: 2009-01-13,
User offline. Last seen 42 years 45 weeks ago.
Re: scala actors or akka? And what about the book

On Dec 14, 2011, at 12:41 AM, Tim Pigden wrote:
> Thanks for the response. Philipp I already bought the book this afternoon :-)

Cool. I hope it'll be helpful (and fun).

Cheers,
Philipp

> On 13 December 2011 22:10, Philipp Haller wrote:
>> The Artima book ("Actors in Scala") also covers the basics of Akka, plus remoting. We're also planning on updating and extending the material for Akka 2.0. Also, the first few chapters are pretty much API agnostic, so apply to both.
>>
>> Also, Scala 2.10 is going to provide a smoother migration path from scala.actors to Akka actors. In the next major release after 2.10, scala.actors will be removed.
>>
>> You can always start playing with scala.actors in the REPL. Once you know the basics, I'd recommend going straight to Akka.
>>
>> Cheers,
>> Philipp
>>
>>
>> On Dec 13, 2011, at 1:39 PM, Tim Pigden wrote:
>>
>>> Sorry that should have be Artima Actors in Scala book
>>>
>>> On 13 December 2011 12:28, Tim P wrote:
>>>> Hi
>>>> I'm about to look at Actors. Should I go straight to Akka or look at
>>>> scala.actors?
>>>> Also, I like learning from books. If I were to use Akka, would the
>>>> Artemis Scala book still be valid?
>>>> Thanks
>>>> Tim
>>
>> --
>> Co-author, "Actors in Scala" (Artima Inc, 2011)
>> Postdoc, EPFL and Stanford University
>>
>>
>>

--
Co-author, "Actors in Scala" (Artima Inc, 2011)
Postdoc, EPFL and Stanford University

Chris Marshall
Joined: 2009-06-17,
User offline. Last seen 44 weeks 3 days ago.
RE: scala actors or akka? And what about the book
Eek! May I request that the decision to remove them is based around feedback about how successful the "smooth transition path" ends up being? Deprecating an entire library (and hence application architecture) is a wee bit more invasive than previous deprecations which (for the most part) could be dealt with by search & replace.
For example, the current version of Akka has totally different failure sematics to Scala actors. I have found it deeply non-trivial to convert an application from Scala to Akka; to the extent that I gave up.
Chris

> From: philipp.haller@epfl.ch
>
> Also, Scala 2.10 is going to provide a smoother migration path from scala.actors to Akka actors. In the next major release after 2.10, scala.actors will be removed.
>

Viktor Klang
Joined: 2008-12-17,
User offline. Last seen 1 year 27 weeks ago.
Re: scala actors or akka? And what about the book
Hi Chris,

On Wed, Dec 14, 2011 at 11:57 AM, Chris Marshall <oxbow_lakes@hotmail.com> wrote:
Eek! May I request that the decision to remove them is based around feedback about how successful the "smooth transition path" ends up being?
 
Deprecating an entire library (and hence application architecture) is a wee bit more invasive than previous deprecations which (for the most part) could be dealt with by search & replace.

There's nothing that says that the scala actors can't be served on the side. The question is would maintain it.
 
For example, the current version of Akka has totally different failure sematics to Scala actors.

It is not the current version of Akka that will be the basis of the migration path, the 2.x series has pluggable fault handling.
 
I have found it deeply non-trivial to convert an application from Scala to Akka; to the extent that I gave up.

Was there something that we couldn't help out with on the akka ml?


 

Chris

> From: philipp.haller@epfl.ch
>
> Also, Scala 2.10 is going to provide a smoother migration path from scala.actors to Akka actors. In the next major release after 2.10, scala.actors will be removed.
>




--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang
Chris Marshall
Joined: 2009-06-17,
User offline. Last seen 44 weeks 3 days ago.
RE: scala actors or akka? And what about the book
Hi Viktor -
Yes - and you did help at the time. The big issues were the heavy use I make of nested reacts and the failure handling. I find akka's default behaviour of automatically restarting failed actors to be a highly dubious choice. I wonder how many actor based systems there are that should work in this manner (I realise it may be true of some but, I suspect, these would be in the minority). Certainly none of mine.
I'm afraid that, despite a few exchanges between ourselves and Jonas, I still found the failure model difficult to get my head around. I also found (at that time) the documentation hard to find. For example, you sent me the link to the actor lifecycle PDF - I had been looking for that for *ages*!
I realize that the new actors framework will be based on a new version of Akka, but it seems a bit over-confident to me to assume that, just because it is intended that migration be easier, there won't still be issues. That said, migrating the existing actors library to scalax and keeping it around is an acceptable solution.
Chris 

Date: Wed, 14 Dec 2011 12:08:56 +0100
Subject: Re: [scala-user] scala actors or akka? And what about the book
From: viktor.klang@gmail.com
To: oxbow_lakes@hotmail.com
CC: philipp.haller@epfl.ch; tim.pigden@optrak.com; scala-user@googlegroups.com

Hi Chris,

On Wed, Dec 14, 2011 at 11:57 AM, Chris Marshall <oxbow_lakes@hotmail.com> wrote:
Eek! May I request that the decision to remove them is based around feedback about how successful the "smooth transition path" ends up being?
 
Deprecating an entire library (and hence application architecture) is a wee bit more invasive than previous deprecations which (for the most part) could be dealt with by search & replace.

There's nothing that says that the scala actors can't be served on the side. The question is would maintain it.
 
For example, the current version of Akka has totally different failure sematics to Scala actors.

It is not the current version of Akka that will be the basis of the migration path, the 2.x series has pluggable fault handling.
 
I have found it deeply non-trivial to convert an application from Scala to Akka; to the extent that I gave up.

Was there something that we couldn't help out with on the akka ml?


 

Chris

> From: philipp.haller@epfl.ch
>
> Also, Scala 2.10 is going to provide a smoother migration path from scala.actors to Akka actors. In the next major release after 2.10, scala.actors will be removed.
>




--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang
Viktor Klang
Joined: 2008-12-17,
User offline. Last seen 1 year 27 weeks ago.
Re: scala actors or akka? And what about the book
Hi Chris,

2011/12/14 Chris Marshall <oxbow_lakes@hotmail.com>
Hi Viktor -
Yes - and you did help at the time. The big issues were the heavy use I make of nested reacts and the failure handling. I find akka's default behaviour of automatically restarting failed actors to be a highly dubious choice. I wonder how many actor based systems there are that should work in this manner (I realise it may be true of some but, I suspect, these would be in the minority). Certainly none of mine.

That is why everything is supervised by default in 2.x, so you cannot be fault-intolerant, also, you have explicit choice of Escalate, Stop, Resume, Restart for each thing, or class of things, that are thrown.

The proposed defaults for 2.0-M! are:

final val defaultDecider: Decider = {
    case _: ActorInitializationException ⇒ Stop
    case _: ActorKilledException         ⇒ Stop
    case _: Exception                    ⇒ Restart
    case _                               ⇒ Escalate
  }
 

I'm afraid that, despite a few exchanges between ourselves and Jonas, I still found the failure model difficult to get my head around. I also found (at that time) the documentation hard to find. For example, you sent me the link to the actor lifecycle PDF - I had been looking for that for *ages*!

http://doc.akka.io, really easy to find, it's linked directly from akka.io, and has been for quite some time, back in 0.7 or something if I recall correctly.
 

I realize that the new actors framework will be based on a new version of Akka, but it seems a bit over-confident to me to assume that, just because it is intended that migration be easier, there won't still be issues.

We aren't migrating away from something that is free from issues and just works, we're solving quite a bunch of problems on the way.
 
That said, migrating the existing actors library to scalax and keeping it around is an acceptable solution.

The Scala lib is open source with a permissive license, so it will stay alive for as long as people want it to.
 



Chris 

Date: Wed, 14 Dec 2011 12:08:56 +0100
Subject: Re: [scala-user] scala actors or akka? And what about the book
From: viktor.klang@gmail.com
To: oxbow_lakes@hotmail.com
CC: philipp.haller@epfl.ch; tim.pigden@optrak.com; scala-user@googlegroups.com

Hi Chris,

On Wed, Dec 14, 2011 at 11:57 AM, Chris Marshall <oxbow_lakes@hotmail.com> wrote:
Eek! May I request that the decision to remove them is based around feedback about how successful the "smooth transition path" ends up being?
 
Deprecating an entire library (and hence application architecture) is a wee bit more invasive than previous deprecations which (for the most part) could be dealt with by search & replace.

There's nothing that says that the scala actors can't be served on the side. The question is would maintain it.
 
For example, the current version of Akka has totally different failure sematics to Scala actors.

It is not the current version of Akka that will be the basis of the migration path, the 2.x series has pluggable fault handling.
 
I have found it deeply non-trivial to convert an application from Scala to Akka; to the extent that I gave up.

Was there something that we couldn't help out with on the akka ml?


 

Chris

> From: philipp.haller@epfl.ch
>
> Also, Scala 2.10 is going to provide a smoother migration path from scala.actors to Akka actors. In the next major release after 2.10, scala.actors will be removed.
>




--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang



--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang
Chris Marshall
Joined: 2009-06-17,
User offline. Last seen 44 weeks 3 days ago.
RE: scala actors or akka? And what about the book
Yes - I found the doc online. Unfortunately this is what it has to say about Actor Lifecycle:
NEW (newly created actor) - can't receive messages (yet)
    => STARTED (when 'start' is invoked) - can receive messages
        => SHUT DOWN (when 'exit' or 'stop' is invoked) - can't do anything

Hmmm - not very comprehensive. Certainly not as comprehensive as the PDF you sent me. This ends up being true of all docs I've found; with the exception of Spring's single page HTML which has the grace to treat me like the idiot I surely am :-)
Chris
Date: Wed, 14 Dec 2011 16:00:52 +0100
Subject: Re: [scala-user] scala actors or akka? And what about the book
From: viktor.klang@gmail.com
To: oxbow_lakes@hotmail.com
CC: philipp.haller@epfl.ch; tim.pigden@optrak.com; scala-user@googlegroups.com


http://doc.akka.io, really easy to find, it's linked directly from akka.io, and has been for quite some time, back in 0.7 or something if I recall correctly.
Simon Ochsenreither
Joined: 2011-07-17,
User offline. Last seen 42 years 45 weeks ago.
Re: scala actors or akka? And what about the book
Hi Philipp, hi Victor,

while I think it is a good idea to reduce overlapping/redundant feature sets, could you go a bit more into detail?

E. g. it would be nice to ship a separate scala-actors.jar in Scala 2.10 to further reduce the footprint of the main JAR, but I would really like to know what the deprecation/replacement story is about. Afaik scala.actors still live in the main JAR and are bound to the deprecate—keep—remove cycle.

Imho the full documentation about everything related to the migration has to exist BEFORE deprecating/removing/replacing anything, especially if the deprecation rules are to be broken. Then people should decide if this is sufficient. People are still suffering from the SBT 0.7 -> 0.10 move. This should not repeat.

Thanks for all the great work!

Bye,

Simon
Viktor Klang
Joined: 2008-12-17,
User offline. Last seen 1 year 27 weeks ago.
Re: scala actors or akka? And what about the book
Hi Simon,

On Wed, Dec 14, 2011 at 7:40 PM, Simon Ochsenreither <simon.ochsenreither@googlemail.com> wrote:
Hi Philipp, hi Victor,

while I think it is a good idea to reduce overlapping/redundant feature sets, could you go a bit more into detail?

There is no more details at the moment.
 

E. g. it would be nice to ship a separate scala-actors.jar in Scala 2.10 to further reduce the footprint of the main JAR, but I would really like to know what the deprecation/replacement story is about. Afaik scala.actors still live in the main JAR and are bound to the deprecate—keep—remove cycle.

Imho the full documentation about everything related to the migration has to exist BEFORE deprecating/removing/replacing anything, especially if the deprecation rules are to be broken. Then people should decide if this is sufficient. People are still suffering from the SBT 0.7 -> 0.10 move. This should not repeat.

Of course a way forward must exist prior to walking it.
 

Thanks for all the great work!

You're most welcome.

Cheers,

 

Bye,

Simon



--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang
roland.kuhn
Joined: 2011-02-21,
User offline. Last seen 35 weeks 3 days ago.
Re: scala actors or akka? And what about the book
Hi Chris,

I think you might be interested in this: http://akka.io/docs/akka/2.0-M1/general/supervision.html

With respect to nested receives, that certainly is not our style currently. Philipp is looking into making react {} available on top of Akka actors, though. However, this basically restricts you to not restarting an actor, ever (because that clears the state, incl. hotswap stack), and I don’t know how useful that would be.

Regards,

Roland

Am Mittwoch, 14. Dezember 2011 15:49:04 UTC+1 schrieb Chris Marshall:
Hi Viktor -
Yes - and you did help at the time. The big issues were the heavy use I make of nested reacts and the failure handling. I find akka's default behaviour of automatically restarting failed actors to be a highly dubious choice. I wonder how many actor based systems there are that should work in this manner (I realise it may be true of some but, I suspect, these would be in the minority). Certainly none of mine.
I'm afraid that, despite a few exchanges between ourselves and Jonas, I still found the failure model difficult to get my head around. I also found (at that time) the documentation hard to find. For example, you sent me the link to the actor lifecycle PDF - I had been looking for that for *ages*!
I realize that the new actors framework will be based on a new version of Akka, but it seems a bit over-confident to me to assume that, just because it is intended that migration be easier, there won't still be issues. That said, migrating the existing actors library to scalax and keeping it around is an acceptable solution.
Chris 

Date: Wed, 14 Dec 2011 12:08:56 +0100
Subject: Re: [scala-user] scala actors or akka? And what about the book
From: viktor...@gmail.com
To: oxbow...@hotmail.com
CC: philipp...@epfl.ch; tim.p...@optrak.com; scala...@googlegroups.com

Hi Chris,

On Wed, Dec 14, 2011 at 11:57 AM, Chris Marshall <oxbow...@hotmail.com> wrote:
Eek! May I request that the decision to remove them is based around feedback about how successful the "smooth transition path" ends up being?
 
Deprecating an entire library (and hence application architecture) is a wee bit more invasive than previous deprecations which (for the most part) could be dealt with by search & replace.

There's nothing that says that the scala actors can't be served on the side. The question is would maintain it.
 
For example, the current version of Akka has totally different failure sematics to Scala actors.

It is not the current version of Akka that will be the basis of the migration path, the 2.x series has pluggable fault handling.
 
I have found it deeply non-trivial to convert an application from Scala to Akka; to the extent that I gave up.

Was there something that we couldn't help out with on the akka ml?


 

Chris

> From: philipp...@epfl.ch
>
> Also, Scala 2.10 is going to provide a smoother migration path from scala.actors to Akka actors. In the next major release after 2.10, scala.actors will be removed.
>




--
Viktor Klang

Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland