Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Rafał Krzewski
W dniu środa, 2 listopada 2016 18:28:22 UTC+1 użytkownik Harinath Mallepally napisał: > > Hi Rafal, > > How do I get to stop my actor, if i want to? looks like I don't see an > option. we have defined actors that do certain activities when ordered to > do so and have life cycle, so we create

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Justin du coeur
On Wed, Nov 2, 2016 at 3:15 PM, Harinath Mallepally wrote: > If I got it right, this works perfectly fine as long as the consumer is > also a actor, how about doing this from outside of akka? I mean the > invocation of actor.tell happens outside of the akka? > That is exactly

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Harinath Mallepally
Thanks, If I got it right, this works perfectly fine as long as the consumer is also a actor, how about doing this from outside of akka? I mean the invocation of actor.tell happens outside of the akka? is it correct to say,If i am sure that my ActorSelection path is correct (an actor is created

Re: [akka-user] Re: Synchronization issue

2016-11-02 Thread Justin du coeur
An additional parameter or two to the ExecuteOnPlayersByPosition message? On Wed, Nov 2, 2016 at 1:21 PM, Steve Winfield wrote: > All right, what if I'd use messages instead of a callback (The players > handle their position by themselves)? > > In this case I want

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Justin du coeur
On Wed, Nov 2, 2016 at 1:28 PM, Harinath Mallepally wrote: > the ActorSystem.stop takes a ActorRef as input and not ActorSelection. > Also [1] says we preferable method to communicate with Actor is through > ActorRef and not through ActorSelection is this correct? > That's

Re: [akka-user] How to reference an existing actor?

2016-11-02 Thread Harinath Mallepally
Hi Rafal, How do I get to stop my actor, if i want to? looks like I don't see an option. we have defined actors that do certain activities when ordered to do so and have life cycle, so we create and then when we are done with it, we are stopping too. trying to avoid use deprecated methods now.

[akka-user] Re: Synchronization issue

2016-11-02 Thread Steve Winfield
All right, what if I'd use messages instead of a callback (The players handle their position by themselves)? In this case I want the selected players to be kicked out of the room so I could send ExecuteOnPlayersByPosition(position, LeaveRoom) to every single player and they would handle it

[akka-user] Re: Synchronization issue

2016-11-02 Thread Rafał Krzewski
Hi, the callbacks are definitely not a good idea. The idiomatic way is sending messages that are pure immutable data. In your case, this means that the ExecuteOnPlayersByPosition message should act as an envelope for another message specifying the details of the operation. It's not clear to me

Re: [akka-user] Synchronization issue

2016-11-02 Thread Justin du coeur
Honestly, it's problematic -- passing callbacks around like this can easily violate the invariants that make Actors work. (In particular, if the callback closes over any state in a different Actor, you're kind of begging for trouble.) By and large, any time you use the word "synchronization" in

[akka-user] Re: http proxy support

2016-11-02 Thread subopt1
http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0/scala/http/configuration.html also in the 2.4.11 docs but can't find that link at the moment prior to the client section, under host-connection-pool it says 1. # Please note that this section mirrors `akka.http.client` however is

[akka-user] Synchronization issue

2016-11-02 Thread Steve Winfield
Hey, I got a question regarding a project I'm working on. There are player actors that can be managed by a "player director" actor which belongs to a virtual room and supervises the players. A player maintains its current position and name as a mutable state. The director looks like this:

[akka-user] Re: http proxy support

2016-11-02 Thread André
Hi, this config was supported in Spray but wasn't yet ported over to akka-http. > Based on what I've read so far I need to enable the configuration and then it should work with Http().singleRequest > however it's not connecting through the proxy. May I ask where you got that info from? Cheers