Hi Bruce

>     I'll keep my ears to the ground meanwhile with AMQP. It shouldn't be
> too much hassle to adapt what the txAMQP dude has done for Twisted
> Python -- although they have the benefit of fantastic language support
> for continuations (yield).

Well, actually I'm the txAMQP dude :-) If you feel like implementing a Thrift
+ AMQP library, (which I still plan to do but joining efforts would be great)
here's what I did:

- Implement AMQP using an asynchronous library, in this case ASIO is the
perfect candidate, as it will be part of C++0x
- Implement client and server asynchronous transports for Thrift (using ASIO).
Have a look at the standard framed transport (TFramedTransport).
- Make the Thrift compiler generate client functions which return Deferreds
(futures) instead of real values. Also, you'll have to add some code in the
server for supporting asynchronous handler functions. Given that there will be
support for futures in C++0x, you won't need to roll your own version.
- Glue them together using a TMemoryBuffer, a special transport (e.g.
TwistedAMQPTransport in txAMQP) and the "reply-to" property in AMQP

Hope that helped, feel free to ask any details if you need more info.

BTW, here are the slides from the talk I gave at PyCon (and which I'll give at
EuroPython too) about Thrift, AMQP and Twisted:

http://us.pycon.org/2009/conference/schedule/event/28/

Let me know if you want to implement it in C++, I'd love to contribute :-)

Cheers

Reply via email to