- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
scala actors or akka? And what about the book
Tue, 2011-12-13, 13:28
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
Tue, 2011-12-13, 23:21
#2
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
Wed, 2011-12-14, 00:51
#3
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
>
>
>
Wed, 2011-12-14, 01:01
#4
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
Wed, 2011-12-14, 12:01
#5
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.
>
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.
>
Wed, 2011-12-14, 12:11
#6
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:
There's nothing that says that the scala actors can't be served on the side. The question is would maintain it.
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.
Was there something that we couldn't help out with on the akka ml?
√
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
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
Wed, 2011-12-14, 15:51
#7
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:
There's nothing that says that the scala actors can't be served on the side. The question is would maintain it.
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.
Was there something that we couldn't help out with on the akka ml?
√
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
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
Wed, 2011-12-14, 16:01
#8
Re: scala actors or akka? And what about the book
Hi Chris,
2011/12/14 Chris Marshall <oxbow_lakes@hotmail.com>
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
}
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.
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.
The Scala lib is open source with a permissive license, so it will stay alive for as long as people want it to.
√
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
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
Wed, 2011-12-14, 16:31
#9
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:
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.
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.
Wed, 2011-12-14, 19:51
#10
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
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
Wed, 2011-12-14, 20:11
#11
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:
There is no more details at the moment.
Of course a way forward must exist prior to walking it.
You're most welcome.
Cheers,
√
--
Viktor Klang
Akka Tech LeadTypesafe - Enterprise-Grade Scala from the Experts
Twitter: @viktorklang
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
Fri, 2011-12-16, 16:21
#12
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:
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
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