xmlprclib/server not reusing connections

Chris Foote chris at inetd.com.au
Tue Feb 24 01:18:55 EST 2004


On Mon, 23 Feb 2004, Roger Binns wrote:

> multicall is of no use to me because my following requests depend on the results
> of the preceding ones.  SSL is really important since the traffic is going
> over the open Internet.  I needed to do some certificate validation which
> the Python 2.3 library has no facilities for.
>
> On the server side, things were hopeless as well.  Since it would be
> listening on the open Internet, and had to work on Windows as well as
> Linux and Mac, the threading server initially seemed appealing, but
> sadly it has no facilities for limiting the number of threads spawned.
> It also makes a new thread per request, rather than the more normal
> design of having a thread pool to deal with requests/connections.
>
> xmlrpclib is coded to use the Python 1.5 compatible names (and lack of
> HTTP/1.1 and persistent connections).  SimpleXMLRPCRequestHandler is
> hard-coded to close connections after one request (see last line of
> do_POST).  The M2Crypto code that added SSL to both inherited those
> implementations and design.
>
> Basically the existing xmlrpclib and SimpleXMLRPCServer are hard coded
> (and IMHO go out of their way) to do one request per connection, and
> then shut things down.  Throw in that I needed to do SSL on both ends, with
> HTTP authentication, and some "light" firewalling in order to prevent
> DOS attacks, I had to spend several days mashing the various classes
> together with M2Crypto together.
>
> You can see the results here:
>
> http://cvs.sf.net/viewcvs.py/bitpim/bitpim/bitfling/xmlrpcstuff.py?view=markup

Excellent - I've been wanting these features for some time ;-)


Chris Foote <chris at inetd.com.au>
  _                  _         _
 (_)                | |       | |   Director - INETD PTY LTD
  _   _ __     ___  | |_    __| |   Level 2, 132 Franklin St
 | | | '_ \   / _ \ | __|  / _` |   Adelaide SA 5000
 | | | | | | |  __/ | |_  | (_| |   Web:   http://www.inetd.com.au
 |_| |_| |_|  \___|  \__|  \__,_|   Phone: (08) 8410 4566




More information about the Python-list mailing list