Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-12 Thread 'Konstantinos Kougios' via Akka User List
well, it could, but requires more work and it is more complex than having any actor .watch() for events. Especially in my case that I need to watch for termination across the cluster, I would need a round trip to all parents (where as now I am just doing the round trip to the actors straight a

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread Patrik Nordwall
Thanks for elaborating. I still don't understand why the databaseServer can't watch its index children and recreate them when it receives Terminated. Regarding recreating the databaseServer itself (top level I guess) in tests I would not reuse the name. fre 9 okt. 2015 kl. 18:54 skrev 'Konstantino

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread 'Konstantinos Kougios' via Akka User List
A solution like this could work, but it is a lot more complicated (complexity added just to handle actor termination). The databaseServer actor is not affected by the deaths of the indexes. Btw, all my Terminated actors are local (same ActorSystem, same jvm) to the watcher, does that help? O

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread Michael Frank
instead of using actor paths to send directly to the index actor, why not send your message to the /databaseServer actor, which then forwards the message to the appropriate index actor? the databaseServer actor would contain a Map[String,ActorRef] which maps index name to index actor (which ar

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread 'Konstantinos Kougios' via Akka User List
well, I am using actor paths to find the actors, which are unique per ActorSystem. I.e. paths are ../databaseServer ../databaseServer/index:x1 ../databaseServer/index:x2 I am using the akka cluster, so each "server" will have these paths. Now when I do a "dropIndex" and drop index x1, actor

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread Patrik Nordwall
it's probably easies to not reuse the name On Fri, Oct 9, 2015 at 1:23 PM, 'Konstantinos Kougios' via Akka User List < akka-user@googlegroups.com> wrote: > Well, I have this component based on 1 actor. It is the "flow" thing I was > talking a few months ago, anyway it does take care of a process

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread 'Konstantinos Kougios' via Akka User List
Well, I have this component based on 1 actor. It is the "flow" thing I was talking a few months ago, anyway it does take care of a process between different actors. One thing it does is to stop an other actor and wait till it is terminated. I need to make sure the other actor is really terminat

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread Patrik Nordwall
On Fri, Oct 9, 2015 at 12:59 PM, 'Konstantinos Kougios' via Akka User List < akka-user@googlegroups.com> wrote: > oh... in that case my code changes won't work. The watcher is not the > parent of the actor. > > Will it work if the watcher is child of the same parent of the Terminated > actor? > n

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-09 Thread 'Konstantinos Kougios' via Akka User List
oh... in that case my code changes won't work. The watcher is not the parent of the actor. Will it work if the watcher is child of the same parent of the Terminated actor? On 09/10/15 06:08, Patrik Nordwall wrote: Note that this advice is correct but only when the parent actor receives the

Re: [akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-08 Thread Patrik Nordwall
Note that this advice is correct but only when the parent actor receives the Terminated, i.e. it does not hold for top level actors where you can only watch from the "outside". tors 8 okt. 2015 kl. 11:46 skrev Kostas kougios < kostas.koug...@googlemail.com>: > Thanks, I am doing that now and hopef

[akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-08 Thread Kostas kougios
Thanks, I am doing that now and hopefully it works (the issue occurred very rarely, so I have to wait and see) On Friday, 2 October 2015 17:16:35 UTC+1, Ryan Tanner wrote: > > Don't create the replacement actor until you've received a Terminated > message for the original actor. > > On Friday, O

[akka-user] Re: is there a way to know when *really* an actor has stopped

2015-10-02 Thread Ryan Tanner
Don't create the replacement actor until you've received a Terminated message for the original actor. On Friday, October 2, 2015 at 8:58:54 AM UTC-6, Kostas kougios wrote: > > I create a named actor, stop it and recreate it with the same name. > Because stop is async, I end up with exceptions li