[Twisted-Python] Please recommend a RPC system working with twisted.

Hi all,
I'm looking for an RPC system working with twisted.
1. Binary. I want it run faster than any xml based RPC.
2. Bidirectional. Unlike HTTP, on which the client has to poll the sever for events, the server should "call" the client's method to notify events.
3. C/Python support. Part of the system shall be written in C.
4. Could easily integrated with twisted.
Unfortunately, there seems no such resolution existed. So maybe I have to give up some requirements.

On 2008.07.21 15:01:49 +0800, Peter Cai wrote:
I'm looking for an RPC system working with twisted.
Binary. I want it run faster than any xml based RPC.
Bidirectional. Unlike HTTP, on which the client has to poll the sever
for events, the server should "call" the client's method to notify events.
C/Python support. Part of the system shall be written in C.
Could easily integrated with twisted.
Twisted AMP meets all your requirements except C support, which you could probably add. (Or maybe avoid adding by using some other way to bridge C computing code with Python network code, like ctypes.)
Also take a look at Google's Protocol Buffers, which lacks C support but has C++ support. A Twisted version called txprotobuf was recently announced. (Note that Protocol Buffers isn't really a full RPC system, just the serialization part.)
I think combining these two might work nicely, though I haven't tried it yet.

Thanks.
I've done some research but seems that AMP does not have any C or CPP implementation.
As described in this thread, the python implementation of Google Buffer is not very mature, that's why I have gave it up.
https://groups.google.com/group/protobuf/browse_thread/thread/9acb7638e1f5ff...
I think I shall try to make ICE work with twisted, although thread synchronization might be a problem.
BTW : If you are interested in RPC, have a look at
On Mon, Jul 21, 2008 at 9:18 PM, David Ripton dripton@ripton.net wrote:
On 2008.07.21 15:01:49 +0800, Peter Cai wrote:
I'm looking for an RPC system working with twisted.
Binary. I want it run faster than any xml based RPC.
Bidirectional. Unlike HTTP, on which the client has to poll the
sever
for events, the server should "call" the client's method to notify
events.
C/Python support. Part of the system shall be written in C.
Could easily integrated with twisted.
Twisted AMP meets all your requirements except C support, which you could probably add. (Or maybe avoid adding by using some other way to bridge C computing code with Python network code, like ctypes.)
Also take a look at Google's Protocol Buffers, which lacks C support but has C++ support. A Twisted version called txprotobuf was recently announced. (Note that Protocol Buffers isn't really a full RPC system, just the serialization part.)
I think combining these two might work nicely, though I haven't tried it yet.
-- David Ripton dripton@ripton.net
Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

On 02:16 am, newptcai@gmail.com wrote:
I've done some research but seems that AMP does not have any C or CPP implementation.
I think I shall try to make ICE work with twisted, although thread synchronization might be a problem.
In my humble opinion, implementing AMP in C would be a lot easier than dealing with thread synchronization issues. The benefits of Twisted will evaporate pretty quickly once you are in that territory.
If I had more than 30 seconds to write this reply, I'd probably write it myself to prove the point ;).

On Mon, Jul 21, 2008 at 3:18 PM, David Ripton dripton@ripton.net wrote:
Twisted AMP meets all your requirements except C support, which you could probably add. (Or maybe avoid adding by using some other way to bridge C computing code with Python network code, like ctypes.)
Also take a look at Google's Protocol Buffers, which lacks C support but has C++ support. A Twisted version called txprotobuf was recently announced. (Note that Protocol Buffers isn't really a full RPC system, just the serialization part.)
I think combining these two might work nicely, though I haven't tried it yet.
Hi, I recently added a C++ RPC implementation using boost.asio, in txprotobuf-asio branches.
You can check it out there: http://bazaar.launchpad.net/~proppy/txprotobuf/asio/files bzr branch lp:~proppy/txprotobuf/asio
Hope that helps.

On Mon, Jul 21, 2008 at 3:01 AM, Peter Cai newptcai@gmail.com wrote:
Hi all,
I'm looking for an RPC system working with twisted.
Binary. I want it run faster than any xml based RPC.
Bidirectional. Unlike HTTP, on which the client has to poll the sever
for events, the server should "call" the client's method to notify events.
C/Python support. Part of the system shall be written in C.
Could easily integrated with twisted.
Unfortunately, there seems no such resolution existed. So maybe I have to give up some requirements.
twisted.protocols.amp looks like the closest thing: it's a very simple, efficient protocol for remote procedure calls. I can't point you directly at a C implementation, but I think there may be a C++ implementation somewhere. In any case, it would be pretty simple to implement.
participants (5)
-
Christopher Armstrong
-
David Ripton
-
glyph@divmod.com
-
Johan Euphrosine
-
Peter Cai