akka/akka — pull request #1094 by patriknw (2013-01-31 08:42:28+00:00)
Title: Failing remote deployment, see #2983

* Share same instance of deadLetters between LARP and RARP

* Generate ChildTerminated from all Terminated in RemoteDeploymentWatcher

* The problem is that we do remote deployment to a node that isn't alive and with ordinary
remoting that is not detected at all, as we know. With cluster this was taken care of by
a later AddressTerminated and ChildTerminated generated by
RemoteDeploymentWatcher. With the new RemoteDeadLetters the additional watch
triggers an immediate Terminate which is captured by RemoteDeploymentWatcher
but not acted upon since it's not an addressTerminated. RemoteDeploymentWatcher
unwatch and will therefor not act on later AddressTerminated.
* The long term solution is to have reliable system messages and remote supervision
without explicit watch, so that we know that the remote deployment fails.
* This short term solution is to let RemoteDeploymentWatcher always generate
ChildTerminated, also for non-addressTerminated.
* It's possibly racy since ChildTerminated is not idempotent.

* FIXME question of how to handle removeChildWhenToAddressTerminated