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

Gabriel Montenegro <Gabriel.Montenegro@microsoft.com> Thu, 26 May 2011 16:45 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 E498FE070A for <hybi@ietfa.amsl.com>; Thu, 26 May 2011 09:45:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.298
X-Spam-Level:
X-Spam-Status: No, score=-10.298 tagged_above=-999 required=5 tests=[AWL=-0.300, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_52=0.6, 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 5uODrbEkHSeG for <hybi@ietfa.amsl.com>; Thu, 26 May 2011 09:45:01 -0700 (PDT)
Received: from smtp.microsoft.com (mail3.microsoft.com [131.107.115.214]) by ietfa.amsl.com (Postfix) with ESMTP id 5D31AE06E1 for <hybi@ietf.org>; Thu, 26 May 2011 09:45:01 -0700 (PDT)
Received: from TK5EX14HUBC107.redmond.corp.microsoft.com (157.54.80.67) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server (TLS) id 8.2.176.0; Thu, 26 May 2011 09:45:01 -0700
Received: from TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com (157.54.71.68) by TK5EX14HUBC107.redmond.corp.microsoft.com (157.54.80.67) with Microsoft SMTP Server (TLS) id 14.1.289.8; Thu, 26 May 2011 09:45:00 -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.0289.008; Thu, 26 May 2011 09:44:54 -0700
From: Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
To: Takeshi Yoshino <tyoshino@google.com>, Patrick McManus <pmcmanus@mozilla.com>
Thread-Topic: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)
Thread-Index: AQHMG15XBeWRPtk6eUCpfPMRIN9xX5SfUTVA
Date: Thu, 26 May 2011 16:44:53 +0000
Message-ID: <CA566BAEAD6B3F4E8B5C5C4F61710C11402F245E@TK5EX14MBXW603.wingroup.windeploy.ntdev.microsoft.com>
References: <ED13A76FCE9E96498B049688227AEA292C6A81E4@TK5EX14MBXC206.redmond.corp.microsoft.com> <4DD9686C.7020509@callenish.com> <BANLkTin2LcHgPH7s4-T_1LJa_UhkigJziw@mail.gmail.com> <1306285493.1782.33.camel@ds9> <BANLkTino-_v8VKMXaUG0WH9HgsFedWgHtg@mail.gmail.com> <1306294656.1782.50.camel@ds9> <BANLkTikx=mg_ACZDjhSvD+gma5UgMbJq7g@mail.gmail.com> <1306321812.1782.60.camel@ds9> <BANLkTi=9pSRER21nCiBS6f=vV-DBis300A@mail.gmail.com>
In-Reply-To: <BANLkTi=9pSRER21nCiBS6f=vV-DBis300A@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.90]
Content-Type: multipart/alternative; boundary="_000_CA566BAEAD6B3F4E8B5C5C4F61710C11402F245ETK5EX14MBXW603w_"
MIME-Version: 1.0
Cc: "hybi@ietf.org" <hybi@ietf.org>
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, 26 May 2011 16:45:04 -0000

After discussion with Salvatore, this is our take on this:

The only thing that absolutely needs to change, then is this:

b-yes-2) Allow the Pong body to contain extra data beyond just echoing the Ping body?
OK. Harmless. I don't have any preference on this. This needs text change.

And the corresponding change is in section 4.5.3 on Pong:

OLD:
The message
   bodies (i.e. both the Extension data (if any) and the Application
   data) of the Ping and Pong MUST be the same.
NEW:
 The message body's Application data of the Ping and Pong MUST be the same.

Thanks,

Gabriel

From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of Takeshi Yoshino
Sent: Wednesday, May 25, 2011 21:35
To: Patrick McManus
Cc: hybi@ietf.org
Subject: Re: [hybi] Ping/Pong body (was Re: TSV-Directorate review of draft-ietf-hybi-thewebsocketprotocol-07)

On Wed, May 25, 2011 at 20:10, Patrick McManus <pmcmanus@mozilla.com<mailto:pmcmanus@mozilla.com>> wrote:
But if A's algorithm is "unpredictable random sequence" then B cannot
realistically match A's value even if they are uncoordinated. Just make
the random space sufficiently large - these are infrequent events after
all.

Yes. I know.

My point is the trade off between "please choose and implement some algorithm (e.g. random 3, 4 or more octet) that very possibly never generates body which collide with others' by yourself when necessary" and "the spec clearly disambiguates them by 1 octet indicator".

I think the former works practically. But that's not what something called "specification" should do I think in principle. Things people may leave under-specified are things that defined in lower or under layer which have their own agreement/spec, or extensions that has negotiation mechanism by which entities can coordinate their behavior. This is not the case.

that does break interoperability, though. a Ping of "0x23 0x24 0x25
0x26" is legal under -07 and invalid under that text. s/must/SHOULD
would repair that, I suppose.

Yes. For non-empty cases, it does break.

-07 rules? It's time to ship the protocol already.

I'm ok with this shipped without adding indicator if no one else thinks it's necessary. It's time to ship, yes. Personally I have no plan to use non-empty ping/pong body.

As Bruce listed, there're some other issues raised recently. Here are my thoughts on them.

a) Allow multiple in-flight Pings?
Yes. Harmless. Jamie's opinion makes sense. Keep the current text.

b) Allow Ping and Pong to have a body?
Yes. Harmless. Keep the current text.

b-yes-1) Disambiguate solicited and unsolicited Pong by the spec?
I can live without this, but I think we should.

b-yes-2) Allow the Pong body to contain extra data beyond just echoing the Ping body?
OK. Harmless. I don't have any preference on this. This needs text change.

c) Have solicited Pong respond to only the most recent Ping?
I don't understand why we allow this kind of unsynchronized behavior purposely. It's not a good way to discourage multiple in-flight Pings. If it's good to disallow multiple in-flight Pings, the spec should say "multiple in-flight Pings MUST not be sent" directly. I think most of implementation would handle received data frame-by-frame. Once it sees a Ping frame, it will enqueue a Pong to its sending queue, forget it and move on the next frame. This text looks just confusing.
Again, I can live with this.

Thanks,
Takeshi