On 19/01/2012, at 9:58 AM, Martin Sustrik wrote: > On 18/01/12 22:07, Pieter Hintjens wrote: > >>> ZMQ_PAIR sockets don't really fit in to the zeromq philosophy. Including >>> them at all was probably a mistake. >> >> I strongly disagree, finding them perfect for a quite common use case :-) > > Both of the above are true. > > 0mq is mainly about communication between multiple endpoints which makes > PAIR kind of out of scope. > > However, using pair where raw TCP connection would be appropriate makes > the task much easier for the user. > > The trade-off here is between ideological purity and ease-of-use.
No there isn't: actually this is a challenge to carefully rethink the abstractions involved. You are claiming the "most abstract" case involves multiple endpoints M-N. Pieter is claiming (a) the 1-1 special case of that is particularly useful (b) if I read the comments correctly, he's claiming more than that: it isn't just a M=1, N=1 specialisation of the M-N case but also offers additional synchronisation assurances. and *I* claim you're both right. What's missing is the way to bind the additional functionality onto the M-N case. If ZMQ_PAIR were removed, what would you have to do to recover it? Why can't that be put into a library function? How can this be generalised so the functionality extends to M:N? I am guessing the difference is something like this: * Without ZMQ_PAIR all topolgies are dynamically constructed, which requires quite a lot of work and is error prone. * With ZMQ_PAIR one particular topology is statically guaranteed by ZMQ in the sense that it does the dynamics of the connection of the fixed topology for you (its responsibility, not yours). and from this description the missing abstraction pops out: the ability to configure more general topologies statically and have zmq make all the connections for you. So roughlty speaking "ZMQ_PAIR" is a special case of "network topology graph". -- john skaller [email protected] _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
