concept ReliableProxy in category akka

This is an excerpt from Manning's book Akka in Action.
Losing messages becomes an issue when you’re using remote actors. With remote actors, it’s a lot more likely for a message delivery failure to occur, especially when an intermediate unreliable network is involved. If someone unplugs an Ethernet cable, or a power failure shuts down a router, messages will be lost. To solve this problem, the ReliableProxy was created. This makes sending messages using remote actors almost as reliable as sending local messages. The only consideration is that critical errors in the JVMs of both the sender and receiver can negatively influence the reliability of this channel.
How does ReliableProxy work? When ReliableProxy starts, it creates a tunnel between the two ActorSystems on the different nodes.
As shown in figure 10.10, this tunnel has an entry, ReliableProxy, and an exit, Egress. Egress is an actor that’s started by ReliableProxy, and both actors implement checks and resend functionality to be able to keep track of which messages are delivered to the remote receiver. When delivery fails, ReliableProxy will retransmit messages until it succeeds. When Egress receives a message, it checks if it was already received and sends it to the actual receiver. But what happens when the target actor is terminated? When this happens it’s impossible to deliver the message. This is solved by ReliableProxy terminating also when the target terminates. This way the system behaves the same way as using a direct reference. On the receiver side, the difference between sending messages directly or using the proxy isn’t visible. One restriction of using ReliableProxy is that the tunnel is only one-way and for one receiver. This means that when the receiver replies to the sender, the tunnel is not used. When the reply has to be also reliable, then another tunnel has to be made between the receiver and the sender.