[zeromq-dev] Router to router delay

Cem Karan cfkaran2 at gmail.com
Sat Jul 28 13:02:02 CEST 2012


Can you describe your system a bit more?  Are the peers on the same LAN, or do they need to peer across the internet?  Do the peers already know about each other (as in, a small group with well-known identities), or do they have to discover each other?  etc...

Thanks,
Cem Karan

On Jul 28, 2012, at 6:52 AM, Bjorn Reese wrote:

> I am writing a peer-to-peer system on top of a router-to-router
> connection. As there can be multiple peers, I set their identity.
> 
> It appears that router pairs have to exchange their identity before
> they can exchange messages. Any message I send before the identity
> is exhanged, are silently discarded.
> 
> The only solution I have seen to this problem, is to sleep for one
> second before sending the first message. Unfortunately, there is no
> guarantee that one second is sufficient. A slow connection may take
> longer than one second to exchange the identity. So this is not a
> feasible solution.
> 
> I see three alternatives:
> 
> 1. Let ZeroMQ queue the messages and send them once the identity has
>    been exchanged. This is my preferred solution seen from a users
>    point of view.
> 
> 2. Let zmq_send() return EAGAIN until the identity has been exchanged.
> 
> 3. Add an event to notify the application that the identity has been
>    exchanged (e.g. via the new zmq_ctx_monitor_event() functionality.)
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1581 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120728/94b9d217/attachment.bin>


More information about the zeromq-dev mailing list