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

Takeshi Yoshino <tyoshino@google.com> Wed, 25 May 2011 06:32 UTC

Return-Path: <tyoshino@google.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 28514E079F for <hybi@ietfa.amsl.com>; Tue, 24 May 2011 23:32:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.976
X-Spam-Level:
X-Spam-Status: No, score=-105.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 iIFfPzvAPp5o for <hybi@ietfa.amsl.com>; Tue, 24 May 2011 23:31:59 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by ietfa.amsl.com (Postfix) with ESMTP id 37741E075E for <hybi@ietf.org>; Tue, 24 May 2011 23:31:59 -0700 (PDT)
Received: from hpaq7.eem.corp.google.com (hpaq7.eem.corp.google.com [172.25.149.7]) by smtp-out.google.com with ESMTP id p4P6Vv8h002402 for <hybi@ietf.org>; Tue, 24 May 2011 23:31:57 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1306305117; bh=zeF329QHy6mLfGngH/2owR67c2I=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=udF8YRsAD8hHEroFvyRcr+sYaT5b2KWFGYCdVMpVKJ22STmBmryTLd5R/NvK++Ax8 nlwHyBxbSuFDxyD3rDx5A==
Received: from gyf3 (gyf3.prod.google.com [10.243.50.67]) by hpaq7.eem.corp.google.com with ESMTP id p4P6VtmI025230 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Tue, 24 May 2011 23:31:56 -0700
Received: by gyf3 with SMTP id 3so3692686gyf.31 for <hybi@ietf.org>; Tue, 24 May 2011 23:31:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=wm3WoMugltz7JxsXQ2/pdJsMGgDt+YHnualfYP363sk=; b=LiiGMDnia9jEYw+DnEK4c6ingVSNAxYUIpNr6p5V854xZyaIN5CjwphEulb+rxu620 l/Ykh2Hj9/aZeGXKVTWg==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=hTReTLVhyKE95ibDagliWkAv83WmMuyFKla492X8NgLg3YOa9yZqpGiGZy62ZAZ5xP WsryjlmPAgdGEqJfPc6A==
Received: by 10.151.99.21 with SMTP id b21mr5062652ybm.57.1306305115091; Tue, 24 May 2011 23:31:55 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.50.13 with HTTP; Tue, 24 May 2011 23:31:35 -0700 (PDT)
In-Reply-To: <1306294656.1782.50.camel@ds9>
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>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Wed, 25 May 2011 15:31:35 +0900
Message-ID: <BANLkTikx=mg_ACZDjhSvD+gma5UgMbJq7g@mail.gmail.com>
To: Patrick McManus <pmcmanus@mozilla.com>
Content-Type: multipart/alternative; boundary="0015174c1c1e5a75c304a413dcaa"
X-System-Of-Record: true
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: Wed, 25 May 2011 06:32:00 -0000

On Wed, May 25, 2011 at 12:37, Patrick McManus <pmcmanus@mozilla.com> wrote:

> right, without further changes to the protocol. Then we could ship
> websockets and people could start writing applications instead of
> documents. Stability is a worthwhile goal.


I really care the time of shipment, too. I don't want this to be show
stopper, but want to get attention to this point from people who want to use
some extended Ping, unsolicited Pong, etc. to get this thought out enough.


> >  enough, maybe I would use random bytes of 3 or more byte long.
>
> right. The ping-generating-peer doesn't need cooperation from the other
> peer in order to create a unique payload. Interoperabiity does not
>

Yes.


> require that each end use the same algorithm - either the client or the
> server can be the ping generating peer.
>

Sorry, I couldn't get you. A and B don't have to use the same algorithm, but
in fact those algorithms need coordination. A's algorithm must choose X for
its Ping where X != Y which B's algorithm chooses for its unsolicited
Pong. Well, I agree that I'm saying something paranoid, but it's true.

How about this? Semantically a bit smaller change.
"Body of Ping and unsolicited body can be empty. IF Ping or unsolicited Pong
have non-empty body, they must start with 0x00 and 0x01"
This doesn't break interoperability with -07 or add new constraint to body
as long as the user-agent doesn't have any data to be put into body. When
some peer want to disambiguate them, it can safely do it by prefixing body
with 0x00 or 0x01 without any new negotiation, coordination or randomness.

For any foobar,
0x00 foobar != 0x01 foobar
0x00 foobar != ""
0x01 foobar != ""