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

Bron Gondwana <brong@fastmail.fm> Thu, 09 February 2012 11:24 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 58B1C21F8667 for <imap5@ietfa.amsl.com>; Thu, 9 Feb 2012 03:24:15 -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 Ka1GTJBxgjr7 for <imap5@ietfa.amsl.com>; Thu, 9 Feb 2012 03:24:14 -0800 (PST)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by ietfa.amsl.com (Postfix) with ESMTP id 728AF21F85F8 for <imap5@ietf.org>; Thu, 9 Feb 2012 03:24:14 -0800 (PST)
Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 5288421021 for <imap5@ietf.org>; Thu, 9 Feb 2012 06:24:13 -0500 (EST)
Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute3.internal (MEProxy); Thu, 09 Feb 2012 06:24:13 -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=eyPXuJRWfA3AXuiX2tZFA2H0 IS0=; b=bUbkW2yF0fyEFxTkMD/plKdAWJ2qG6A4e84VHJaStPeYC9hMWNQOhSs7 0DM6BDPU3BqoSlX7Dt2R/nnveC3/OuvHB7IFjxDLI9XcA5cCdgIvb/z3ilRX437t CqqaQirhtWqoR27sY1nq35CLs2d9zy7sFVnJPMmepQlY4iSRLgo=
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=eyPXuJRWfA3AXuiX2tZFA2H0IS0=; b=W+Y72hA1zXC5iq/s3oZjJfy4gyaJ Sl0F3ZfeHDTb3uXhX3Yz14grU5MBuGlN6TsoB5N0slVzpdmk3WH6KAY2ve+BEJ9G 55sBIszGJji853jHfyzwQAmZv5elgOVW17rMfDLLKSA0szaez5aSFFKfFUBsvn4J K5jed5OPxBfmyPc=
X-Sasl-enc: DRLqcQnkDZ/s9vPvcFYXo6cyO3ntFszOGgVzj6jfL1Pj 1328786653
Received: from localhost (99.249.9.46.customer.cdi.no [46.9.249.99]) by mail.messagingengine.com (Postfix) with ESMTPSA id 07DA9483525; Thu, 9 Feb 2012 06:24:13 -0500 (EST)
Received: by localhost (Postfix, from userid 1000) id 4D35819BF04; Thu, 9 Feb 2012 12:24:11 +0100 (CET)
Date: Thu, 09 Feb 2012 12:24:11 +0100
From: Bron Gondwana <brong@fastmail.fm>
To: Adrien de Croy <adrien@qbik.com>
Message-ID: <20120209112411.GB29734@launde.brong.net>
References: <1328732126.32086.140661033971485@webmail.messagingengine.com> <201202090820.28260.thomas@koch.ro> <4F337E61.5040702@qbik.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <4F337E61.5040702@qbik.com>
Organization: brong.net
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: ietf-imapext@imc.org, imap5@ietf.org, IMAP Protocol Interest List <imap-protocol@u.washington.edu>
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: Thu, 09 Feb 2012 11:24:15 -0000

On Thu, Feb 09, 2012 at 09:05:53PM +1300, Adrien de Croy wrote:
> 
> Whilst HTTP could certainly be used to put together an email system,
> I don't think it would perform well enough to replace existing
> protocols on desktops.
> 
> The main issues I see are:
> 
> * updates.  Would need to poll or use long polling to get real-time
> updates (e.g. notification of incoming mail).

Yes - long polling or "out of band" notification systems.  We have
an HTTP protocol defined kind of "on top of" IMAP plus our own
extensions here at FastMail/Opera (mail.opera.com if you want to
play with it)

We are currently using EventSource to notify the client that
"there is something new", after which the client queries to
find what's updated.

This is possible to be efficient because we use a single counter
for uidvalidity and a single counter for highestmodseq across the
entire user's folders - so any change to uidvalidity means the
folder list needs refreshing, and any change to highestmodseq
means the message view needs checking.

Combined with efficient "what's changed in this view since my
previous modseq value" queries, it's very bandwidth efficient.

> * slow.  Gut feel based on 17 years writing http proxies is that it
> would be too slow

Not really actually - so long as you can query multiple things in
a single "transaction"

> * complex.  In order to reduce round-trips, you'd have to do many
> things in a single transaction, which would create complexity issues
> in the server and client

But here's the rub.  Yes, complex.

> * protocol bloat.  if you think IMAP is bloated, try HTTP.
> * fundamentally an off-line style protocol for mail, which has
> strong incentives to be online (esp for in-office use).

Mostly facebook's "live feed" is plenty fast enough.  People are
doing all sorts of close-enough-to-real-time stuff on top of HTTP.
It doesn't mean it's the right choice, but I wouldn't dismiss it
out of hand either.

> I think it would also be very problematic in the wild, since any
> http intermediary would feel entitled to mess with traffic.  E.g.
> heuristic caching, intercepting proxies etc.

That's a problem for sure.  Mind you, proxyability is high on my
list of goals.  Immutable stuff should be cachable.

> It's almost too ubiquitous.  Everyone and their dog thinks they know
> how http works.  It's not strictly-enough defined, and has a LOT of
> optional features which aren't relevant for mail (e.g. content
> negotiation).  Interop in http is already problematic, but start
> getting people writing mail servers in php etc, and see what starts
> to happen.  I think it would be a nightmare.

Like IMAP then, except only their dogs actually understand it ;)

Good enough tests should, in theory, allow people to write their
servers in PHP if they want to.  Why you would choose to write in
PHP, I'm not sure... but still.  It takes all types.

Bron.