[nanomsg] Re: A multiple client/worker for NN_PAIR style sockets.

  • From: Rohit Saboo <saboo.rohit@xxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Thu, 8 Jan 2015 10:48:35 -0800

Jason, that sound like a reasonable approach, too.

Alex, for each client there may be on average one message sent every second
or so. These messages may be command-like or they could be a request for
more voluminous updates not normally sent out.

On Thu, Jan 8, 2015 at 10:32 AM, Jason E. Aten <j.e.aten@xxxxxxxxx> wrote:

> On Thu, Jan 8, 2015 at 1:29 AM, Rohit Saboo <saboo.rohit@xxxxxxxxx> wrote:
>
>> Jason, goq does look quite interesting, and I'll certainly read it. I
>> initially tried using a combination of NN_PUSH and NN_PULL sockets and they
>> worked fine till I started running my clients on networks different from
>> the server. I haven't looked into your implementation in detail yet, but
>> the way I tried to implement it involved a client creating an NN_PUSH
>> socket, which it would connect to a bound server-side NN_PULL socket. The
>> client would also create a bound NN_PULL socket, and in the initial
>> handshake, it would send the address of this socket to the server. The
>> server would then create a new NN_PUSH socket and connect it to the
>> client's bound NN_PULL socket. Now if the client and server are on
>> different machines, and given that I cannot setup any sort of port
>> forwarding on the gateways in the client networks, what address should the
>> client send to the server in the initial handshake for the server to
>> connect back to?
>>
>
> You could have clients connect to the server using https or tcp, and then
> have the server proxy any communication from the workers back the clients
> over those same persistent https (tcp) connection.  As others have pointed
> out, nanomsg may be more useful for server <-> worker where you control the
> network.
>
>

Other related posts: