Re: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)

Piotr Kulaga <piotrku@microsoft.com> Thu, 19 May 2011 00:43 UTC

Return-Path: <piotrku@microsoft.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 97742E06C2 for <hybi@ietfa.amsl.com>; Wed, 18 May 2011 17:43:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.598
X-Spam-Level:
X-Spam-Status: No, score=-10.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pBoaRfwfFGpF for <hybi@ietfa.amsl.com>; Wed, 18 May 2011 17:43:17 -0700 (PDT)
Received: from smtp.microsoft.com (smtp.microsoft.com [131.107.115.215]) by ietfa.amsl.com (Postfix) with ESMTP id 4100BE0674 for <hybi@ietf.org>; Wed, 18 May 2011 17:43:17 -0700 (PDT)
Received: from TK5EX14MLTC102.redmond.corp.microsoft.com (157.54.79.180) by TK5-EXGWY-E802.partners.extranet.microsoft.com (10.251.56.168) with Microsoft SMTP Server (TLS) id 8.2.176.0; Wed, 18 May 2011 17:43:16 -0700
Received: from TK5EX14MBXC206.redmond.corp.microsoft.com ([169.254.4.28]) by TK5EX14MLTC102.redmond.corp.microsoft.com ([157.54.79.180]) with mapi id 14.01.0289.008; Wed, 18 May 2011 17:43:16 -0700
From: Piotr Kulaga <piotrku@microsoft.com>
To: Brian McKelvey <theturtle32@gmail.com>
Thread-Topic: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)
Thread-Index: AcwVjUa0HJI3Zcy9SlGX7BhtGbiZpwARGKcAAAVSYfA=
Date: Thu, 19 May 2011 00:43:15 +0000
Message-ID: <ED13A76FCE9E96498B049688227AEA292C6A85DE@TK5EX14MBXC206.redmond.corp.microsoft.com>
References: <ED13A76FCE9E96498B049688227AEA292C6A81E4@TK5EX14MBXC206.redmond.corp.microsoft.com> <F390D8D1-335B-4595-93A2-0741DD693559@gmail.com>
In-Reply-To: <F390D8D1-335B-4595-93A2-0741DD693559@gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.21]
Content-Type: multipart/alternative; boundary="_000_ED13A76FCE9E96498B049688227AEA292C6A85DETK5EX14MBXC206r_"
MIME-Version: 1.0
Cc: "hybi@ietf.org" <hybi@ietf.org>, Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
Subject: Re: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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: Thu, 19 May 2011 00:43:18 -0000

Personally I do not see any point of allowing multiple outstanding pings. If a sender did not get a response to first of them, sending another one probably will not increase its chances. To me, saying that only one ping is allowed is a simplification of the protocol which does not limit protocol’s functionality.

From: Brian McKelvey [mailto:theturtle32@gmail.com]
Sent: Wednesday, May 18, 2011 1:06 PM
To: Piotr Kulaga
Cc: Gabriel Montenegro; Takeshi Yoshino; hybi@ietf.org
Subject: Re: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)

+1
I also see no purpose for correlating ping/pong data.  Or restricting the number of outstanding pings.  If you send 5 pings, you should expect 5 pongs, end of story.  The only real purpose for them is to see if the other end is still responsive, so send a ping and if you haven't gotten a pong after a certain user-decided timeout, close the connection.  It needs no further complication.

Brian


Sent from my iPhone

On May 18, 2011, at 12:07 PM, Piotr Kulaga <piotrku@microsoft.com<mailto:piotrku@microsoft.com>> wrote:
In my opinion, ping/pong frames should not carry application payload (foo and bar strings). If the payload is not well defined (i.e. reason, timestamp, etc.) there is no way the peer would understand how it should interpret the data. I would leave this problem the a protocol well-defined extensibility mechanism. If application wants to add payload to a ping/pong frame it should negotiate extension with the server and set a reserved bit on the frame. This way the basic protocol is simple and application can send/receive additional data if necessary (and negotiated).

I am ok with the 0x00 and 0x01 proposal.

From: hybi-bounces@ietf.org<mailto:hybi-bounces@ietf.org> [mailto:hybi-bounces@ietf.org] On Behalf Of Gabriel Montenegro
Sent: Tuesday, May 17, 2011 12:25 PM
To: Takeshi Yoshino; hybi@ietf.org<mailto:hybi@ietf.org>
Subject: Re: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)

[As an individual]

I don’t think setting Ping/Pong as a platform for further applications is a good idea, for the same reasons that using ICMP as a platform for more intelligent applications is a good idea. Since ICMP does not follow the usual codepaths, any valid network characteristic measurements better not use, and they better use traffic that looks more closely like what an actual app would use (UDP, TCP). Similarly, I would expect Ping/Pong to not be treated as application traffic after network elements start being cognizant of Websockets. So the idea of using Ping/Pong for further apps doesn’t appear very convincing to me.

I’d much rather we kept Ping/Pong intentionally limited to its original purpose of just being a bare bones mechanism, and leave any other uses as proper extensions.

The current text to say that only the last Ping need to be responded to discourages the peers from sending more than one, but it would be better to make it explicit that having more than one outstanding Ping (without its corresponding Pong) MUST NOT be done.

I think the 0x00 and 0x01 to distinguish unsolicited Pong is fine.

From: hybi-bounces@ietf.org<mailto:hybi-bounces@ietf.org> [mailto:hybi-bounces@ietf.org] On Behalf Of Takeshi Yoshino
Sent: Tuesday, May 17, 2011 04:03
To: hybi@ietf.org<mailto:hybi@ietf.org>
Subject: Re: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)

Full body matching requirement has been introduced by http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-03 for both close and ping/pong. What was the original goal of this requirement for ping/pong? Is it still valid? Full body matching requirement for close frames has been thrown away after long discussion.

Now it looks like it's sufficient to have single boolean to indicate it's nop or reply in application data.

Here's relaxed version.

foo and bar mean "any string"

a) implement heartbeat by diverting Pong
- Ping would be "Ping foo"
- to reply to "Ping foo", send "Pong \x00 bar" (bar is foo by default)
- to send unsolicited Pong, send "Pong \x01 bar"

b) implement heartbeat by diverting Ping
- to send Normal-Ping, send "Ping \x00 foo"
- to send NOP-Ping, send "Ping \x01 foo"
- to reply "Ping \x00 foo", send "Pong bar" (bar is foo by default)
- just ignore "Ping \x01 foo" when received

to adopt Bruce's idea, change "(bar is foo by default)" to "(bar is foo + buz)". it implements echo and allows the receiver to send additional info.

I've removed unnecessary \x00 and \x01, but it's fine for me to keep them to keep framing symmetric.

Takeshi

_______________________________________________
hybi mailing list
hybi@ietf.org<mailto:hybi@ietf.org>
https://www.ietf.org/mailman/listinfo/hybi