xmlprclib/server not reusing connections

Roger Binns rogerb at rogerbinns.com
Tue Feb 17 03:26:15 EST 2004


It appears that xmlrpclib and/or SimpleXMLRPCServer always use new
connections for each request.  I have been trying to make them
reuse the existing connection but can't find where.  Is there any
particular reason they go to such great lengths to call shutdown/close/finish
as well as making new connection objects in xmlrpclib?

I am actually using M2Crypto so the connection ultimately ends up
inside SSL.  Having a new connection established for every single
request is insane, especially as most of my requests will be lightweight.
I expect the clients and servers to be on lower bandwidth connections
and usually on opposite ends of the US.

My attempts so far to make reuse happen have led to a twisty maze
of deep inheritance hierarchies and intertwined transports, connections
and request handlers hard coding each others classes.  No amount of
debugging and commenting out shutdown/close/finish prevents new
connections from being used.

Roger





More information about the Python-list mailing list