SimpleXMLRPCServer-related questions

Brian Quinlan brian at sweetapp.com
Thu Oct 17 14:37:25 EDT 2002


> How do I start the SimpleXMLRPCServer(derived) object?

By calling either serve_forever(), or handle_request()

> Should I start it with inetd?

I don't know. Doesn't inetd use stdin and stdout instead of socket IO?
If so, it might be similar to using CGI, and you find examples of that
at:
http://www.sweetapp.com/xmlrpc/

> In this case, the SimpleXMLRPCServer class (or its ancestors) provides
any
> facility to get and record the PID for later use?

No

> How do I handle the service shutdown request in the SimpleXMLRPCServer
> case?

Maybe this will help:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/114579

> In a real-world application, should I use threads with
SimpleXMLRPCServer?

It depends on the quality of service that you intend to offer clients,
the maximum time it takes to complete a request, and the maximum load.

> Is there any tutorial/article on this topic? (I have read already the 
> recipe called "A simple XML-RPC Server", by Brian Quinlan, available 
> at the  ASPN - activestate web site. That's very good but not enough 
> for my needs).

Not that I know of. SimpleXMLRPCServer subclasses BaseHTTPServer, so you
might want to read the documentation for that. Then, if that still isn't
enough, you could read the SimpleXMLRPCServer source, which is quite
simple.

> Is there any complete (but simple) XML-RPC server that I can dissect
and
> study?

I could send you one, but it won't really show you anything that the
cookbook didn't.

Cheers,
Brian





More information about the Python-list mailing list