Hi Liang,

8 maj 2014 kl. 18:08 skrev Liang Tang <[email protected]>:

> Guys,
> 
> First Question:
> I have a question related to Multiple client remoting. Assume we have a 
> server actor is started with its hostname and port.

You mean ActorSystem, right?

> I need to launch multiple client actors to report worker status to this 
> server. These clients actors don't receive any remote messages, and only 
> send. Is there some way to configure these clients without ports, like 
> traditional actors, Or, is there way to repeatedly use the same port? 

If my guess is right and you mean ActorSystem in all places where you say 
“Actor” then no, neither is possible. Please have a look at the docs which 
explain that Akka remoting is only peer-to-peer.

> 
> Or, Does actor receive any message where the sender is not an actor? In this 
> case, we are able to initialize java scheduleexecutor to send various 
> messages to one client actor, and let it handle the sending them to server 
> actor?

No, only actors can send messages to actors. The reason is simply that without 
a reply you will never know whether the message arrived, so if you care about 
the message you will have to be able to receive a reply at the sending actor.

> 
> 
> The Second Question:
> Does actor shutdown context.system.shutdown() close its port?

Yes, but if you are tempted to repeatedly create and destroy ActorSystems then 
please take my advice to just not do not ;-) You should keep the ActorSystems 
running, they are heavy objects and take a long time to start up and shut down. 
You can configure the port number to zero in order to have them pick a free TCP 
port automatically, though. Only your “server” system needs a known port which 
the workers talk to.

Regards,

Roland

> 
> Thanks!!!
> 
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.



Dr. Roland Kuhn
Akka Tech Lead
Typesafe – Reactive apps on the JVM.
twitter: @rolandkuhn


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to