Re: [hybi] NAT reset recovery? Was: Extensibility mechanisms?

Jamie Lokier <jamie@shareable.org> Tue, 20 April 2010 01:26 UTC

Return-Path: <jamie@shareable.org>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6D0393A67B7 for <hybi@core3.amsl.com>; Mon, 19 Apr 2010 18:26:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.143
X-Spam-Level:
X-Spam-Status: No, score=-3.143 tagged_above=-999 required=5 tests=[AWL=-0.544, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KbmL6tnw4HMs for <hybi@core3.amsl.com>; Mon, 19 Apr 2010 18:26:38 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 738293A67B4 for <hybi@ietf.org>; Mon, 19 Apr 2010 18:26:38 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1O42EO-0006Sx-8D; Tue, 20 Apr 2010 02:26:28 +0100
Date: Tue, 20 Apr 2010 02:26:28 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20100420012628.GB21899@shareable.org>
References: <20100419121000.GG28758@shareable.org> <87764B8E-5872-40EE-AA2F-D4E659B94F63@d2dx.com> <20100419140423.GC3631@shareable.org> <6959E9B3-B1AC-4AFB-A53D-AB3BA340208C@d2dx.com> <B3F72E5548B10A4A8E6F4795430F841832040F78C0@NOK-EUMSG-02.mgdnok.nokia.com> <w2q5821ea241004191309t7362de42p922788d380119dc4@mail.gmail.com> <B3F72E5548B10A4A8E6F4795430F841832040F78DB@NOK-EUMSG-02.mgdnok.nokia.com> <l2v5821ea241004191326i50970f32zbda7f876eda777f1@mail.gmail.com> <B3F72E5548B10A4A8E6F4795430F841832040F78ED@NOK-EUMSG-02.mgdnok.nokia.com> <4BCCC84F.2050501@webtide.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <4BCCC84F.2050501@webtide.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] NAT reset recovery? Was: Extensibility mechanisms?
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Apr 2010 01:26:39 -0000

Greg Wilkins wrote:
> Markus.Isomaki@nokia.com wrote:
> 
> > Hmm... Even if the protocol as a whole is asynchronous (both ends
> > can generate frames at any time), isn't it still possible to exchange
> > requests and responses as well over the same transport connection?
> 
> Another niceness of having request/response KA's on the async connection is
> that it gives us a cheap and simple form of message acknowledgement.
> 
> If we receive a response to a KA, then we know that all messages
> sent prior to the KA request have been delivered to the other endpoint.

Nice, except for the cost when you don't need that acknowledgement...

This is a good reason to have a "ping" request, guaranteed to be fully
end-to-end, in addition to any other KA type.

"ping" is also useful for when you haven't received a KA for a little
while (less than the KA interval, but might still be minutes), and you
want to confirm that the connection is actually still alive right now.

Note that if KAs are handled by WebSocket itself, you only know the
message has been delivered to the endpoint's transport queue.  You
don't know that it will reach the endpoint's *application* unless it's
the application which will produce the response, and often that is
something you would like to know.

For these reasons I suggest that "ping" functionality be defined
separately from keepalive functionality, and its semantics made
explicit.

-- Jamie