[Fedora-suds-list] Persistent connections - anyone else interested / suggest howto / working on it?

Rod Montgomery monty at starfief.com
Thu Oct 22 02:55:55 UTC 2009


Jeff Ortel wrote, On 10/21/2009 01:45 PM:
> On 10/21/2009 12:20 PM, Waldemar Osuch wrote:
>> On Wed, Oct 21, 2009 at 8:05 AM, Rod Montgomery<monty at starfief.com> wrote:
>>> Currently (i.e. r580 / 0.3.7 release candidate) Suds uses urllib2, which
>>> uses urllib, both from the standard Python library.
>>>
>>> I'm interested in making Suds able to use persistent connections.
>>>
>>> Twisted (twistedmatrix.com) seems to have an elaborate HTTP/1.1 Client
>>
>>> Another possibility is httplib2:
>>
>> Yes, it looks like the Client is using urllib2 by default but you should
>> be able to replace it with a custom transport.
>>
>> Client.options.transport = YourFancyPersistentConnection()
>>
>> As long as YourFancyPersistentConnection confirms to Transport 
>> interface from suds.transport it should work.
> 
> Yup.  The transport functionality as factored out into the Transport 
> (interface) and urllib2 based implementations for just this reason.

Aha! That sounds promising! I had not grasped that from the Documentation. Thanks!

>> I think you will have more luck with httplib2 than Twisted version
>> unless you are versed in Twisted ways.

You are now the second person who has warned me that Twisted may be more challenging than I want.

>> By the way you probably want:
>> http://httplib2.googlecode.com/files/httplib2-0.5.0.tar.gz
>> and not the Python3 version you have linked above.

It seems httplib2 is also available in a repository from my Linux distribution, Ubuntu.

There is also apparently a urllib3, which also claims to be thread-safe:

http://pypi.python.org/pypi/urllib3/0.2

I think I'll try both httplib2 and urllib3, and report my results back to the List.

Thanks for the prompt, informative responses!




More information about the fedora-suds-list mailing list