On Sun, Jun 6, 2010 at 2:59 PM, Laurens Van Houtven email@example.com wrote:
A potential option for Twisted, which some people don't quite like, would be to have a listenZMQ and connectZMQ, analogous to listenTCP/listenUDP/listenSSL and the respective connect*s. I think this makes more sense to the ZeroMQ people (who think of ZeroMQ as a layer "next to" TCP which happens to be implemented on top of TCP, on top of which you build your stuff) than the Twisted people (who think of ZeroMQ's protocol as yet another TCP-using protocol just like HTTP for example). Having worked with both pieces of software, the more I play with ZeroMQ the more I think listenZMQ/connectZMQ make sense. ZeroMQ really tries to be one of those things and it shows. What ZeroMQ wants to do is semantically much closer to the existing connects and listens. I'm not just making this up: the ZeroMQ people have reviewed this and this is really what ZeroMQ wants to be.
At the moment I only feel compelled to respond to this point in particular.
We don't want to have any more transport-specific methods on the reactor, and this has nothing to do with ZMQ. We also don't want to have connectSOCKS, or listenSerialPort. Fortunately, the endpoints API was very recently merged to Twisted trunk, so any new transport-specific connectors/listeners can be implemented in terms of its interfaces. listenTCP and so forth should eventually be deprecated in preference to the endpoints APIs.
1: Source: http://twistedmatrix.com/trac/browser/trunk/twisted/internet/endpoints.py ticket: http://twistedmatrix.com/trac/ticket/1442