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

Jean-Paul Calderone exarkun at divmod.com
Fri Oct 3 09:01:35 MDT 2008


On Fri, 3 Oct 2008 11:47:53 +0530, little wiki <wiki at littlewiki.in> wrote:
>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.

I don't think you're going to find a good solution as long as your client is
running from a CGI.  The way to reduce load on an IMAP4 server is to make
fewer connections and open fewer mailboxes (generally speaking.  Different
IMAP4 servers have different performance characteristics; you should learn
about yours and avoid the requests it specifically cannot satisfy efficiently).

Jean-Paul




More information about the Twisted-Python mailing list