Question

I'm writing distributed BBS software using Akka 2.2.3 as remote message passing in Scala.

Then, I've found some problem in networking over the Internet through NAT: Akka doesn't recognize external IP address, AFAIK because it uses socket.bind.

Next, I thought that I can specify 0.0.0.0 as akka.remote.netty.tcp.hostname in order to adopt all interfaces and addresses to listen connections from the Internet side.

Here is the problem -- Akka uses 0.0.0.0 as its own IP address, and generates ActorRef like this: akka.tcp://system@0.0.0.0/user/foo.

Other nodes cannot refer the node using this ActorRef over the Internet. What should I do for connecting nodes over the Internet? Can't I use Akka over NAT?

Was it helpful?

Solution

Akka remoting does not support NAT, which is intentional since its purpose is just to enable clustering (i. e. symmetrical communication between a tightly controlled set of nodes). There are several protocols that have been devised for Internet-wide use, e. g. HTTP/REST (see Spray which is becoming Akka HTTP) or bare TCP using Akka IO.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top