- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Actors in Scala vs. Scalaz vs. Akka
Hello
are there any notes on the various Actor-Implementations?
The Scalaz-Version looks awesome short and elegant, the Akka one
supports Transactors and Scala's own Actor is widely used.
Are there severe differences in basic Actor-funtionality between them?
Thanks, Kai










Re: Actors in Scala vs. Scalaz vs. Akka
Here's the summary as I understand it, this might be a good one for stackoverflow...
Built in actors:- Widely used and documented, good community support - support nested receive/react out of the box- had a memory leak (now fixed) in older versions
Lift Actors:- don't support nested receive/react out of the box, but the alternative is not too painful - share a common interface with Akka- widely used and supported via the lift group
Akka actors:- don't support nested receive/react out of the box, but the alternative is not too painful - have very good remote actor capabilities- have supervisor hierarchies- can also be used from Java, which is convenient for anyone undergoing a Java->Scala migration- share a common interface with Lift actors
Scalaz actors- have a general problem of being under-documented- scalaz does tend towards elegance (and also VERY advanced theory in places)
I'm sure there's more :)
2010/1/8 Kai Meder <stuff [at] kai [dot] meder [dot] info>
--
Kevin Wright
mail/google talk: kev [dot] lee [dot] wright [at] googlemail [dot] com
wave: kev [dot] lee [dot] wright [at] googlewave [dot] com
skype: kev.lee.wright
twitter: @thecoda
Re: Actors in Scala vs. Scalaz vs. Akka
It's probably worth saying that nested receive/react is thought by some to
be an anti-pattern, and that the alternative of modeling protocols as
explicit finite state machines is usually better design. This makes the
fact that the Scala actors support nested receive/react less of a win than
this list might imagine.
Re: Actors in Scala vs. Scalaz vs. Akka
import scala.actors.Actor._anActor ! 'message receive { case 'goodReply => println("yes!") case 'badReply => println("no!")}
On Sat, Jan 9, 2010 at 12:44 PM, Dave Griffith <dave [dot] l [dot] griffith [at] gmail [dot] com> wrote:
--
http://erikengbrecht.blogspot.com/
Re: Actors in Scala vs. Scalaz vs. Akka
BTW -> This is the reason (AFAICT) that you *need* a seperate GC for the Scala actors library.
In terms of Scalaz actors, the design is very simple and elegant. It has all the reconfigurability of the other actors libraries, but the all "out of the box" functionality might not have been written yet.
Scalaz actors have 3 customization points
1)
On Sat, Jan 9, 2010 at 1:04 PM, Erik Engbrecht <erik [dot] engbrecht [at] gmail [dot] com> wrote:
Re: Actors in Scala vs. Scalaz vs. Akka
http://code.google.com/p/scalaz/source/browse/trunk/core/src/main/scala/scalaz/concurrent/strategy/SwingStrategy.scala
-jason
On Sat, Jan 9, 2010 at 7:45 PM, Josh Suereth <joshua [dot] suereth [at] gmail [dot] com> wrote:
Understanding Scalaz
I am interested in Scalaz. It appears to be chock-full of goodies, but it seems to be hard to crack for run-of-the-mill ex-Java programmers like myself without a firm grounding in category theory or experience with purely functional languages. The Google Code site appears to be devoid of documentation (Not that there is anything wrong with that... :). Is there a recommended path of approach for would-be learners? Something like a collection of "Hey, you can do this: ..., isn't that neat?" examples, for instance, would be great. Sorry if I am missing something obvious.
Andreas
Re: Understanding Scalaz
Windemuth Andreas wrote:
> I am interested in Scalaz. It appears to be chock-full of goodies, but it seems to be hard to crack for run-of-the-mill ex-Java programmers like myself without a firm grounding in category theory or experience with purely functional languages. The Google Code site appears to be devoid of documentation (Not that there is anything wrong with that... :). Is there a recommended path of approach for would-be learners? Something like a collection of "Hey, you can do this: ..., isn't that neat?" examples, for instance, would be great. Sorry if I am missing something obvious.
>
> Andreas
>
>
>
>
There are some examples
http://code.google.com/p/scalaz/source/browse/continuous/#continuous/201...
They compile and run against trunk.
Re: Understanding Scalaz
Tony, Paolo, Jason,
Thanks for the tips. It seems the best route is to study Haskell first, if you have the time. I'll see what I can do...
I'd definitely be interested in that guide of Tony's.
Andreas
Re: Understanding Scalaz
Hi Andreas
If you are interested in Scalaz I would strongly suggest to
be somewhat acquainted with Haskell first.
Haskell is much more friendly (power of type inference,
do notation syntax, etc. etc...) to learn pure functional
programming concepts that are at the core of Scalaz.
It would be a very refreshing experience by itself and provide
a completely different approach to programming.
Paolo
Windemuth Andreas wrote:
>
> I am interested in Scalaz. It appears to be chock-full of goodies, but
> it seems to be hard to crack for run-of-the-mill ex-Java programmers
> like myself without a firm grounding in category theory or experience
> with purely functional languages. The Google Code site appears to be
> devoid of documentation (Not that there is anything wrong with that...
> :). Is there a recommended path of approach for would-be learners?
> Something like a collection of "Hey, you can do this: ..., isn't that
> neat?" examples, for instance, would be great. Sorry if I am missing
> something obvious.
>
> Andreas
>
>
Re: Re: Understanding Scalaz
I hope to not reference Haskell in the aforementioned user guide.
While I have started on such a guide, I am also pursuing a rather
detailed health complaint with the government and they have just
requested (even more!) documentation, which is sure to suck up all my
time in the near future.
Paolo Losi wrote:
> Hi Andreas
>
> If you are interested in Scalaz I would strongly suggest to
> be somewhat acquainted with Haskell first.
>
> Haskell is much more friendly (power of type inference,
> do notation syntax, etc. etc...) to learn pure functional
> programming concepts that are at the core of Scalaz.
>
> It would be a very refreshing experience by itself and provide
> a completely different approach to programming.
>
> Paolo
>
> Windemuth Andreas wrote:
>>
>> I am interested in Scalaz. It appears to be chock-full of goodies,
>> but it seems to be hard to crack for run-of-the-mill ex-Java
>> programmers like myself without a firm grounding in category theory
>> or experience with purely functional languages. The Google Code site
>> appears to be devoid of documentation (Not that there is anything
>> wrong with that... :). Is there a recommended path of approach for
>> would-be learners? Something like a collection of "Hey, you can do
>> this: ..., isn't that neat?" examples, for instance, would be great.
>> Sorry if I am missing something obvious.
>>
>> Andreas
>>
>>
>
>
Re: Understanding Scalaz
Tony has recently started work on a user guide. But for now, you could start by looking through some of the examples (in the sources here: http://code.google.com/p/scalaz/source/browse/trunk/example/src/main/scala/scalaz/)
A lot of the concepts are taken from Haskell, so you can learn a lot from the Haskell Wiki. It helps to have a solid understanding of implicits (views and parameters) in the Scala language, as these glue things together in the Scalaz implementation. Be prepared to carefully read type signatures, these will tell you more than the Scaladoc (especially when none is provided).
Please feel free to direct questions of any level to the Scalaz Google Group.
-jason
On Fri, Jan 15, 2010 at 3:51 PM, Windemuth Andreas <windemut [at] yahoo [dot] com> wrote:
Re: Actors in Scala vs. Scalaz vs. Akka
> Scalaz actors
> - have a general problem of being under-documented
> - scalaz does tend towards elegance (and also VERY advanced theory in
> places)
Indeed, I'm really waiting for an Introduction...
Re: Actors in Scala vs. Scalaz vs. Akka
Akka supports:
Transactional actors via STM
Persistent actor state via distributed storage (cassandra, mongoDB, redis)
OTP style supervisors
Excellent support for remote actors and dynamic clustering
+ a lot more
akkasource.org