Hi Jim,

On 7 March 2014 at 10:25:10, Björn Antonsson ([email protected]) 
wrote:

Hi Jim,

On 7 March 2014 at 06:38:48, Jim Newsham ([email protected]) wrote:



On Wednesday, March 5, 2014 10:10:41 PM UTC-10, Björn Antonsson wrote:
Hi Jim,
On 6 March 2014 at 07:45:19, Jim Newsham ([email protected]) wrote:



On Monday, March 3, 2014 4:55:04 PM UTC-10, Jim Newsham wrote:
Does Akka provide a means to stop/start the remoting subsystem?  

Can anyone confirm whether this is supported in Akka or not?


It is not possibe to only shut down the remoting subsystem in Akka and keep the 
ActorSystem running. The remoting transports are internal to the 
RemoteActorRefProvider and you really can’t access them from the outside.





And if not, any suggestions on how we might be able to add this functionality?  
I've spent a bit of time reading the source, however I'm a Java developer with 
not too much experience in Scala.  I suspect I should be able to add a 
disconnect functionality by implementing a transport adapter, but I don't know 
how I would get access to the appropriate object to initiate the disconnect 
command.  I see how transport adapters are layered and pass management commands 
down the stack, but I haven't found where (if at all) user-level code can 
inject management commands into the transport.


So I’m still not sure that I understand what you would gain from shutting down 
the communication. The remoting does a lot of things under the hood, like 
failure detection, and will probably try to open up the communication again.

Here's an analogy:  the writers of Socket provide a close() method, because 
lacking such mechanism, the only way to close a socket connection would be via 
System.exit(), which would be very restrictive.  Bringing it back to Akka, it 
seems like the only way to shut down remote communication is to stop the actor 
system, which to me is restrictive, and also quite surprising.  

If I implemented a way to shut down the transport, I understand that the 
remoting system would continue to attempt to reconnect periodically according 
to the configured parameters.  My assumption is that this would be relatively 
harmless.



Maybe I misunderstood your intention. Are you saying that you want to shut down 
the remoting in the actor system completely? This is not possible since the 
remoting is an integral part of the ActorSystem if you configure it with 
remoting enabled. Either you opt in to have remoting on, by adding the 
RemoteActorRefProvider or you got for the LocalActorRefProvider.

It might be that your use case isn’t suitable for akka remoting and you’re 
better off using akka.io.Tcp for your remote communication.

B/

So what would the purpose be of shutting down the connection be then, if it is 
reopened automatically again?

You also have to be careful how you shut it down, or the remoting might deem 
the other system as “dead” and then you have to restart that system to be able 
to connect back to the first one.



B/




 


There is a transport adapter that we use for testing that can drop packets and 
is controlled from the test code. It could be used as a starting point.

https://github.com/akka/akka/blob/master/akka-remote/src/main/scala/akka/remote/transport/FailureInjectorTransportAdapter.scala

Thanks, I'll look into this. 

Jim
 
B/





Thanks!
Jim

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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/groups/opt_out.



-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

--
>>>>>>>>>> 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.

-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

-- 
>>>>>>>>>>      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