Subject: [imapext] Draft for server-side incremental threading

From: Jan Kundrát <[email-masked]>
Date: Thu, 26 Jul 2012 18:12:58 +0200

Hi,
as the draft submission tool is still down in preparations for the 
upcoming IETF meeting (?), and because I generally prefer to make a fool 
of myself in front of a limited audience, I'm hereby proposing a draft 
for "incremental threading".

Why is it needed:
-----------------

- My client issues "UID THREAD $algo $charset ALL" and relies on 
server-side threading.
- It doesn't fetch anything but UID and FLAGS for all messages in a mailbox.
- When new message arrives, it cannot therefore "plug" it into the 
threading tree without performing expensive operations.

How it works:
-------------

- It reuses the INTHREAD search key from Arnt's draft [1] (which is an 
excellent idea and it contains the THREAD=REFS algorithm as well, 
something implemented both in Dovecot and in Trpjita)
- It adds a few return options to the UID THREAD command in manner 
similar to how ESEARCH did it for SEARCH.
- Two new kinds of ESEARCH rerutn values are defined, the "THREAD" and 
"INCTHREAD".
- Namely, the "THREAD" return option is the same as the untagged THREAD.
- The "INCTHREAD" contains a tuple of (UID-of-previous-thread-root, 
one-thread), i.e. it adds an explicit position about where to "plug" the 
message. This is needed to prevent new messages from getting "forgotten" 
deep down in the threading, or old messages being copied getting too 
much visibility among the recent threads.

The complete draft is at [2], the XML source at [3].

I've also hit one interoperability problem with Arnt's draft and Dovecot 
-- Dovecot accepts an additional parameter specifying the threading 
algorithm, so it isn't really just "INTHREAD", but rather "INTHREAD 
REFS" for example. This is subsequently what Trojita sends. My ABNF just 
references the mentioned draft.

If people are interested in this approach, I'd appreciate if all of 
Arnt's INTHREAD, THREAD=REFS and my ETHREAD & INCTHREAD made it into an 
RFC eventually. I'll be happy to merge the two proposals if that sounds 
interesting.

Slightly off-topic note:
------------------------

This is the last of the three proposals which I've made when working on 
my thesis about "Mobile IMAP" -- that means that there won't be any 
further drafts from me for a few weeks. If you're interested in this 
topic, I'd appreciate a review of some of the points which I raise in my 
work, or a general remark on how you like or dislike it. The thesis 
lives at [4].

With kind regards
Jan

[1] http://tools.ietf.org/html/draft-ietf-morg-inthread-01
[2] http://trojita.flaska.net/draft-imap-incthread-00.html
[3] 
https://gitorious.org/trojita/trojita/blobs/drafts/draft-imap-incthread-00/docs/proposed-extensions/draft-imap-incthread.xml
[4] http://trojita.flaska.net/msc-thesis.pdf

-- 
Trojita, a fast e-mail client -- http://trojita.flaska.net/