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

Gabriel Montenegro <Gabriel.Montenegro@microsoft.com> Tue, 17 May 2011 19:25 UTC

Return-Path: <Gabriel.Montenegro@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 C42FBE077D for <hybi@ietfa.amsl.com>; Tue, 17 May 2011 12:25:26 -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 4ZMAZ6fu7xXj for <hybi@ietfa.amsl.com>; Tue, 17 May 2011 12:25:24 -0700 (PDT)
Received: from smtp.microsoft.com (mailc.microsoft.com [131.107.115.214]) by ietfa.amsl.com (Postfix) with ESMTP id 97FD0E0719 for <hybi@ietf.org>; Tue, 17 May 2011 12:25:24 -0700 (PDT)
Received: from TK5EX14HUBC103.redmond.corp.microsoft.com (157.54.86.9) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server (TLS) id 8.2.176.0; Tue, 17 May 2011 12:25:24 -0700
Received: from TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com (157.54.71.68) by TK5EX14HUBC103.redmond.corp.microsoft.com (157.54.86.9) with Microsoft SMTP Server (TLS) id 14.1.289.8; Tue, 17 May 2011 12:25:24 -0700
Received: from TK5EX14MBXW603.wingroup.windeploy.ntdev.microsoft.com ([169.254.3.209]) by TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com ([157.54.71.68]) with mapi id 14.01.0270.002; Tue, 17 May 2011 12:25:23 -0700
From: Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
To: Takeshi Yoshino <tyoshino@google.com>, "hybi@ietf.org" <hybi@ietf.org>
Thread-Topic: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)
Thread-Index: AQHMFIIkUI9h8h8BPE+on6RW26XbNZSRY/Lw
Date: Tue, 17 May 2011 19:25:23 +0000
Message-ID: <CA566BAEAD6B3F4E8B5C5C4F61710C11402D3F1D@TK5EX14MBXW603.wingroup.windeploy.ntdev.microsoft.com>
References: <BANLkTi=-ZD024mJ99P8acwZZOQqFkv+O0w@mail.gmail.com> <4DCCD027.5030002@ericsson.com> <4DCD620C.6090508@callenish.com> <BANLkTikMoLd_ih3=zfAQROkCX_-WgUQesQ@mail.gmail.com>
In-Reply-To: <BANLkTikMoLd_ih3=zfAQROkCX_-WgUQesQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.28]
Content-Type: multipart/alternative; boundary="_000_CA566BAEAD6B3F4E8B5C5C4F61710C11402D3F1DTK5EX14MBXW603w_"
MIME-Version: 1.0
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: Tue, 17 May 2011 19:25:26 -0000

[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] On Behalf Of Takeshi Yoshino
Sent: Tuesday, May 17, 2011 04:03
To: 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