xmlrpc / SimpleXMLRPCServer and multi-threading

vivek at cs.unipune.ernet.in vivek at cs.unipune.ernet.in
Mon Dec 29 06:48:31 EST 2003


On Mon, Dec 29, 2003 at 02:47:35AM -0800, Marco Aschwanden wrote:
> I would like to develop a server based on python's xmlrpc. But I
> realized that SimpleXMLRPCServer does not spawn a thread for each
> request.
> 
> How could the SimpleXMLRPCServer be turned into a multi-threaded
> Server?
> Is there a reason why the SimpleXMLRPCServer is not multi-threaded?
> Is there a plan to make it multi-threaded?
> 
> Thanks for any hints in advance,
> Cheers,
> Marco

I had also faced the same problem some time ago. To use the SimpleXMLRPCServer as a multithreaded server, I just changed the SocketServer.TCPServer to SocketServer.ThreadingTCPServer in the definition of the SimpleXMLRPCServer class and it worked fine for me. But it was on Python 2.2 and I haven't tried on later versions.

HTH,
Vivek Kumar





More information about the Python-list mailing list