Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

programming with XML-RPC in Python

Skip to first unread message


Jul 24, 2002, 6:54:38 PM7/24/02

I put some things I tried at
(16K source files zipped) and I would be happy with comments or

It is a sort of client-server framework so you can turn your class
into an XML-RPC server without having to modify any code of the class.
It is also backwards compatible with python 1.5.2 (has
and adapted in the zip file). I want to do some
research with it and maybe somebody has good ideas :-)

Joost Jacob

Remember Darwin; building a better
mousetrap merely results in smarter mice.


Jul 25, 2002, 9:03:19 AM7/25/02
I put a new improved version at:

About this project:

Provide functions to turn a Python class into a server offering
selected methods from the class for remote usage via internet. The
server can also have a quit method and methods for adding and
managing clients and for sending events to the clients in an
asynchronous way (without waiting for a return value).
This way processes written in any computer language and running on
any OS platform could work together.

Design goals:
* Only use modules in the default Python distributions and supply
everything else. If possible stay backwards compatible with Python
version 1.5.2 until a higher Python version becomes the default at
most places.
* No modification of existing code necessary if you want to turn a
class into a server.

There is still a lot to do and to investigate:
* Stopping a server remotely is done with a global module variable,
this is looking ugly.
* The asynchronous event sending is not really asynchronous: it also
uses XML-RPC and does a synchronous method call in a thread.
Ideally it should use UDP instead of TCP? For this the server could
be equipped with a method that returns the location of an event
handler that accepts UDP events.
* The interface definition for servers is done with a simple list of
strings for the method names. Maybe a class-interface mechanism
would be a better design here.
* XML-RPC is used for remote method calls, I have no idea if XML-RPC
is the best choice for this but it certainly was the easiest to
implement (other choices were CORBA [what a hairy #$£%!] and SOAP
[fluctuating standard problems]).
* A function or class method to log in to another computer with your
username and password (encrypted!) and moving a running server over
there and letting all clients know the new location (host,port).
* Better documentation.

0 new messages