By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,386 Members | 1,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,386 IT Pros & Developers. It's quick & easy.

xmlrpc / SimpleXMLRPCServer and multi-threading

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

Jul 18 '05 #2

P: n/a
Marco Aschwanden wrote:
How could the SimpleXMLRPCServer be turned into a multi-threaded
Server?


Look for ThreadingMixin in the SocketServer reference. You should be able to
create a new class derived from both SimpleXMLRPCServer and ThreadingMixIn
to achieve a thread-per-request server.

--
Shalabh

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.