Scala Deleted Members - Traps

When writing the Scala RemoteActor code, I noticed some pitfalls:

  • RemoteActor.classLoader = getClass (). getClassLoader () must be set to avoid the "java.lang.ClassNotFoundException" Link
  • doesnโ€™t always work because of a โ€œrace condition for which NetKernel (the entity responsible for sending messages remotely) that the remote actor supports can close before the proxy server of the remote operator (in particular, the trusted delegate) is able to send the message remotely by specifying local output. " (Stefan Tu)
  • RemoteActor.select does not always return the same delegate ( RemoteActor.select - is the result deterministic? )
  • Sending a delegate over the network prohibits normal shutdown ( unregistered RemoteActor )
  • Remote performers will not stop if RemoteActor.alive () and RemoteActor.register () are outlawed. (See Magnus Response)

Are there any other problems a programmer should be aware of?

+5
source share
1 answer

Here is another; you need to place the calls RemoteActor.alive () and RemoteActor.register () inside your action method when you define your actor, or the actor does not stop when you call exit (); see How to kill RemoteActor?

+2
source

All Articles