I'm working on a twisted implementation of protocol buffers RPC here:
http://launchpad.net/txprotobuf/
http://bazaar.launchpad.net/~proppy/txprotobuf/master/changes
Feel free to join :)
Twisted:
Twisted is an event-driven networking engine written in
Python and licensed under the MIT license.
http://twistedmatrix.com/trac/
Protocol Buffers:
Protocol Buffers - Google's data interchange format
http://code.google.com/p/protobuf/
--
bou ^
if you take a look at the test code:
http://bazaar.launchpad.net/~proppy/txprotobuf/master/annotate/23?file_id=test_service.py-20080718124028-na73b03l2wxiv0v8-1
It shows how to make a call using txprotobuf.Proxy class with a
twisted procotol object:
102 22 def testProxy(self):
103 d = self.connectClient()
104 def clientConnected(protocol):
105 23 proxy = txprotobuf.Proxy(TestService_Stub(protocol))
106 22 request = TestRequest()
107 request.text = "proxycall"
108 d = proxy.TestMethod(request)
109 d.addCallback(lambda response:
self.assertEquals(response.text, request.text))
110 return d
111 d.addCallback(clientConnected)
112 return d
2008/7/22 [CPR]-AL.exe <CPR.A...@gmail.com>:
--
bou ^
Mmm... I wonder, what is TestService_Stub... it isn't defined in the
proto file, but is somehow imported from it...
2008/7/22 [CPR]-AL.exe <CPR.A...@gmail.com>:
--
bou ^