[Twisted-Python] Integrating Twisted with ZeroMQ

Itamar Turner-Trauring itamar at itamarst.org
Sun Jun 6 23:07:20 EDT 2010


On Mon, 2010-06-07 at 01:39 +0200, Laurens Van Houtven wrote:
> Whoops, something ate half my sentence.
> 
> My point was that most of the argument still stands, I think: just
> listenZMQ and connectZMQ get replaced by ZMQ Endpoints :)

1. SSL runs on top of TCP, yet Twisted has connectSSL/listenSSL and
endpoints for it. So the issue here is not the fact it runs over TCP.

2. I assume ZeroMQ "Sockets" have capabilities TCP doesn't, otherwise
what's the point? :) E.g. you mentioned pub/sub. So, assuming a ZeroMQ
endpoint and/or listen+connect methods, the *protocol* you would pass in
would be different than the standard protocols you'd use with TCP or
SSL, yes?

So, sounds like you want to define:
A) A way to hook up ZeroMQ event loop with Twisted event loop so that
both ZeroMQ and Twisted code can co-exist in same thread.

Then, expose ZeroMQ APIs to Python in a way that gives you:
B) A protocol class or interface.
C) An API for creating and hooking up these protocols to underlying
transports, i.e. ZeroMQ Sockets.

You could then release this as txZeroMQ; I'm not sure there's much
benefit in including this in Twisted, as opposed to standalone project.




More information about the Twisted-Python mailing list