[Kde-pim] [PATCH] imap resource: Support multiple IDLE folders.

Kevin Ottens ervin at kde.org
Fri Oct 19 13:57:18 BST 2012


Hello,

First of all thanks for looking into that!

On Monday 15 October 2012 23:08:53 Rüdiger Sonderfeld wrote:
> Currently the imap resource only uses IDLE for the /INBOX folder.
> However having several inboxes or important folders is a common
> use case and the imap resource should be capable of supporting it.

That's correct, but this limitation somewhat comes from the protocol itself... 
IDLE is fairly limited, there's been work to overcome those limitations in the 
form of the NOTIFY extention: http://www.faqs.org/rfcs/rfc5465.html

I'm not sure which IMAP servers implement that extension though.

> This patch is an initial attempt at adding support for multiple IDLE
> folders.  The current implementation changes the single IdleRidPath to
> IdleBoxes containing URLs to IMAP folders.  The helper functions
> url2collection and collection2url are used to convert from
> Akonadi::Collections to URLs and vice versa.  The ImapResources class
> then creates an ImapIdleManagers for each URL.

And that's exactly the problem I have with the proposed patch... It opens one 
connection per monitored box, and I'd expect quite a few sysadmins to hate us 
for allowing such consumption of resources...

I see two ways to walk toward an acceptable solution:
 1) Modify your patch in a way that only one connection is used to the server 
for IDLE, it could be done by rotating between several boxes (SELECT, IDLE, 
SELECT, IDLE, etc.). The trick being to find out how long to IDLE on each box 
while still having an acceptable behavior for the user. It'll also generate 
somewhat more traffic but that should still be OK if done well.
 2) Implement the support for NOTIFY instead. It's definitely the better 
option to me, but it's clearly getting further away from your existing patch. 
It also requires investigating which servers support it of course.

As for the patch itself, despite the fact that the approach to the problem is 
probably not the best one (as pointed out above), the overall quality is nice 
so don't hesitate to bring more (especially now that I propose a couple of 
possibilities). ;-)

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud patron of KDE, http://www.kdab.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20121019/ca93818b/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list