Possible Duplicate:
Python XMLRPC with concurrent requests
I'm writing a python application which will act as xml-rpc server, using SimpleXMLRPCServer class.
Now my question is: what happens if 2 or more clients send a request at the same time? Are they queued? Do I have the guarantee that if two clients call the same or different functions they are executed one after another and not at the same time?
I believe the library implementation of SimpleXMLRPCServer
is indeed single-threaded. You have to add a mixin to make it serve requests in a multi-threaded way:
from SocketServer import ThreadingMixIn
from SimpleXMLRPCServer import SimpleXMLRPCServer
class MyXMLRPCServer(ThreadingMixIn, SimpleXMLRPCServer):
"""..."""
If you just need your application to process XML-RPC requests (more than one at a time if needed) you may take a look at Pythomnic framework.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With