Re: [Jmap] Hacker News Discussion - getMailboxes single data set vs tree primitives or paging

Neil Jenkins <neilj@fastmail.com> Mon, 08 May 2017 06:19 UTC

Return-Path: <neilj@fastmail.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1ACE41252BA for <jmap@ietfa.amsl.com>; Sun, 7 May 2017 23:19:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.019
X-Spam-Level:
X-Spam-Status: No, score=-0.019 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmail.com header.b=uMJ5Wg5M; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=Ei+Beuxu
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id si0d1YHu_oj9 for <jmap@ietfa.amsl.com>; Sun, 7 May 2017 23:19:05 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 91F3C124281 for <jmap@ietf.org>; Sun, 7 May 2017 23:19:05 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id 0794720595 for <jmap@ietf.org>; Mon, 8 May 2017 02:19:05 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Mon, 08 May 2017 02:19:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=ONPH8N903d/zlT28yYgWH2VS/xr96 zmVVf45/QA/rVo=; b=uMJ5Wg5M3cOdJAdu0IcUHa2OhqgjoDBeQsuAuhuv4gbuI rn7SC4TWqNKDsmQB+U6MlFGzrr0Pw5qzLXcmWlkmGLk5V1QQ/Cdi/rFzfQWFWvbW dVuIdDeaoLKeRUAZHnqlRGbyLIVlLCWwWgy4yKm0LfkC8FbVnof2X/exSQtgk7s1 Jyyw4h3xucYYzRj6s0swjrD5dHKniRqK2wGlk7Jb21ipKPSUXm47PDS/Ki5Z2US/ 5WeYzG5U9f3N2WqKfJmPbUVIgxKY8/j+199vY/od0vTaKoeXMBn7ppa9RDQFmOWV akqBAIdBdvNSYZRRKQlpLkM7hthKiaWBWsGEaW2tw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ONPH8N 903d/zlT28yYgWH2VS/xr96zmVVf45/QA/rVo=; b=Ei+BeuxuY2N5BZRThbDUf2 GfOZmdVqBxA7SjjkA0a3DRzSvfEaPmvKW9DKOgroOBXTXJpBStn0hf3KFM1UkNTA Oolir9d51Rfl1wbVt6BYLHca94XIzagtKUjqaPAsd2dKEyzoX8UNIKL41AFuhAZh hdCCXGVeS8xD/ps6AOqZIJ14WlW+uWlUKJvVdfnzvJzkBCtmCg0Z9lRz+hdG8ehs xeQY/M0SClFnNPQ8qvXlOIhd+aXY39toOrQ5j0Xug+GpA42amwHsEn+9Xud3cttp +mHkOWCXM2bcLe12OuehKw9f73sx2NylNGSyijmHOdjzTRMw3X21ABOJBQKWrTLA ==
X-ME-Sender: <xms:2A0QWZZBrEgun6an1nLRaCIbsB14WskL9cQy-xPfiG91CJrl9BrZiQ>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id B83C4E2AAC; Mon, 8 May 2017 02:19:04 -0400 (EDT)
Message-Id: <1494224344.1447245.969038872.78D5E02D@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmail.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_149422434414472451"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-e7edfd09
References: <20170507123912.GA22520@snake.grepular.com> <FF749B75-173D-4086-BAE6-AFB897D5F676@fugue.com>
In-Reply-To: <FF749B75-173D-4086-BAE6-AFB897D5F676@fugue.com>
Date: Mon, 08 May 2017 16:19:04 +1000
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/7deaFoQgAS1w69YiAJCjn8UiYRk>
Subject: Re: [Jmap] Hacker News Discussion - getMailboxes single data set vs tree primitives or paging
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 08 May 2017 06:19:07 -0000

When considering this before, I've tended to observe the
following points:
 * Standard mail clients generally fetch all mailboxes up front, and
   indeed often need to before they will display a (non-loading) UI.
 * The vast majority of users have very few folders (from what I
   remember last time we ran the stats at FastMail, well over 90% of
   users never created a single extra folder beyond the defaults).
So I therefore left out querying mailboxes (and so being able to fetch
them in pages) from the initial JMAP draft. The main case for this seems
to be presenting access to usenet groups or other non-strictly-email
stuff. There is always a question of whether we want to support every
use case, at the expense of making implementation more onerous.
Having said that, there's a standard mechanism in JMAP for doing
querying/sorting/paging of a record type (getFooList[1]), so if we do
decide we want this capability it is mostly obvious how it should be
specified. We'd include a filter option for *parentId* so you could
easily fetch as a hierarchy if you want, and it would be easy to add an
isArchived flag or similar later and filter on that if desired.
As long as we still allow *getMailboxes* to be called with a null *ids*
argument (therefore returning all mailboxes), clients can still just
ignore all this if they always need to fetch the whole set up front.
It's mainly therefore an extra burden on server implementations. So is
it worth the tradeoff? Thoughts?
Neil.

Links:

  1. http://jmap.io/spec-core.html#querying-data