Question about xmlrpc and threading

David Hirschfield davidh at ilm.com
Wed Feb 15 14:17:16 EST 2006


An xmlrpc client/server app I'm writing used to be super-simple, but now 
threading has gotten into the mix.

On the server side, threads are used to process requests from a queue as 
they come in.
On the client side, threads are used to wait on the results of requests 
to the server.

So the question is: how thread-safe is python xmlrpc? If the client 
makes a request of the server by calling:

result = server.doSomething()

and while that is waiting in the background thread to complete, the 
client calls another:

result = server.doSomethingElse()

will they interfere with each other? Right now I'm avoiding this problem 
by queueing up calls to the server to be processed sequentially in the 
background. But I'd prefer to allow requests to go in parallel. Should I 
just make a new connection to the server for each request?

Any advice appreciated,
-David

-- 
Presenting:
mediocre nebula.




More information about the Python-list mailing list