[zeromq-dev] Are socket thread restrictions still in force?
Matt Weinstein
matt_weinstein at yahoo.com
Fri Aug 6 17:11:19 CEST 2010
On Aug 6, 2010, at 10:40 AM, Pieter Hintjens wrote:
> On Fri, Aug 6, 2010 at 4:04 PM, Matt Weinstein <mattweinstein at gmail.com
> > wrote:
>
>> But -- the sole worker thread has to do connects / reconnects due to
>> the current restriction that sockets are bound to threads. This
>> could
>> cause "slight" latencies :-(
>
> The restriction is still in place but will go away in the not so
> distant future.
>
> I'd recommend starting with what you have now, using either the
> connect/disconnect strategy, or PAIR sockets, but if abstract this
> sufficiently that you can move to a better design later with minimum
> pain.
I already have a zmq_reactor_pair function which returns an
"anonymous" (UUID) inproc socket pair, that will work fine.
> It may be that connect/disconnect works fine. Failover should
> be extremely rare in any case. Also it's not clear that moving a
> socket between threads will avoid the need to reconnect in any case
> (though it may be hidden).
>
I can understand the local case (rebuilding ypipes etc. under the
covers). In the distant case if you tear down a connection, you have
to have some way of guaranteeing that it can be rebuilt, not sure how
you guarantee the kernel will make that magic happen.
But I have a workaround, and appreciate the quick reply.
Thanks,
Best,
Matt
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list