[Twisted-Python] Moving from PB to other RPC protocols

Justin Mazzola Paluska jmp at MIT.EDU
Fri Apr 25 05:42:41 MDT 2008


Hi,

I’m using PB to connect together various servers in my application.
In the application clients connect to a “master” server, which then
farms out work to “worker” servers.  The master server exports PB
objects with two types of functions: (1) accessors that return PB
Cacheables and (2) mutators that change the state of the server (and
consquently alter any outstanding Cacheables).  In the past all of our
client programs (some wx, a GTK client, and some command line tools)
were all written in Python.

Now, however, we want to integrate two new applications with our
system.  One is a web application with a developer who’d rather write
a WSGI application and use some blocking RPC method and the other is a
large C++ application that can’t be re-written in Python.

How do we get everyone to communicate?  In order to support these new
applications, it looks like our master server will need to offer two
interfaces: one PB and one something else.

- I imagine that we can choose any old RPC method (XML-RPC, json-rpc,
  random protocol over HTTP) to implement our mutator functions.  In
  the Twisted mailing list archives, most people recommend XML-RPC,
  though json-rpc looks intruiging (especially for the web stuff).
  
- Is there any common RPC mechanism with anything like Cacheables?  I
  loathe to have these new applications polling the server all the
  time when they could just be waiting for something.

Thanks,
	—Justin




More information about the Twisted-Python mailing list