Re: [imap5] Designing a new replacement protocol for IMAP

Bron Gondwana <brong@fastmail.fm> Fri, 10 February 2012 18:22 UTC

Return-Path: <brong@fastmail.fm>
X-Original-To: imap5@ietfa.amsl.com
Delivered-To: imap5@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1F94A21F8668 for <imap5@ietfa.amsl.com>; Fri, 10 Feb 2012 10:22:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NVq3-7xzXWoR for <imap5@ietfa.amsl.com>; Fri, 10 Feb 2012 10:22:47 -0800 (PST)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by ietfa.amsl.com (Postfix) with ESMTP id EA75321F87D1 for <imap5@ietf.org>; Fri, 10 Feb 2012 10:22:44 -0800 (PST)
Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 3D25B20E8D for <imap5@ietf.org>; Fri, 10 Feb 2012 13:22:44 -0500 (EST)
Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 10 Feb 2012 13:22:44 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=qjXM/5fVMq7SgihYGPkDM1NT GJ0=; b=DKqINntrkiKOyDo4qwUhpX6LliMRDczRlyNkAmaXruLnqjz5Q9z/0omO nBRMEk5PmfcDKw5xymGfdfKsfUq8cJercvi3RW5fn8lQgOsvMxyF4oTLfQy2bHpc TQuQ7ky0FfeiA/0b1iQoSfvkGvJEPb526LQ4UXcEfNDYmm6Fwg8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=qjXM/5fVMq7SgihYGPkDM1NTGJ0=; b=ID/yXEn57oZ+w/+vL1W/pJTFmJ4V K6xpJFCMgMpiCOS7PiS8mNLWNsxEXlDm44FsnfH8BoB3pegCnK83JV25ySWyhL43 2FIoWboDPYO/D2tijP6GM1iqQVNLkDa9AIW4g5LkLJjKmwVb2J7j0EKe8I9NFTHQ L9q1WizcB8oBeM4=
X-Sasl-enc: /1nituYgh5UIgo/iXz7W7SNDhJLBAEIsMhSdw4WlyJ3b 1328898163
Received: from localhost (99.249.9.46.customer.cdi.no [46.9.249.99]) by mail.messagingengine.com (Postfix) with ESMTPSA id E8A668E0226; Fri, 10 Feb 2012 13:22:43 -0500 (EST)
Received: by localhost (Postfix, from userid 1000) id 5313C1C9391; Fri, 10 Feb 2012 19:22:42 +0100 (CET)
Date: Fri, 10 Feb 2012 19:22:42 +0100
From: Bron Gondwana <brong@fastmail.fm>
To: Cyrus Daboo <cyrus@daboo.name>
Message-ID: <20120210182242.GA29036@launde.brong.net>
References: <1328732126.32086.140661033971485@webmail.messagingengine.com> <201202090820.28260.thomas@koch.ro> <4F337E61.5040702@qbik.com> <201202101544.51364.thomas@koch.ro> <833EE8EEE88E4ADE5CDDDADB@caldav.corp.apple.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <833EE8EEE88E4ADE5CDDDADB@caldav.corp.apple.com>
Organization: brong.net
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: imap5@ietf.org
Subject: Re: [imap5] Designing a new replacement protocol for IMAP
X-BeenThere: imap5@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Discussion on drastically slimming-down IMAP." <imap5.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/imap5>, <mailto:imap5-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/imap5>
List-Post: <mailto:imap5@ietf.org>
List-Help: <mailto:imap5-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/imap5>, <mailto:imap5-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 10 Feb 2012 18:22:48 -0000

On Fri, Feb 10, 2012 at 10:09:48AM -0500, Cyrus Daboo wrote:
> For CalDAV and CardDAV we (Apple, http://calendarserver.org) have
> used XMPP pubsub and our own APNS to implement a push notification
> service. Frankly I think the IETF should have developed a proper
> notification protocol for use alongside other protocols a long time
> ago - simply "blessing" XMPP pubsub as the solution for that would
> be fine from a standards point, but perhaps something else (new)
> coukld be done too. What then needs to be defined are the hooks in
> each underlying protocol to allow clients to discover the
> appropriate pubsub service. In CalDAV/CardDAV that is simply done
> using WebDAV properties to advertise the essential client push
> configuration.

I really should make sure we're compatible with what you're doing
too.  Obviously, there's a tradeoff between being able to do
everything in one protocol vs simplicity and saving the wheels
from being reinvented all over again.

I really appreciate your input here - you've got some good points,
and an actual implementation of something interesting, which trumps
talking every time!

> So, in my opinion, whilst push notifications should be a requirement
> for imap5, we should not define that protocol and instead push the
> IETF to provide such a protocol for general use.

My plan is to define in-band push if there's an active TCP connection,
plus out-of-band notifications.  Either way they would be of the
"something has changed, go request an update to the views you are
interested in"...

What we've done at mail.opera.com for a web-based system is to
use eventsource to push just a "here's a new modseq for you" to
the client, after which it can request a diff against the previous
view.  This works because we use a single HIGHESTMODSEQ counter
across all the users' mailboxes.

Obviously, it doesn't scale so nicely to shared folders.  For this
I'm seriously considering a CHANGEROOT or similar, which would be
a tree of related folders in which modseqs are serialised.  For a
64 bit counter, there's probably actually no real problem with
updating them across the entire server - other than then having to
filter the change notifications so you don't generate a zillion
spurious "something may have been updated" notification to every
client.

Bron.