[Twisted-Python] Implementing an efficient IMAP client using connection pooling

little wiki wiki at littlewiki.in
Fri Oct 3 00:17:53 MDT 2008


Hi Folks,

I'm implementing a web based interface to an IMAP server.My idea is simple
as in my web client sending a request to the python script in cgi-bin
running apache .The python script in turn fetches from the IMAP and sends
back JSON data to the web client.

Here I want my python script to use twisted's IMAP's implementation .In
general ,everytime I send a request to the IMAP server, it sends the data of
the entire folder back which becomes a memory /bandwidth hog.What I'm
looking for is something like the connection pool in the adbapi module.I did
take deferred into consideration but what I'm looking for is a way to reduce
the number of connections being open to the IMAP server and trying to reuse
the same old connection instead of opening a new connection every time a
folder is refreshed   .The reason is that our IMAP severs run on very slow
compuers and I don't want the IMAP server to thrash the entire hard disk.

If the same could be done by deferred ,how would it be ?

Regards,
Wiki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20081003/876693ff/attachment.html>


More information about the Twisted-Python mailing list