[zeromq-dev] ZeroMQ How can server mantain connections with all clients?

Alexander Voron voron.alexander at gmail.com
Sun Aug 26 18:23:11 CEST 2012


I have the following task:

Clients connect to a server on 1 port (e.g. 8080). The server should
remember them and after completing calculation it should send results
to the clients. After that server gets some results again and again
sends it to all clients. And so on.

How can server mantain connections with all clients?

I considered PUP\SUB pattern, but my server and clients can sit at
different networks\behind NAT. I've found some code uses PUB\SUB model
and works with NAT here
http://grokbase.com/t/zeromq/zeromq-dev/112q9934vg/nat-firewall-pub-sub-traversal
however I have no idea how it works, how can publisher send messge
behind NAT.

I think the most robust solution is connection should be initiated by client.

Thanks.



More information about the zeromq-dev mailing list