Subject: Re: [Jmap] Hacker News Discussion - getMailboxes single data set vs tree primitives or paging
From: Alexey Melnikov <[email-masked]>
To: Neil Jenkins <[email-masked]>, [email-masked]
Date: Mon, 8 May 2017 14:31:28 +0100
List-Id: JSON Message Access Protocol <jmap.ietf.org>

Hi Neil,

On 08/05/2017 07:19, Neil Jenkins wrote:

> 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.
Isode implemented a client that listed mailboxes level by level, due to 
constraint bandwidth.

We also have several thousands of shared mailboxes (they have nothing to 
do with Usenet), I think some enterprise type deployments will be 
similar. So having a way of listing direct children and all descendants 
of a mailbox would be very useful for us.
> Having said that, there's a standard mechanism in JMAP for doing 
> querying/sorting/paging of a record type (getFooList 
> <http://jmap.io/spec-core.html#querying-data>), 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?
I already wrote the server code for IMAP, so not much of a burden on the 
server side.