[zeromq-dev] Can't bind same ZMQ_UP/DOWNSTREAM multiple times.
Oliver Smith
oliver at kfs.org
Tue Aug 17 20:43:04 CEST 2010
On 8/17/2010 4:02 AM, Pieter Hintjens wrote:
> Well, the question makes more sense now but (excuse my poor tired
> brain), there are still aspects escaping me.
>
> Do you want the second thread to take over the socket? Do you want to
> fair-share incoming connections so that one thread gets half of the
> connections, and the second thread the other half? Do you want each
> thread to get all the connections but then fair-queue messages between
> the two threads?
In the context of up/downstream, I want the /context/ to take the
connections and fair-queue messages between the consumer threads.
> And, sorry to be stubbornly stupid, I still don't see why you actually
> need to reuse the same address rather than a second one.
>
> Oliver, could you explain what semantics you expect by "multiple
> threads servicing the same socket?"
I have two groups of threads either side of a connection. Maybe its 4 on
the left and 16 on the right, or maybe 16 on the left and 4 on the
right. Maybe it's dynamic.
Problem is, someone has to bind the address for anyone to be able to
talk to it.
See the attached diagram (sorry for slopping drawing, no mouse :-)
Circles = endpoints, oblongs = workers.
Right now, to implement the "mid" endpoint, you either need a device or
a device-like concentrator (a worker that binds an address and allows
the workers on the right to connect to it, and then forwards messages
from the left to the right).
Which is, essentially, duplicating lots of work.
- Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: workers.jpg
Type: image/jpeg
Size: 12980 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100817/04403b47/attachment.jpg>
More information about the zeromq-dev
mailing list