[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Broaching the idea of ANNOTATE-LESS (a.k.a COMMENT)




Hi Dan,

--On November 21, 2006 9:00:51 AM -0800 Dan Karp <dkarp@xxxxxxxxxx> wrote:

I thought about it for a while, and I realized that the much simpler set
of things we *can* implement still makes a pretty compelling subset of
ANNOTATE functionality.  So I was wondering if it might be OK to try a
second draft (called COMMENT or somesuch) encapsulating the following
functionality:

   - one COMMENT annotation field per message
   - the COMMENT annotation maps directly to the "/comment value.shared"
ANNOTATION (and hence tags along via COPY)    - a COMMENT annotation must
be valid UTF-8 text or NIL

   - the COMMENT annotation is SEARCHable, settable via STORE and APPEND,
and retrievable via FETCH    - the COMMENT annotation is non-SORTable
   - unsolicited notifications include the full COMMENT value

   - COMMENT must be explicitly enabled via SELECT (COMMENT), EXAMINE
(COMMENT), or ENABLE COMMENT

So the syntax would look something like this:

   C: A001 FETCH 1 (UID COMMENT)
   S: * 1 FETCH (UID 7723 COMMENT NIL)
   S: A001 OK FETCH completed

   C: A002 STORE 1 COMMENT "This is the message's comment!"
   S: * 1 FETCH (COMMENT "This is the message's comment!")
   S: A002 OK STORE completed

   C: A003 FETCH 1 (UID COMMENT)
   S: * 1 FETCH (UID 7723 COMMENT "This is the message's comment!")
   S: A003 OK FETCH completed

   C: A004 STORE 1 COMMENT.SILENT "Updating the comment..."
   S: A004 OK STORE completed

   C: A005 APPEND Sent COMMENT "Attached to new message" {14432+}
   C: ...
   S: A005 OK APPEND completed

   C: A006 SEARCH COMMENT "comment"
   S: * SEARCH 12 44 156
   S: A006 OK SEARCH completed

I spoke with Cyrus about this, as he's one of the authors of the ANNOTATE
extension and hence this is fundamentally his (and Randall's) work.  He
suggested taking it to the full IMAPEXT list, and I've obliged.

My comment to Dan on this was that it might make sense to have a way to "profile" ANNOTATE so that servers could offer limited portions of it. e.g. a server might choose not to implement either SORT'ing or SEARCH'ing on annotations and that could be indicated via ANNOTATE-NOSORT and ANNOTATE-NOSEARCH capabilities. e.g. if a server wanted to support a limited set of entries, then a new 'ALLOWEDENTRIES' option to SELECT could be used to return the set of supported entries on a mailbox (e.g. just "/comment" in Dan's example) - this could also cover support for .priv and .shared.

The benefit of doing this, rather than inventing a new extension with new syntax, is that it offers an upgrade path to full annotate. It also means that anyone implementing full annotate on a client will be able to easily handle "less capable" servers by simply looking at what is supported. I think this is better than having two extension. This could be done as a follow-up to the current "experiment".

--
Cyrus Daboo