Anyone using the SOAPpy library?

Andrew Bennetts andrew-pythonlist at puzzling.org
Fri Feb 27 00:24:56 EST 2004


On Fri, Feb 27, 2004 at 04:56:01AM +0000, Bill wrote:
> Is anyone using the SOAPpy library?  I just started looking at this was was 
> pretty impressed with how easy it is to set up a server, the readme gives a 
> short example of a 'hello' sever/client.
> 
> But I realized the server doesn't deal with multiple requests, if you set 
> up a more serious and send something to the server, then a second, it waits 
> until the first is completed.  Now what I'd like to do is have it deal with 
> multiple client at a time.  I've seen proxies and it looks like the way to 
> do it is with asyncore (and maybe asynchat) but haven't figured it out.
> 
> Could anyone tell how it is done, or point me in the right direction?

Twisted has SOAP support built on top of SOAPpy:
    http://twistedmatrix.com/documents/howto/xmlrpc#auto4

Note that like asyncore, Twisted is asynchronous and does all its IO in a
single thread, so a single request can block the entire server if you write
blocking code.  The Twisted docs cover various techniques for dealing with
this problem, and the mailing list is very helpful.

With Twisted's SOAP support, the simplest way is probably to make your
soap_foo handler methods call reactor.deferToThread to do blocking work in a
thread, but threads aren't the only way to achieve concurrency.

-Andrew.





More information about the Python-list mailing list