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

Salvatore Loreto <salvatore.loreto@ericsson.com> Fri, 13 May 2011 06:31 UTC

Return-Path: <salvatore.loreto@ericsson.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 A01DBE06A7 for <hybi@ietfa.amsl.com>; Thu, 12 May 2011 23:31:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.598
X-Spam-Level:
X-Spam-Status: No, score=-106.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, 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 ZnOYDP5ad9sc for <hybi@ietfa.amsl.com>; Thu, 12 May 2011 23:31:52 -0700 (PDT)
Received: from mailgw9.se.ericsson.net (mailgw9.se.ericsson.net [193.180.251.57]) by ietfa.amsl.com (Postfix) with ESMTP id 1D1F4E0657 for <hybi@ietf.org>; Thu, 12 May 2011 23:31:51 -0700 (PDT)
X-AuditID: c1b4fb39-b7cc5ae000006f6d-65-4dccd056b381
Received: from esessmw0191.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw9.se.ericsson.net (Symantec Mail Security) with SMTP id BB.6C.28525.650DCCD4; Fri, 13 May 2011 08:31:50 +0200 (CEST)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0191.eemea.ericsson.se (153.88.115.85) with Microsoft SMTP Server id 8.3.137.0; Fri, 13 May 2011 08:31:04 +0200
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3]) by mail.lmf.ericsson.se (Postfix) with ESMTP id 3FDF824F7 for <hybi@ietf.org>; Fri, 13 May 2011 09:31:04 +0300 (EEST)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 016CD50DFA for <hybi@ietf.org>; Fri, 13 May 2011 09:31:04 +0300 (EEST)
Received: from n244.nomadiclab.com (localhost [127.0.0.1]) by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id AA7C650908 for <hybi@ietf.org>; Fri, 13 May 2011 09:31:03 +0300 (EEST)
Message-ID: <4DCCD027.5030002@ericsson.com>
Date: Fri, 13 May 2011 09:31:03 +0300
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
MIME-Version: 1.0
To: hybi@ietf.org
References: <BANLkTi=-ZD024mJ99P8acwZZOQqFkv+O0w@mail.gmail.com>
In-Reply-To: <BANLkTi=-ZD024mJ99P8acwZZOQqFkv+O0w@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------060300090500020700070401"
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
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: Fri, 13 May 2011 06:31:53 -0000

<as individual contributor>

I agree with the fact that coordinating Ping and Pong body value assigment,
so that unsollicited Pong and reply Pong do not conflict each other,
should be clearly specified in the spec instead of leave this duty to 
the implementors or service designers.


More I share the concern Magnus has on the text in Section 4.5.2;
the text reduce significantly the possibility to develop future 
extensions based on ping/pong.
If people think that it is OK, I won't oppose, but I want to be sure 
that people are well aware of this fact.

    On 4/29/11 8:00 PM, Magnus Westerlund wrote:

    28. Section 4.5.2:

    The message
        bodies (i.e. both the Extension data (if any) and the Application
        data) of the Ping and Pong MUST be the same.

    I find the fact that the extension body data needs to be the same to be
    an issue. If one develops an extension that actually has to do with the
    frames and their transport then not being able to change the data will
    be an issue. As an example could be a Websocket RTT measurement
    extension where you like to include in the PONG both the PING sending
    time from the PING message and the amount of time between receving PING
    and sending PONG. Thus requiring one to add additional data.




-- 
Salvatore Loreto
www.sloreto.com


> (Detaching from TSV review thread)
>
> Greg,
>
> I see. Sounds ok to use assignment like that. As you said "it's over 
> reliable transport" in reply to my message, we don't need to use 
> sequence number as ping/ICMP does since there's no loss or reorder. 
> Maybe just \x00 (reply to ping) or \x01 (unsolicited) would be fine.
>
> Basically, I don't think it's good idea to make it duty of implementor 
> or service designer to choose body for Ping and unsolicited Pong 
> properly. That should be covered by the spec to reduce what to be 
> cared by user if possible. What do you think about specifying some 
> rule for the body strings to be used for Ping and unsolicited Pong in 
> the spec?
>
> - application data of Ping must start with \x00
> - application data of in-reply-to Pong MUST have the same body as the 
> received Ping
> - application data of unsolicited Pong must start with \x01
>
> I think the following is clearer.
>
> - when received Normal-Ping (Ping with its application data starting 
> with \x00), reply with Pong with the same body
> - when received NOP-Ping (Ping with its application data starting with 
> \x01), just ignore it
>
> On Fri, May 13, 2011 at 07:29, Greg Wilkins <gregw@intalio.com 
> <mailto:gregw@intalio.com>> wrote:
>
>     Takeshi,
>
>     what I have seen before is the use of sequence numbers where the
>     client side uses even and the server side uses odd, so can tell by the
>     seq number in a pong where it was generated and thus tell if it is a
>     response or unsolicited.
>
>     cheers
>
>
>     On 13 May 2011 04:36, Takeshi Yoshino <tyoshino@google.com
>     <mailto:tyoshino@google.com>> wrote:
>     >>   Obviously there is a chance that a unsolicited pong matches a
>     ping,
>     >> but some careful design of payloads can easily fix that.
>     >
>     > I see. Coordinating body value assignment so that unsolicited
>     one and reply
>     > one don't conflict each other (e.g. "ABC" and "XYZ" as you said)
>     is one
>     > possible solution.
>     > This should be discussed well when we add some keep alive
>     feature to browser
>     > that sends Ping to the server. If we prepare some API for
>     JavaScript to tell
>     > the browser what string to use for Ping, service designers may
>     coordinate
>     > assignment by themselves. If we don't, we should reserve some
>     string to be
>     > used for Ping/unsolicited Pong by browsers to avoid collision.
>     > ----
>     > Isn't it simpler to reserve some string, say "NOOP" (or "\x00"
>     to save
>     > bytes), for Ping body and require endpoints to ignore such Ping
>     rather than
>     > diverting Pong for heartbeat?
>     > Thanks,
>     > Takeshi
>
>