Re: [Jmap] WG Review: JSON Mail Access Protocol (jmap)

Alexey Melnikov <alexey.melnikov@isode.com> Mon, 06 February 2017 19:42 UTC

Return-Path: <alexey.melnikov@isode.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7645F129478; Mon, 6 Feb 2017 11:42:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=isode.com
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 yuzOZHMQ9gEF; Mon, 6 Feb 2017 11:41:59 -0800 (PST)
Received: from statler.isode.com (Statler.isode.com [62.232.206.189]) by ietfa.amsl.com (Postfix) with ESMTP id 6DD6C129458; Mon, 6 Feb 2017 11:41:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1486410118; d=isode.com; s=june2016; i=@isode.com; bh=MREtn65r3SpwC8tbGiEeDlVVZMhD8aUefQQ6alGndcU=; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version: In-Reply-To:References:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description; b=nsfHCJDcNk6rcN8Sw7MwtApGub3iTzkI+SDPDRV6C1aExr6XN1DZSIGFf/709W71LuxYOx 94X/ccpGrRZyJvSISqVcXdt+6ZjDBy6FzoecuStzal8/kslTaQgtsw5llSs4NI7QXfcnIB PiBJ72n5em5bpA2QEkRwLNNDxEY1IFQ=;
Received: from [172.20.1.215] (dhcp-215.isode.net [172.20.1.215]) by statler.isode.com (submission channel) via TCP with ESMTPSA id <WJjRhQAY16Ou@statler.isode.com>; Mon, 6 Feb 2017 19:41:58 +0000
Subject: Re: [Jmap] WG Review: JSON Mail Access Protocol (jmap)
To: dcrocker@bbiw.net, ietf@ietf.org, jmap@ietf.org
References: <148616796247.4079.7104562493351135409.idtracker@ietfa.amsl.com> <11e900d0-553e-0635-06f4-8510bd80ecfd@dcrocker.net>
From: Alexey Melnikov <alexey.melnikov@isode.com>
Message-ID: <4ff42a3b-1f8e-3e25-14e7-b1d3ed2f69c2@isode.com>
Date: Mon, 06 Feb 2017 19:41:57 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0
In-Reply-To: <11e900d0-553e-0635-06f4-8510bd80ecfd@dcrocker.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/YcWw0XdOkg7jVhfZqeJZavxH1IA>
Cc: iesg <iesg@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Feb 2017 19:42:01 -0000

Hi Dave,

I am mostly proxying proponents of the Charter, but I did some editing 
pass over it, so I am replying to some of your comments.


On 06/02/2017 19:25, Dave Crocker wrote:
> On 2/3/2017 4:26 PM, The IESG wrote:
>> A new IETF WG has been proposed in the Applications and Real-Time Area.
>
> A November version of this charter was circulated and while there have 
> been some changes to produce the current draft charter, some issues 
> noted earlier have not been reflected here (and did not receive 
> comments in November.)
>
>
>> JSON Mail Access Protocol (jmap)
>> -----------------------------------------------------------------------
>> Current status: Proposed WG
>>
>> Chairs:
>>   TBD
>>
>> Assigned Area Director:
>>   Alexey Melnikov <aamelnikov@fastmail.fm>
>>
>> Applications and Real-Time Area Directors:
>>   Ben Campbell <ben@nostrum.com>
>>   Alissa Cooper <alissa@cooperw.in>
>>   Alexey Melnikov <aamelnikov@fastmail.fm>
>>
>> Mailing list:
>>   Address: jmap@ietf.org
>>   To subscribe: https://www.ietf.org/mailman/listinfo/jmap
>>   Archive: https://mailarchive.ietf.org/arch/search/?email_list=jmap
>>
>> Group page: https://datatracker.ietf.org/group/jmap/
>>
>> Charter: https://datatracker.ietf.org/doc/charter-ietf-jmap/
>>
>> A number of JSON-based representations of email have been developed
>> that are proprietary, non-standard, and incompatible with each other.
>> These protocols are proliferating due
>> to existing standards being insufficient or poorly suited to the
>> environments they are operating in, particularly mobile and webmail.
>
> From my November comments:
>
>      As with others, I take 'representations' to mean formats. And 
> given what JSON is[0] that seems an appropriate interpretation even 
> without that word.  So I take this asserted need as having a form of 
> email data format that is an alternative to RFC 5322/MIME.
>
>      Prior to chartering, we should document just how extensive the 
> current problem of multiple JSON email formats is, to establish the 
> practical benefit of unifying it. The theoretical benefit should be 
> obvious, but that's not enough to justify the cost of a working group. 
> We should establish real market need.
>
>      Having spent quite a bit of my early career on email gatewaying, 
> I'll comment that getting a common interchange format is especially 
> powerful.  The active protocols aren't irrelevant, but stabilizing the 
> message object itself is, IMO, far more important. I'm more than a 
> little biased about this strategic approach: It provided the unifying 
> base for email, during the Internet's early growth into commercial 
> markets.  And it happens that focusing on this narrow requirement 
> permits end-to-end -- and I mean the real kind:  author to recipient, 
> not just originating operator to receiving operator -- benefits 
> without having to change the infrastructure, other than insertion of 
> gateways.
>
>      Working groups need task serialization.  So I'll suggest that 
> having an effort to standardize an JSON representation of an 
> RFC5322/MIME object would be the highest-leverage first task.
I don't think there is intent to specify full mapping of RFC5322/MIME to 
JSON. IMAP has BODYSTRUCTURE element that contains parsed representation 
of message structure and most commonly used header fields for different 
body parts. The intent is to do the same here.
Additionally, it is still possible to retrieve full RFC5322/MIME 
payloads over JMAP.

