SimpleXMLRPCServer
Jeremy Jones
zanesdad at bellsouth.net
Mon Sep 27 19:30:19 EDT 2004
Istvan Albert wrote:
> Yannick Turgeon wrote:
>
>> "Simple". What are its limitations?
>
>
> No limitations whatsoever ... it is "Simple" to use
>
> :-0
>
> Istvan.
>
Simple indeed. I don't know for sure the reasons for naming it
"Simple". But it may have to do with the fact that the out-of-the-box
SimpleXMLRPCServer will only handle one request at a time: a request
comes in, the server accepts that request, blocking until the method
call returns, and the response is sent back to the client. It does not
spawn a thread per request. It does not "select" among multiple
requests. It will not create a thread pool for you. If you want that
added functionality, you can write a little custom code to get it to
spawn a thread per request. A little more code to only spawn n number
of threads. A little more code still to create a thread pool. And if
you want a server that "select"s among multiple requests, I'm not 100%
sure, but I bet Twisted has one of those.
But I've got a good bit of confidence in the "SimpleXMLRPCServer." I've
written a small modification to spawn a thread per request and am about
to write a test harness to pound my underlying library to pieces through
the slightly modified SimpleXMLRPCServer. I'm hopeful for good results
- at least in robustness if not performance.
HTH,
Jeremy
More information about the Python-list
mailing list