Hi!
We've used Akka 2.0 since its release and it's been a pure pleasure so
say the least. The only thing I can complain a little about
is the actor naming part which I wish could be replaced by some
strategy. I can understand the reasoning to restrict the available
characters to those in URL (or was it URI?), but I think we would be
able to change that if we now what we're doing. I don't remember
exactly if this would have an impact on the remoting stuff, but it
would be like "If you change this you're on your own".
We have a lot
of actors that need to be looked up by name, and we can't change that
naming part. They contain the characters åäö sometimes, and
now I'm using a murmur hash of the strings to name the actors. It's
kind of tedious to do this in every place where needed, and it's much
harder to follow what's happening in the log files without passing on
the "real" name everywhere.
This is my only complaint and it's a small one. But important for us
in our system.
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?
- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.
- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.
- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".
- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.
- Actor tests tend to be "slow" compared to standard unit tests, where a hundred or so should run in about a second. Parallelizing Actor tests isn't possible using the examples placed in the documentation. It would be nice to see some strategies for speeding up these tests with some parallelism. I've done a bit of work here and it works out well, but it does it by using many ActorSystems. It might be nice to have the TestKit expose the different "systems" to each test (but obviously not all different ActorSystems) that have a specific User Guardian. Generally this is where we hit problems with parallelism because we have multiple tests working with the same Actor path. If we could make the paths unique within the same system by introducing test-specific guardians, that might help (?).
I think that's it for now :)
On 2012-05-24, at 8:00 AM, √iktor Ҡlang wrote:Dear hAkkers,Now it's almost been 3 months since we released Akka 2.0, and we, the committers would really appreciategetting some feedback on what your experiences have been during the past months.If you cannot share this publically, please feel free to send the feedback to me personally and I'll keep it confidential.Elicitinguser feedback is the key ingredient in making sure that Akka evolves in the right direction and that problems aretaken care of.Looking forward to hearing about your Akka 2.0 experiences!Cheers,√--
Viktor Klang
Akka Tech Lead
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Hi Derek!On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.
On Thu, May 24, 2012 at 2:48 PM, √iktor Ҡlang <viktor...@gmail.com> wrote:
Hi Derek!On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?
If I want to create an Actor on machine "X" outside of my ActorSystem, then I have to send a message to "something" on machine "X" that makes the Actor and sends me the reference. Obviously something already does this (since it has to for Deploy). All I'm suggesting is that we get access to that, already correct, functionality.
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.
Ah, I was under the impression that it made for slower functionality. Bushiness makes for big "children" structures and thus increases the searching time. So what you're saying is that I can create a /user/MobileDevices and then create 2 million children of that and everything's cool?
That would be awesome. In many cases I am not concerned with hierarchy at all. I just need to represent a ton of "stuff" out there in the world and the "world" doesn't have a natural hierarchy that I can use to make a non-busy tree.
Thus, if I want to spread things down the tree I have to make an artificial set of inner nodes.
But again, if you're saying that's cool, then I'm a happy dood.
- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.You can easily do this yourself by having each actor register themselves in a global registry (actor/object/or so). Don't think we want to do this as default since it will be quite costly to do.
And my claim is that many people might want this. If we could get it by a simple mixin of our Actor, then that might be a nice feature.
WDYM?- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.It's bad because it's a heavyweight structure, it will allocate threads for the scheduler, the dispatchers etc, and as you all know, you can't create infinite threads.We're making some progress regarding this for 2.1 where you'll be able to reuse the same EC for many ActorSystems (with the downside that they'll be stepping on eachotehrs toes if you are not careful), but I don't see how we'll ever get away from having one thread per scheduler.
OK, can this maybe go in the docs?
- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".No, you don't need to do that, just keep the root clean so you have a reasonable fault tolerance strategy. Also, creating top-level actors is currently a blocking operation since it's done from outside the guardian, there is a ticket to work around this by cheating, but it has yet to be implemented, but is slated for Mingus.
See above. I think I'm happy, assuming /user/MobileDevices can be the parent of a couple of million children.
- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.This is already possible using relative lookups in actorFor, no?
Not that I'm aware of. "context.actorFor(../../)" is different than "context.actorFor(../../../)". When I insert something in the tree, my actor should be doing ../../../ instead of ../../, but it doesn't know that, and since it's getting only an ActorRef, clearly the compiler can't help me. I claim it might be better to have "context.actorForAncesestorNamed(guy above me)".
- Actor tests tend to be "slow" compared to standard unit tests, where a hundred or so should run in about a second. Parallelizing Actor tests isn't possible using the examples placed in the documentation. It would be nice to see some strategies for speeding up these tests with some parallelism. I've done a bit of work here and it works out well, but it does it by using many ActorSystems. It might be nice to have the TestKit expose the different "systems" to each test (but obviously not all different ActorSystems) that have a specific User Guardian. Generally this is where we hit problems with parallelism because we have multiple tests working with the same Actor path. If we could make the paths unique within the same system by introducing test-specific guardians, that might help (?).There's no real reason why actor tests should be slow, but if you create an ActorSystem for every test, and use Thread.sleep and/or Await.result everywhere, then of course it'll be slower. This is mainly due to the silly structure imposed by testing frameworks that expect a test to be synchronous, would be much better if you could return a Future[TestResult].
They're absolutely slower when you have message passing. It can be one or two orders of magnitude slower. If you have "addTen(5) must be (15)" then this is way faster than "expectMsg(AddTenResult(15))". Now multiply that by 100 tests. The time to compile and test is now getting to be far longer than it takes me to make code changes to be tested. It hurts the edit-compile-test cycle.
I think that's it for now :)Excellent feedback, thanks!
Cheers,
Derek
On Thu, May 24, 2012 at 4:00 PM, Derek Wyatt <de...@derekwyatt.org> wrote:On Thu, May 24, 2012 at 2:48 PM, √iktor Ҡlang <viktor...@gmail.com> wrote:Hi Derek!On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?
If I want to create an Actor on machine "X" outside of my ActorSystem, then I have to send a message to "something" on machine "X" that makes the Actor and sends me the reference. Obviously something already does this (since it has to for Deploy). All I'm suggesting is that we get access to that, already correct, functionality.
The idea is to avoid creating actors from the outside, since that is by natura a racy operation, which is also why system.actorOf is problematic
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.
Ah, I was under the impression that it made for slower functionality. Bushiness makes for big "children" structures and thus increases the searching time. So what you're saying is that I can create a /user/MobileDevices and then create 2 million children of that and everything's cool?It's backed by a tree, so you have O(log N) access to kidsThat would be awesome. In many cases I am not concerned with hierarchy at all. I just need to represent a ton of "stuff" out there in the world and the "world" doesn't have a natural hierarchy that I can use to make a non-busy tree.The tree is for fault-tolerance, thinking about the failure hierarchy of your system makes it a lot easier to structure it.Thus, if I want to spread things down the tree I have to make an artificial set of inner nodes.
But again, if you're saying that's cool, then I'm a happy dood.You shouldn't optimize prematurely. We're doing that for you. All we ask is that you keep root actors to a minimum, think about your failure hierarchy and try to create Actors and have them stopped when they are obsolete.
- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.You can easily do this yourself by having each actor register themselves in a global registry (actor/object/or so). Don't think we want to do this as default since it will be quite costly to do.
And my claim is that many people might want this. If we could get it by a simple mixin of our Actor, then that might be a nice feature.Create an Extension and I'll reference it in the docs!WDYM?- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.It's bad because it's a heavyweight structure, it will allocate threads for the scheduler, the dispatchers etc, and as you all know, you can't create infinite threads.We're making some progress regarding this for 2.1 where you'll be able to reuse the same EC for many ActorSystems (with the downside that they'll be stepping on eachotehrs toes if you are not careful), but I don't see how we'll ever get away from having one thread per scheduler.
OK, can this maybe go in the docs?Sure, will land in master ASAP.- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".No, you don't need to do that, just keep the root clean so you have a reasonable fault tolerance strategy. Also, creating top-level actors is currently a blocking operation since it's done from outside the guardian, there is a ticket to work around this by cheating, but it has yet to be implemented, but is slated for Mingus.
See above. I think I'm happy, assuming /user/MobileDevices can be the parent of a couple of million children.Please try and report back!- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.This is already possible using relative lookups in actorFor, no?
Not that I'm aware of. "context.actorFor(../../)" is different than "context.actorFor(../../../)". When I insert something in the tree, my actor should be doing ../../../ instead of ../../, but it doesn't know that, and since it's getting only an ActorRef, clearly the compiler can't help me. I claim it might be better to have "context.actorForAncesestorNamed(guy above me)".
What if you change the ancestors name?
- Actor tests tend to be "slow" compared to standard unit tests, where a hundred or so should run in about a second. Parallelizing Actor tests isn't possible using the examples placed in the documentation. It would be nice to see some strategies for speeding up these tests with some parallelism. I've done a bit of work here and it works out well, but it does it by using many ActorSystems. It might be nice to have the TestKit expose the different "systems" to each test (but obviously not all different ActorSystems) that have a specific User Guardian. Generally this is where we hit problems with parallelism because we have multiple tests working with the same Actor path. If we could make the paths unique within the same system by introducing test-specific guardians, that might help (?).There's no real reason why actor tests should be slow, but if you create an ActorSystem for every test, and use Thread.sleep and/or Await.result everywhere, then of course it'll be slower. This is mainly due to the silly structure imposed by testing frameworks that expect a test to be synchronous, would be much better if you could return a Future[TestResult].
They're absolutely slower when you have message passing. It can be one or two orders of magnitude slower. If you have "addTen(5) must be (15)" then this is way faster than "expectMsg(AddTenResult(15))". Now multiply that by 100 tests. The time to compile and test is now getting to be far longer than it takes me to make code changes to be tested. It hurts the edit-compile-test cycle.
Since an Actor can do approx 3million messages per second on my machine, the difference in time, even if you have hundreds of tests, should be negligible, unless you're ceating ActorSystems & do blocking ops (or other potentially costly initialization logic)
On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.WDYM?- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.It's bad because it's a heavyweight structure, it will allocate threads for the scheduler, the dispatchers etc, and as you all know, you can't create infinite threads.We're making some progress regarding this for 2.1 where you'll be able to reuse the same EC for many ActorSystems (with the downside that they'll be stepping on eachotehrs toes if you are not careful), but I don't see how we'll ever get away from having one thread per scheduler.- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".No, you don't need to do that, just keep the root clean so you have a reasonable fault tolerance strategy. Also, creating top-level actors is currently a blocking operation since it's done from outside the guardian, there is a ticket to work around this by cheating, but it has yet to be implemented, but is slated for Mingus.
- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.This is already possible using relative lookups in actorFor, no?
- Actor tests tend to be "slow" compared to standard unit tests, where a hundred or so should run in about a second. Parallelizing Actor tests isn't possible using the examples placed in the documentation. It would be nice to see some strategies for speeding up these tests with some parallelism. I've done a bit of work here and it works out well, but it does it by using many ActorSystems. It might be nice to have the TestKit expose the different "systems" to each test (but obviously not all different ActorSystems) that have a specific User Guardian. Generally this is where we hit problems with parallelism because we have multiple tests working with the same Actor path. If we could make the paths unique within the same system by introducing test-specific guardians, that might help (?).There's no real reason why actor tests should be slow, but if you create an ActorSystem for every test, and use Thread.sleep and/or Await.result everywhere, then of course it'll be slower. This is mainly due to the silly structure imposed by testing frameworks that expect a test to be synchronous, would be much better if you could return a Future[TestResult].
On 24 May 2012 10:12, √iktor Ҡlang <viktor...@gmail.com> wrote:On Thu, May 24, 2012 at 4:00 PM, Derek Wyatt <de...@derekwyatt.org> wrote:On Thu, May 24, 2012 at 2:48 PM, √iktor Ҡlang <viktor...@gmail.com> wrote:Hi Derek!On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?
If I want to create an Actor on machine "X" outside of my ActorSystem, then I have to send a message to "something" on machine "X" that makes the Actor and sends me the reference. Obviously something already does this (since it has to for Deploy). All I'm suggesting is that we get access to that, already correct, functionality.
The idea is to avoid creating actors from the outside, since that is by natura a racy operation, which is also why system.actorOf is problematic
Well, I couldn't avoid it :) And yes, it was tricky and not 100% correct, I'm sure. This is why I'm saying that the imposed hierarchy is the biggest impact (or so it would seem). If it's problematic, and I can't avoid it, then I'm probably going to screw it up. I was hoping that the experts could help me not screw it up.
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.
Ah, I was under the impression that it made for slower functionality. Bushiness makes for big "children" structures and thus increases the searching time. So what you're saying is that I can create a /user/MobileDevices and then create 2 million children of that and everything's cool?It's backed by a tree, so you have O(log N) access to kidsThat would be awesome. In many cases I am not concerned with hierarchy at all. I just need to represent a ton of "stuff" out there in the world and the "world" doesn't have a natural hierarchy that I can use to make a non-busy tree.The tree is for fault-tolerance, thinking about the failure hierarchy of your system makes it a lot easier to structure it.Thus, if I want to spread things down the tree I have to make an artificial set of inner nodes.
But again, if you're saying that's cool, then I'm a happy dood.You shouldn't optimize prematurely. We're doing that for you. All we ask is that you keep root actors to a minimum, think about your failure hierarchy and try to create Actors and have them stopped when they are obsolete.
Well, I wasn't trying to optimize prematurely. I was reacting to, what I thought was, an issue with bushy trees that already existed.
- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.You can easily do this yourself by having each actor register themselves in a global registry (actor/object/or so). Don't think we want to do this as default since it will be quite costly to do.
And my claim is that many people might want this. If we could get it by a simple mixin of our Actor, then that might be a nice feature.Create an Extension and I'll reference it in the docs!WDYM?- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.It's bad because it's a heavyweight structure, it will allocate threads for the scheduler, the dispatchers etc, and as you all know, you can't create infinite threads.We're making some progress regarding this for 2.1 where you'll be able to reuse the same EC for many ActorSystems (with the downside that they'll be stepping on eachotehrs toes if you are not careful), but I don't see how we'll ever get away from having one thread per scheduler.
OK, can this maybe go in the docs?Sure, will land in master ASAP.- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".No, you don't need to do that, just keep the root clean so you have a reasonable fault tolerance strategy. Also, creating top-level actors is currently a blocking operation since it's done from outside the guardian, there is a ticket to work around this by cheating, but it has yet to be implemented, but is slated for Mingus.
See above. I think I'm happy, assuming /user/MobileDevices can be the parent of a couple of million children.Please try and report back!- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.This is already possible using relative lookups in actorFor, no?
Not that I'm aware of. "context.actorFor(../../)" is different than "context.actorFor(../../../)". When I insert something in the tree, my actor should be doing ../../../ instead of ../../, but it doesn't know that, and since it's getting only an ActorRef, clearly the compiler can't help me. I claim it might be better to have "context.actorForAncesestorNamed(guy above me)".
What if you change the ancestors name?
I wasn't. The point is moot. I changed the hierarchy, not the name.
- Actor tests tend to be "slow" compared to standard unit tests, where a hundred or so should run in about a second. Parallelizing Actor tests isn't possible using the examples placed in the documentation. It would be nice to see some strategies for speeding up these tests with some parallelism. I've done a bit of work here and it works out well, but it does it by using many ActorSystems. It might be nice to have the TestKit expose the different "systems" to each test (but obviously not all different ActorSystems) that have a specific User Guardian. Generally this is where we hit problems with parallelism because we have multiple tests working with the same Actor path. If we could make the paths unique within the same system by introducing test-specific guardians, that might help (?).There's no real reason why actor tests should be slow, but if you create an ActorSystem for every test, and use Thread.sleep and/or Await.result everywhere, then of course it'll be slower. This is mainly due to the silly structure imposed by testing frameworks that expect a test to be synchronous, would be much better if you could return a Future[TestResult].
They're absolutely slower when you have message passing. It can be one or two orders of magnitude slower. If you have "addTen(5) must be (15)" then this is way faster than "expectMsg(AddTenResult(15))". Now multiply that by 100 tests. The time to compile and test is now getting to be far longer than it takes me to make code changes to be tested. It hurts the edit-compile-test cycle.
Since an Actor can do approx 3million messages per second on my machine, the difference in time, even if you have hundreds of tests, should be negligible, unless you're ceating ActorSystems & do blocking ops (or other potentially costly initialization logic)
Well, I'm telling you that I saw an increase when I went parallel. You asked for feedback, I'm giving it to you :)
Hi Derek,24 maj 2012 kl. 14:48 skrev √iktor Ҡlang:On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?Perhaps sharing your “own way” would help us understand which problem you are getting at.
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.WDYM?- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.It's bad because it's a heavyweight structure, it will allocate threads for the scheduler, the dispatchers etc, and as you all know, you can't create infinite threads.We're making some progress regarding this for 2.1 where you'll be able to reuse the same EC for many ActorSystems (with the downside that they'll be stepping on eachotehrs toes if you are not careful), but I don't see how we'll ever get away from having one thread per scheduler.- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".No, you don't need to do that, just keep the root clean so you have a reasonable fault tolerance strategy. Also, creating top-level actors is currently a blocking operation since it's done from outside the guardian, there is a ticket to work around this by cheating, but it has yet to be implemented, but is slated for Mingus.He’s not talking about top-level actors, but about intermediary supervisors whose only job is supervision. Since the Akka 2.0 way is still shiny and new and people are just starting to try out the quality of the black-top, there is no collection of common use patterns, yet. The simplest one—injecting a supervision level—could be provided in some kind of DSL, but you can already achieve this effect today:context.actorOf(Props[MyChild].withRouter(RoundRobinRouter(1).withSupervisorStrategy(…)))It’s a little circumspect but it does the job. Pull requests for improved DSLs are always welcome ;-)
- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.This is already possible using relative lookups in actorFor, no?Yes, unless you changed the structure of the tree by adding/removing levels. But I think that such changes cannot be ignored in the general case, i.e. if you are tying things together so closely that they look one another up using relative paths, then changing the tree will likely break the whole setup also in other ways.
- Actor tests tend to be "slow" compared to standard unit tests, where a hundred or so should run in about a second. Parallelizing Actor tests isn't possible using the examples placed in the documentation. It would be nice to see some strategies for speeding up these tests with some parallelism. I've done a bit of work here and it works out well, but it does it by using many ActorSystems. It might be nice to have the TestKit expose the different "systems" to each test (but obviously not all different ActorSystems) that have a specific User Guardian. Generally this is where we hit problems with parallelism because we have multiple tests working with the same Actor path. If we could make the paths unique within the same system by introducing test-specific guardians, that might help (?).There's no real reason why actor tests should be slow, but if you create an ActorSystem for every test, and use Thread.sleep and/or Await.result everywhere, then of course it'll be slower. This is mainly due to the silly structure imposed by testing frameworks that expect a test to be synchronous, would be much better if you could return a Future[TestResult].What do you mean by parallelizing being impossible? Our test suite is run in parallel (takes less then half a minute on a beefy box, compared to 10 minutes for sequential execution). And we create one ActorSystem per test class. The only thing to watch out for is not to bind to hard-coded ports in the tests, i.e. always configure remoting on port zero.
I don’t get the comment about exposing specific guardians, could you please explain?
Hi Derek!On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?
The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.
- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.
You can easily do this yourself by having each actor register themselves in a global registry (actor/object/or so). Don't think we want to do this as default since it will be quite costly to do.
WDYM?
- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.It's bad because it's a heavyweight structure, it will allocate threads for the scheduler, the dispatchers etc, and as you all know, you can't create infinite threads.We're making some progress regarding this for 2.1 where you'll be able to reuse the same EC for many ActorSystems (with the downside that they'll be stepping on eachotehrs toes if you are not careful), but I don't see how we'll ever get away from having one thread per scheduler.
- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".
No, you don't need to do that, just keep the root clean so you have a reasonable fault tolerance strategy. Also, creating top-level actors is currently a blocking operation since it's done from outside the guardian, there is a ticket to work around this by cheating, but it has yet to be implemented, but is slated for Mingus.
- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.
This is already possible using relative lookups in actorFor, no?
- Actor tests tend to be "slow" compared to standard unit tests, where a hundred or so should run in about a second. Parallelizing Actor tests isn't possible using the examples placed in the documentation. It would be nice to see some strategies for speeding up these tests with some parallelism. I've done a bit of work here and it works out well, but it does it by using many ActorSystems. It might be nice to have the TestKit expose the different "systems" to each test (but obviously not all different ActorSystems) that have a specific User Guardian. Generally this is where we hit problems with parallelism because we have multiple tests working with the same Actor path. If we could make the paths unique within the same system by introducing test-specific guardians, that might help (?).
There's no real reason why actor tests should be slow, but if you create an ActorSystem for every test, and use Thread.sleep and/or Await.result everywhere, then of course it'll be slower. This is mainly due to the silly structure imposed by testing frameworks that expect a test to be synchronous, would be much better if you could return a Future[TestResult].
I think that's it for now :)Excellent feedback, thanks!
For any of the casual readers of this discussion,this is exactly the sort of feedback that is needed since this really shows what painpoints people have,so feel free to chime in, there is no "wrongs" here.
On Thu, May 24, 2012 at 4:29 PM, Derek Wyatt <de...@derekwyatt.org> wrote:On 24 May 2012 10:12, √iktor Ҡlang <viktor...@gmail.com> wrote:On Thu, May 24, 2012 at 4:00 PM, Derek Wyatt <de...@derekwyatt.org> wrote:On Thu, May 24, 2012 at 2:48 PM, √iktor Ҡlang <viktor...@gmail.com> wrote:Hi Derek!On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?
If I want to create an Actor on machine "X" outside of my ActorSystem, then I have to send a message to "something" on machine "X" that makes the Actor and sends me the reference. Obviously something already does this (since it has to for Deploy). All I'm suggesting is that we get access to that, already correct, functionality.
The idea is to avoid creating actors from the outside, since that is by natura a racy operation, which is also why system.actorOf is problematic
Well, I couldn't avoid it :) And yes, it was tricky and not 100% correct, I'm sure. This is why I'm saying that the imposed hierarchy is the biggest impact (or so it would seem). If it's problematic, and I can't avoid it, then I'm probably going to screw it up. I was hoping that the experts could help me not screw it up.
Comparing the imposed structure with what we had before, when very few would ever use a supervisor I think we've greatly improved on the default quality of Actor code,of course there is more work to be done!
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.
Ah, I was under the impression that it made for slower functionality. Bushiness makes for big "children" structures and thus increases the searching time. So what you're saying is that I can create a /user/MobileDevices and then create 2 million children of that and everything's cool?It's backed by a tree, so you have O(log N) access to kidsThat would be awesome. In many cases I am not concerned with hierarchy at all. I just need to represent a ton of "stuff" out there in the world and the "world" doesn't have a natural hierarchy that I can use to make a non-busy tree.The tree is for fault-tolerance, thinking about the failure hierarchy of your system makes it a lot easier to structure it.Thus, if I want to spread things down the tree I have to make an artificial set of inner nodes.
But again, if you're saying that's cool, then I'm a happy dood.You shouldn't optimize prematurely. We're doing that for you. All we ask is that you keep root actors to a minimum, think about your failure hierarchy and try to create Actors and have them stopped when they are obsolete.
Well, I wasn't trying to optimize prematurely. I was reacting to, what I thought was, an issue with bushy trees that already existed.Would you mind doing a quick test to verify if it's a problem or not? (trying to wrap up the binary compat work I've been doing the past week)
- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.You can easily do this yourself by having each actor register themselves in a global registry (actor/object/or so). Don't think we want to do this as default since it will be quite costly to do.
And my claim is that many people might want this. If we could get it by a simple mixin of our Actor, then that might be a nice feature.Create an Extension and I'll reference it in the docs!WDYM?- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.It's bad because it's a heavyweight structure, it will allocate threads for the scheduler, the dispatchers etc, and as you all know, you can't create infinite threads.We're making some progress regarding this for 2.1 where you'll be able to reuse the same EC for many ActorSystems (with the downside that they'll be stepping on eachotehrs toes if you are not careful), but I don't see how we'll ever get away from having one thread per scheduler.
OK, can this maybe go in the docs?Sure, will land in master ASAP.- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".No, you don't need to do that, just keep the root clean so you have a reasonable fault tolerance strategy. Also, creating top-level actors is currently a blocking operation since it's done from outside the guardian, there is a ticket to work around this by cheating, but it has yet to be implemented, but is slated for Mingus.
See above. I think I'm happy, assuming /user/MobileDevices can be the parent of a couple of million children.Please try and report back!- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.This is already possible using relative lookups in actorFor, no?
Not that I'm aware of. "context.actorFor(../../)" is different than "context.actorFor(../../../)". When I insert something in the tree, my actor should be doing ../../../ instead of ../../, but it doesn't know that, and since it's getting only an ActorRef, clearly the compiler can't help me. I claim it might be better to have "context.actorForAncesestorNamed(guy above me)".
What if you change the ancestors name?
I wasn't. The point is moot. I changed the hierarchy, not the name.But if you change the hierarchy you might as well change names, right? I'm just saying that if you change stuff, you'll have to change stuff :-)
- Actor tests tend to be "slow" compared to standard unit tests, where a hundred or so should run in about a second. Parallelizing Actor tests isn't possible using the examples placed in the documentation. It would be nice to see some strategies for speeding up these tests with some parallelism. I've done a bit of work here and it works out well, but it does it by using many ActorSystems. It might be nice to have the TestKit expose the different "systems" to each test (but obviously not all different ActorSystems) that have a specific User Guardian. Generally this is where we hit problems with parallelism because we have multiple tests working with the same Actor path. If we could make the paths unique within the same system by introducing test-specific guardians, that might help (?).There's no real reason why actor tests should be slow, but if you create an ActorSystem for every test, and use Thread.sleep and/or Await.result everywhere, then of course it'll be slower. This is mainly due to the silly structure imposed by testing frameworks that expect a test to be synchronous, would be much better if you could return a Future[TestResult].
They're absolutely slower when you have message passing. It can be one or two orders of magnitude slower. If you have "addTen(5) must be (15)" then this is way faster than "expectMsg(AddTenResult(15))". Now multiply that by 100 tests. The time to compile and test is now getting to be far longer than it takes me to make code changes to be tested. It hurts the edit-compile-test cycle.
Since an Actor can do approx 3million messages per second on my machine, the difference in time, even if you have hundreds of tests, should be negligible, unless you're ceating ActorSystems & do blocking ops (or other potentially costly initialization logic)
Well, I'm telling you that I saw an increase when I went parallel. You asked for feedback, I'm giving it to you :)Absolutely! This feedback is great, but without proof that this is an issue, it's hard for me to fix anything, I just know that our internal tests are highly parallel and benefit greatly from beefier hardware, so it's working out really well for us. If you have an example to show I'd love to have a stab at it!
On Thu, May 24, 2012 at 2:48 PM, √iktor Ҡlang <viktor...@gmail.com> wrote:Hi Derek!On Thu, May 24, 2012 at 2:38 PM, Derek Wyatt <de...@derekwyatt.org> wrote:
Before I start griping, it needs to be said that Akka 2.0 is a major step forward. It's a great piece of software and the team should be commended.I think the biggest stumbling block is the imposed Actor hierarchy. All in all it's a good thing, don't get me wrong, but it's the first real thing that Akka has done that "gets in my way", and in a round-about way it seems to be what Christer has hit as well.- I wanted to use Deploy because it's such a great and easy way to launch Actors remotely, but I didn't want it in the same ActorSystem. I had to cook up my own way of doing it. Can we see the Guardian code exposed some how to make this easier to do?WDYM?
If I want to create an Actor on machine "X" outside of my ActorSystem, then I have to send a message to "something" on machine "X" that makes the Actor and sends me the reference. Obviously something already does this (since it has to for Deploy). All I'm suggesting is that we get access to that, already correct, functionality.
- Some examples regarding the layout of Actors in the ActorSystem would also be nice. "Bushy" trees are bad, but how bushy is too bushy? Is it only lookup that is hurt by the bushiness or is it something else?The only thing I've ever stated clearly is "do not create too many top level actors" this is mainly due to the fact that the fault-tolreance part is shot to shit since any malfunctioning piece risks taking everything down.
Ah, I was under the impression that it made for slower functionality. Bushiness makes for big "children" structures and thus increases the searching time. So what you're saying is that I can create a /user/MobileDevices and then create 2 million children of that and everything's cool? That would be awesome. In many cases I am not concerned with hierarchy at all. I just need to represent a ton of "stuff" out there in the world and the "world" doesn't have a natural hierarchy that I can use to make a non-busy tree. Thus, if I want to spread things down the tree I have to make an artificial set of inner nodes.
But again, if you're saying that's cool, then I'm a happy dood.
- Can we get a fast lookup tool for Actors? Further to Christer's issue on naming, if the user is diligent and uses unique names for everything, then from their point of view the path isn't relevant for uniqueness. Lookup is a simple hash table in that case.You can easily do this yourself by having each actor register themselves in a global registry (actor/object/or so). Don't think we want to do this as default since it will be quite costly to do.
And my claim is that many people might want this. If we could get it by a simple mixin of our Actor, then that might be a nice feature.
WDYM?- We've heard that many ActorSystems is "bad". Specifically knowing "why" would be a good thing, I think.It's bad because it's a heavyweight structure, it will allocate threads for the scheduler, the dispatchers etc, and as you all know, you can't create infinite threads.We're making some progress regarding this for 2.1 where you'll be able to reuse the same EC for many ActorSystems (with the downside that they'll be stepping on eachotehrs toes if you are not careful), but I don't see how we'll ever get away from having one thread per scheduler.
OK, can this maybe go in the docs?
- Given that the hierarchy is there, and we have some restrictions on how the hierarchy is built up, we may find that we have to insert a number of "invisible" nodes to satisfy that hierarchy - e.g. when something becomes too bushy, we need to insert a layer of artificial parent nodes that increase the depth of the tree. It would be nice if Akka supplied some of these. For example, "Supervisor-only".No, you don't need to do that, just keep the root clean so you have a reasonable fault tolerance strategy. Also, creating top-level actors is currently a blocking operation since it's done from outside the guardian, there is a ticket to work around this by cheating, but it has yet to be implemented, but is slated for Mingus.
See above. I think I'm happy, assuming /user/MobileDevices can be the parent of a couple of million children.
- The structure of the hierarchy can make applications brittle as the hierarchy gets shuffled around - assuming you're looking up by path. If we insert nodes into the hierarchy then the paths change. Can we get a more flexible lookup scheme? For example, I posted a piece of code a while back that was called "FindAncestor". This helps when, what was the parent, becomes the grandparent due to a supervisor that was put in the middle. FindAncestor finds the "parent" either way.This is already possible using relative lookups in actorFor, no?
Not that I'm aware of. "context.actorFor(../../)" is different than "context.actorFor(../../../)". When I insert something in the tree, my actor should be doing ../../../ instead of ../../, but it doesn't know that, and since it's getting only an ActorRef, clearly the compiler can't help me. I claim it might be better to have "context.actorForAncesestorNamed(guy above me)".
2.0.x has been a big improvement over 1.x, thank you!the most prominent suggestion i'd have is:a registry (or section in the documentation or samples) of common usage patterns.
i'd venture to say actor based programming is a paradigm shift for many looking at akka, such a registry can only aid adoption.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/3ZLTkQheXd8J.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
+ always having to wrap my actors in 'Props()' even though i've never needed to change a prop seems arbitrary and annoying
+ keep forgetting it log.warning() instead of log.warn() like most other loggers i've used
+ it took me an embarrassingly long time to realize that if i run system.shutdown() i can ctrl-d back to sbt rather then having to killall -9 java
+ ByteString seems too slow for my needs, sad because i love the IO api (Vector.apply() shows up a lot under jvisualvm)
+ having an exponential backoff option for OneForOne and AllForOne would be really handy
--To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/VxiowC5cZS8J.
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
On Fri, May 25, 2012 at 6:13 AM, srparish <srpa...@gmail.com> wrote:The idea is that you have the possibility to reuse and extend Props.
> + always having to wrap my actors in 'Props()' even though i've never needed
> to change a prop seems arbitrary and annoying
It is just 7 chars more don't think it is that bad:
actorOf[T]
actorOf(Props[T])
Not sure that justifies a special case.
Also, if you hate dots you can say
context actorOf Props[T]
which even is shorter than the otherwise required
context actorOf manifest[T]
(if you are into that sort of thing ;-) )
>> + ByteString seems too slow for my needs, sad because i love the IO apiWasn’t there an improvement under way? https://github.com/akka/akka/pull/462
>> (Vector.apply() shows up a lot under jvisualvm)
>
> Well, safety has a (small) price. You can of course send Array[Byte]
> around if you like.
>
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
On Fri, May 25, 2012 at 2:18 PM, Scott Parish <srpa...@gmail.com> wrote:On Fri, May 25, 2012 at 3:10 AM, Jonas Boner <jo...@jonasboner.com> wrote:On Fri, May 25, 2012 at 6:13 AM, srparish <srpa...@gmail.com> wrote:The idea is that you have the possibility to reuse and extend Props.
> + always having to wrap my actors in 'Props()' even though i've never needed
> to change a prop seems arbitrary and annoying
It is just 7 chars more don't think it is that bad:
actorOf[T]
actorOf(Props[T])
Not sure that justifies a special case.I keep forgetting to import it. Not a big deal, i'm getting use to it.By the way, most of the things i listed feel fairly whiny. For the most park akka 2 is extremely well thought out, so it's hard to think of flaws that aren't petty or bike sheds.No worries. We asked for whining. You provided it. Everyone is happy. Thank you.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
--
Jonas Bonér
CTO
Typesafe - The software stack for applications that scale
Phone: +46 733 777 123
Twitter: @jboner
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Scheduler returns Cancellable. Cancellable isn't thread-safe, and only tells you if it's already been canceled or not. It would be much nicer if it could tell you if it is too late to cancel. This is fine for best effort, but for some situations one needs to know if you successfully canceled the action or not. I worked around this by "pure evil": I passed an AtomicBoolean in the message and held onto it locally so the remote and local actors could race to cancel or perform the action. Would be much nicer if that was built into Cancellable.
ThankssRp
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Even if the job was remote, it seems it should be possible to have a form of cancel() that would return a Future[Boolean] of if you successfully cancelled or if it already fired. I'd gladly take the extra round trips for the cases i need it (if it were optional)
On Fri, May 25, 2012 at 3:24 PM, Scott Parish <srpa...@gmail.com> wrote:Even if the job was remote, it seems it should be possible to have a form of cancel() that would return a Future[Boolean] of if you successfully cancelled or if it already fired. I'd gladly take the extra round trips for the cases i need it (if it were optional)Scott, yes, I'm not saying it's impossible, I'm just saying it's that sort of consensus operations that make systems scale poorly, so we avoid it.You can always create a Scheduler that has stricter guarantees.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Dear hAkkers,Now it's almost been 3 months since we released Akka 2.0, and we, the committers would really appreciategetting some feedback on what your experiences have been during the past months.If you cannot share this publically, please feel free to send the feedback to me personally and I'll keep it confidential.Elicitinguser feedback is the key ingredient in making sure that Akka evolves in the right direction and that problems aretaken care of.Looking forward to hearing about your Akka 2.0 experiences!Cheers,√
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/RPJ0HgMbQtoJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/yfdFZ4mFJ74J.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
+ keep forgetting it log.warning() instead of log.warn() like most other loggers i've usedAh, good one! Happens to me at times as well. Sort of seems a bit unintuitive considering "info" is not "inform"/"information"
Roland Kuhn
Typesafe – The software stack for applications that scale.
twitter: @rolandkuhn
List is more expensive for nontrivial uses.
Cheers,
V
>
> Regards
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/YcU9SBBDSkwJ.
On May 26, 2012 11:49 AM, "tim8dev" wrote:
>
> Hi, first of all: Akka 2.0 is awesome!
>
> After heart about Stash "by accident" here on the mailing list. I would like to ask for more documentation in Akka. If somebody quickly points me to the place where I would be able to write, I would be happy to do that.
>
> Actually, I was trying to implement Stash by myself, before I used it. But of course, I didn't used the Dequeue Mailbox so I actually tried to process the messages directly by invoking receive(msg), but then I had to mess around with sender. So great that there is Stash and you/we should point it out in the doc.
>
> One small question, though: Why use Vector and not List or ListBuffer. The Stash is a stack, so we don't need random access but only need fast append xor prepend, so why not List?List is more expensive for nontrivial uses.
Cheers,
V
>
> Regards
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/YcU9SBBDSkwJ.
>
> To post to this group, send email to
> To unsubscribe from this group, send email to
Hey,a little bit late to the party but since I did not work with Akka 1.0 and started using 2.0 without any prior experience with the framework here are my findings.First of all I must say that not only Akka is awesome but the documentation is fantastic. Most of the time all my questions are answered via the docs and it is not necessary to ask on the mailing list.
There are only smaller issues that I currently face using Akka:
- Best practicesIt would be really nice to have some more real world examples and best practices. In particular I would love to see more strategies for handling failure. For instance I have two actors, A sends a message to B and does something when B replies back to A. Of course I could use a Future but since there is some overhead involved I do not want to use it and rather go with the more lightweight fire-and-forget approach. However the question is when should I go for a Future, when is fire-and-forget better. Should A start a timer and dispatch a message to itself to consider B dead if no message is received within x amount of time?
I know that this needs to be answered on a case by case basis but a general hint and how to approach those issues would be nice.
Another problem I have is the code structure. Maybe it is a question of taste but it would be great to have some kind of standard on how to organize actors and their messages. For instance a) put messages in a companion object or b) put actor and messages in the same package. What happens if multiple actors share the same message type?
- Get or CreateThe main issue I currently face and without a solution is: how do I get or create an actor, especially when it happens in a cluster. This is mostly again an issue with the first statement about best practices and failure handling. I could send a message to a possibly dead actor and await a reply, if it does not happen I will create the actor myself but this would lead to a race condition (for multiple nodes) so I am currently expecting that you guys will solve this for me in the meantime ;) I can imagine ZooKeeper comes in place with a lock that would need to be exposed but only internal to Akka.
- Cluster DefinitionI was quite surprised when I learned that EventBus will not send messages to other nodes of a cluster. It would be nice to have a list of things that are expected to be clusterable and others that are not.
Keep up the great work,
Joa
On Saturday, May 26, 2012 12:11:11 PM UTC+2, √ wrote:
On May 26, 2012 11:49 AM, "tim8dev" wrote:
>
> Hi, first of all: Akka 2.0 is awesome!
>
> After heart about Stash "by accident" here on the mailing list. I would like to ask for more documentation in Akka. If somebody quickly points me to the place where I would be able to write, I would be happy to do that.
>
> Actually, I was trying to implement Stash by myself, before I used it. But of course, I didn't used the Dequeue Mailbox so I actually tried to process the messages directly by invoking receive(msg), but then I had to mess around with sender. So great that there is Stash and you/we should point it out in the doc.
>
> One small question, though: Why use Vector and not List or ListBuffer. The Stash is a stack, so we don't need random access but only need fast append xor prepend, so why not List?List is more expensive for nontrivial uses.
Cheers,
V>
> Regards
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/YcU9SBBDSkwJ.
>
> To post to this group, send email to> To unsubscribe from this group, send email to> For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/axR39ZPnEqYJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
On Thursday, May 24, 2012 8:00:07 AM UTC-4, √ wrote:
Dear hAkkers,Now it's almost been 3 months since we released Akka 2.0, and we, the committers would really appreciategetting some feedback on what your experiences have been during the past months.If you cannot share this publically, please feel free to send the feedback to me personally and I'll keep it confidential.Elicitinguser feedback is the key ingredient in making sure that Akka evolves in the right direction and that problems aretaken care of.Looking forward to hearing about your Akka 2.0 experiences!Cheers,√
--
Viktor Klang
Akka Tech Lead
+ having an exponential backoff option for OneForOne and AllForOne would be really handy
On Thursday, May 24, 2012 8:00:07 AM UTC-4, √ wrote:
Dear hAkkers,Now it's almost been 3 months since we released Akka 2.0, and we, the committers would really appreciategetting some feedback on what your experiences have been during the past months.If you cannot share this publically, please feel free to send the feedback to me personally and I'll keep it confidential.Elicitinguser feedback is the key ingredient in making sure that Akka evolves in the right direction and that problems aretaken care of.Looking forward to hearing about your Akka 2.0 experiences!Cheers,√--
Viktor Klang
Akka Tech Lead...Very much +1 on this.+ having an exponential backoff option for OneForOne and AllForOne would be really handy
We have external systems that go down for sometimes short, sometimes long maintenance windows. An exponential back-off gives the flexibility for both without trading off a quick initial response for something more transient than a maintenance window. I think when this came up before on the ML there was a question of running out of memory because the downed actor's mailbox fills up while the supervisor is waiting to restart, so there's some component of backpressure needed.
We're still using Akka 1.3, and I know we didn't correctly set up our supervisors initially. Based on that experience, IMO the addition of structure - the move to an Actor hierarchy is a big plus. We've got a migration to 2.x on the roadmap, will have more feedback then.
I guess one person's getting in the way is another's framework, 2 sides - same coin.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/-Ro3_SBJawUJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
To unsubscribe from this group, send email to akka-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/B6Kab09BRXYJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
It's working out great for us. We have been using akka for over a
year and we currently have 3 modules of our software platform in akka
2. Thanks for all the hard work and innovation, looking forward to
seamless cloud integration.
Sean
> Typesafe <http://www.typesafe.com/> - The software stack for applications
On May 24, 8:00 am, √iktor Ҡlang <viktor.kl...@gmail.com> wrote:
> Dear hAkkers,
>
> Now it's almost been 3 months since we released Akka 2.0, and we, the
> committers would really appreciate
> getting some feedback on what your experiences have been during the past
> months.
> If you cannot share this publically, please feel free to send the feedback
> to me personally and I'll keep it confidential.
>
> Elicitinguser feedback is the key ingredient in making sure that Akka
> evolves in the right direction and that problems are
> taken care of.
>
> Looking forward to hearing about your Akka 2.0 experiences!
>
> Cheers,
> √
>
> --
> Viktor Klang
>
> Akka Tech Lead
> that scale
>
> Twitter: @viktorklang
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/pZiPbBcVxikJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.