Re: [Jmap] Fwd: New Version Notification for draft-murchison-jmap-websocket-00.txt

Neil Jenkins <neilj@fastmailteam.com> Sat, 09 June 2018 06:55 UTC

Return-Path: <neilj@fastmailteam.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 539911310D9 for <jmap@ietfa.amsl.com>; Fri, 8 Jun 2018 23:55:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.983
X-Spam-Level:
X-Spam-Status: No, score=-1.983 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, MIME_HEADER_CTYPE_ONLY=0.717, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b=YIePK6rw; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=GQhux2Cc
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 dhHikWQFcTCS for <jmap@ietfa.amsl.com>; Fri, 8 Jun 2018 23:55:11 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E4280130DEF for <jmap@ietf.org>; Fri, 8 Jun 2018 23:55:10 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5EBDC213FC for <jmap@ietf.org>; Sat, 9 Jun 2018 02:55:10 -0400 (EDT)
Received: from imap35 ([10.202.2.85]) by compute6.internal (MEProxy); Sat, 09 Jun 2018 02:55:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=content-type:date:from:in-reply-to :message-id:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=z0H6iSKnedsy1h4wTACyAyq6ExEzobL/DUX6jxL7O ns=; b=YIePK6rwsWWdQomYwLSKSzEFoYPJFm+IWv5qxyxby6QRKctIdt6A7ccgD 7JjBIbYkUxWVYWvTCVvlfvXVlm+MxIGWd7CgVBjI8zyd2luoPzGSpw3MDEBmPcWI mZNaAcoPvrHmLoeQG0dTSz2YfcLrw4uhGcQZa4pZIm7NLW1w6V0vo9RHpA6kwX4s AIX/Is5h+H+Z37uBVUa64wBjvfdz5sIQ8pBWj7NXKoTedDVJ3/6uCRxYsjvWWp/Y rBlraEmMv16QXoWOhFuGJInncQNyETMAz2mua2sz+raukrLu5dl6icJl4ytmJLU6 Rw0JQ/WJyvJlBxkor2bn75oneDqfQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:references:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=z0H6iSKnedsy1h4wTACyAyq6ExEzobL/DUX6jxL7O ns=; b=GQhux2CcvgoQ1uL7I1ikqpg/2dWx+5yYlqf1BXdgJzxeTbvMLwdxFc+5q +Dgr/6IWSposUYSnu+w6qWFIggCtZM+IAS//1CY1vbCy2mp93jFOGDWtV4dNe3Ar agVXs1uTSlnV+g7Tyd1sav9nlyrgxPz5Li8zUKjNNIG1uva0Eo8wWnu0rcy0mqQa zwYpKGWITdr17RStYx8hc3T5aMeuib2IA7vTMgMgJ8Gbhx1T61jHDqu+toJAWSiS AlwVOWRQO1tTrn3Aapu6ExGbdTlLbIedsobLDIgnGYFCBFPg/mVFyjCUio69Ls6U zqcn8M1aSZit7nxWdndSAdcJMga1w==
X-ME-Proxy: <xmx:znkbW2DS6Ke_9muwlaIEXpP6T80iJnRaV09kGjsCz4X-cSbOv82nAg>
X-ME-Proxy: <xmx:znkbW8eR6CToGddVjA0o_emcw5lRehsA7DnXRC7cIiuNntwela6J2A>
X-ME-Proxy: <xmx:znkbW_t3VGIFKinIjBorDxBFTD5_71pFyu2TUQdyaCcFG7x5WvsuaQ>
X-ME-Proxy: <xmx:znkbW7JwzCl09nhCfU_BazgR0irq5Oq5Iwfip1qoarNEcp-bWYZEmQ>
X-ME-Proxy: <xmx:znkbW5aaI8bcUgV5-XlYn2rhMtXk9lix70I_v_qUfxnxuP7YxyODLw>
X-ME-Proxy: <xmx:znkbW6AJyEivsW8lxCfOJMshDAIZRyLg9Z8djwxmmGm4BpjS28WVJg>
X-ME-Sender: <xms:znkbW69B5pEaVRsFS68Gb5gdvRLmKIFdlPszjZqMO2OirqxN9eVkwA>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 15655C4501; Sat, 9 Jun 2018 02:55:10 -0400 (EDT)
Message-Id: <32a1f0a3-6fb3-4858-82f9-abc27d526f82@sloti35d1t03>
User-Agent: Cyrus-JMAP/3.1.3-653-gce35ffd-next
x-jmap-identity-id: 64588216
In-Reply-To: <305ecac4-d5cb-2935-a1ef-e3dcc6823e0f@fastmail.com>
References: <305ecac4-d5cb-2935-a1ef-e3dcc6823e0f@fastmail.com> <42d9cdbc-338b-125b-4164-76dda81c81fa@fastmailteam.com> <152762434119.30187.891281157139219165.idtracker@ietfa.amsl.com> <113acf52-6b03-4914-a0f2-7fdf08b1cf98@sloti22d1t06>
Date: Sat, 09 Jun 2018 02:55:09 -0400
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="c2b9c1e1f5f14e46ab1d870c3396bfe5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/3XGATH9YhpZdTl2YVejVCXR1Ubo>
Subject: Re: [Jmap] Fwd: New Version Notification for draft-murchison-jmap-websocket-00.txt
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.26
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: Sat, 09 Jun 2018 06:55:13 -0000

On Wed, 30 May 2018, at 11:31 PM, Ken Murchison wrote:
  • Should the server be allowed to advertise a different URL for a websockets API connection as opposed to an HTTP one?
Sure.  I'll add a 'wsUrl' String to the capabilities.

My question was genuine, I don't know whether this should be separate or the same. Does anyone here have experience running an API that's available over either websockets or HTTP? If so, would you normally put the websockets upgrade on the same URL, or a different one? Making it separate certainly gives you more flexibility, so seems like the right option to me, but I'd be interested if anyone has real-world experience.

  • Are responses guaranteed to be in the same order as requests? (Probably not; if you want methods to execute sequentially you should bundle them in a single request object, but then how do you correlate the response objects to the request objects? Probably need to add an id property to the request/response object.)

I had intended that they would be in the same order, but I suppose out of order could be allowed if deemed necessary.

I think you definitely want this. This allows you to do concurrent requests with a single websocket, avoiding the overhead and complexity of creating multiple websocket connections to the server. 



  • I think being able to receive push events over the single websocket connection makes sense, but that means you'd have to be able to distinguish the different message types you might receive (API response or push).

Can't the client distinguish between a Response object and a StateChange object?  If we need a better way, do you have a recommendation?

I would probably add an @type property to each top-level object (Response and StateChange) with the name of the type as the value.

  • What changes are required to rate limiting options for the server? These probably need to be advertised in the capabilities object for this extension.
Are you thinking that we need separate maxSizeRequest, maxConcurrentRequests, maxCallsInRequest, maxObjectsInGet, and maxObjectsInSet for the WebSocket connection?

No, these would still apply. It's more if you need extra ones: if you don't need to wait for a response to come back before issuing another request down the websocket, is this just counted as concurrent requests so subject to maxConcurrentRequests (I would say yes)? What about having multiple websocket connections at once? That probably needs a separate limit, because the request is no longer the same as the connection. Maybe maxConcurrentSockets or something.

Neil.