I have tried to reflect your comments in the Charter, but I struggled a 
bit. If you can suggest how to make the above clearer, that would be 
much appreciated.
>
> Adding to this:
>
> JSON is a meta-format.  It isn't a 'protocol'.  Something encoded in 
> JSON is a format, not a protocol.  Hence one of the tasks apparently 
> being chartered would be to create a new message access protocol, 
> encoded in JSON.  While that might be worth doing, there needs to be 
> clarity that this is more than a 'representation'.
No, it is a representation. See above.
> There also needs to be clarity about the relationship between the JSON 
> encodings and the encodings in 'native' Internet Mail.

See drafts (and above).
>
>> The use of multiple protocols
>> to perform actions within a single application creates significant
>> support challenges, as users may get a variety of partial failure modes
>> (for example, can receive email, but can not send new messages).
>> This is further exacerbated if the different protocols are
>> authenticated separately.
>
> From my November comments:
>
>      There is no justification given for this approach.  For each 
> activity, there needs to be a clear and solid need documented, based 
> on actual industry activities or at least industry statements.  
> Besides clarifying /what/ needs doing, it should serve to indicate 
> likely industry uptake after the work is done.

I am not sure what kind of justification is needed. This is a clear 
deployment problem.
> Adding to this:
>
> The IETF email technical community looked at the question of making 
> email submission part of IMAP or keeping it separate.  It took an 
> entire year to debate this point extensively and (imo) constructively, 
> and decided to keep them separate.  The current charter draft appears 
> to have decided otherwise, but offers only the barest of 
> justifications, which I suspect has not factored in the earlier 
> evaluation.
There was a followup discussion about doing an IMAP extension for 
submission and how it should look like to remain compatible with SMTP 
Submission. I don't think this is an attempt to just ignore earlier 
discussions.

>> The JMAP working group will specify a mechanism to allow clients to
>> both view and send email from a server over a single stateless HTTPS
>> channel with minimal round trips. A single protocol for receipt and
>> submission will resolve long-standing difficulties users face
>> setting up clients to talk to servers.
>>
>> The protocol will support
>> push notification of changes using the mechanism defined in RFC 8030.
>> This will give mobile clients benefits in terms of battery life and
>> network usage. It will also support push notifications via server-sent
>> events (https://www.w3.org/TR/eventsource/) for direct connection to
>> clients that can support persistent TCP connections.
>>
>> The work of this group is limited to developing a protocol for a client
>> synchronising data with a server. Any server-to-server issues
>> are out of scope for this working group.
>> New end-to-end encryption mechanisms are out of scope, but the work
>> should
>> consider how to integrate with existing standards such as S/MIME and
>> OpenPGP.
>
> Why not TLS, also?

TLS is assumed. I think the Charter text says HTTPS elsewhere.
>
>
> ...
>
>> The working group will deliver the following:
>>
>> - A problem statement detailing the deployment environment and
>>   situations that motivate work on a new protocol for client to
>>   server email synchronisation.  The working group may choose
>>   not to publish this as an RFC.
>>
>> - A document describing an extensible protocol and data structures, with
>>   support for flood control and batched operations, and operating over
>>   a stateless connection such as HTTPS.
>
> 'flood control'?  what does this mean, since I assume the target 
> protocol won't be using a flooding algorithm.  If it really means 
> 'congestion control', that's not typically part of an application 
> protocol, so why would it be an issue here?
>
> From the November comments
>
>      Since client/server email access typically benefits from having 
> the server retain state about the client's activities, I can't tell 
> whether this actually means stateless lower-level transport or whether 
> it really does mean a stateless email protocol. 

Stateless lower level transport. The addition of "such as HTTPS" was 
trying to make this clearer.

> So this needs to be made much more clear, as to the what and the why, 
> as well as to the benefit that will accrue.
>
>      Given the considerable complexity of HTTP, I continue to fail to 
> see why making it be a universal, lower-layer transport is so popular. 
> Again, the need and the benefit need to be documented.

Presence of tools for manipulating JSON and ease of development. This 
was mentioned on the JMAP mailing list. I don't think this needs to be 
said here.

> Adding to this:
>
>    HTTP/HTTPS are not stateless, since they are connection-based.
Yeah, I struggled with this a bit. Each request/response can be sent on 
a separate connection and it is stateless in that sense.

>
>> - A document describing how to use the extensible protocol over HTTPS
>>   with the data structures expressed as JSON.
>>
>> - A document describing a data model for email viewing, management,
>>   searching, and submission on top of the extensible protocol.
>>
>> - An executable test suite and documented test cases to assist
>>   developers of JMAP servers to ensure they conform to the
>>   specifications.
>
> From the November comments:
>
>      This last is useful, but I think it's not typically an IETF work 
> product?

I don't mind deleting this, but I would like to see if IESG approves 
this as is ;-).

Best Regards,
Alexey
>
>
>
> d/
>
> [0] http://www.json.org/