Re: [rtcweb] Sending of zero-length messages over data channels

Justin Uberti <juberti@google.com> Thu, 24 July 2014 17:38 UTC

Return-Path: <juberti@google.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 455311A8BB5 for <rtcweb@ietfa.amsl.com>; Thu, 24 Jul 2014 10:38:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.779
X-Spam-Level:
X-Spam-Status: No, score=-0.779 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_44=0.6, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vd7L99vEwhJC for <rtcweb@ietfa.amsl.com>; Thu, 24 Jul 2014 10:38:22 -0700 (PDT)
Received: from mail-vc0-x22a.google.com (mail-vc0-x22a.google.com [IPv6:2607:f8b0:400c:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 01F5F1A0A90 for <rtcweb@ietf.org>; Thu, 24 Jul 2014 10:38:21 -0700 (PDT)
Received: by mail-vc0-f170.google.com with SMTP id lf12so5429031vcb.29 for <rtcweb@ietf.org>; Thu, 24 Jul 2014 10:38:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=SQXHCHksf8rTawQ8E6zkZBO+FS26LUMM8xaKd/l/5JE=; b=el9O8GSqAKFVlqAG9PHprnRUSawNC0OyGJ+S0huK0asYqFbLPVpRMrDyPoxMS73i6V d4SK3wddb2tRMJY1HQVz+BiIBgoE2Ale3mEkuJnp08vUEDEc5g3S6LwSnz+37cbQVNaH sSb7HILZWcXni0wCxAI0xwHubLiQjwI9lV0mQHTLQ5Hny1QeIe6zwMGZ8rT9qgzIT3n6 06H5apIZQ6WgO2t6uDWgWuLTnIbQqFAEBT68aUnk+qAzE8S1RP/qIx0H7bq303q6E3zS zp8WVYfE0lP34Mad7s8VB4tC/seKNsg3GDQC3x0JDM9IZ4/mBAGL3Zb4pBtK3Bvw8kiP mNrg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=SQXHCHksf8rTawQ8E6zkZBO+FS26LUMM8xaKd/l/5JE=; b=f2Dj2hShNDpshU3dWJ+2NS3UMyYn7zG3mLihBZgj69BBKzhTNONANcrmsbuJCPyy6d OBZ3pb4Qfz5Btsl28Yu32KupPJHfulmLV95uLbbmdVQQ8aLc+a7zdjcyWUM/2er6oeky Kokp6dDL6ij/mx7mpCRDkDfjMXeGE5RnzLypllyNFEtE75K4a/joGzVZBjKnHzkj1hjT fDvLS4ijfMRcc9Q9BRkMIAfC2WPSFqLWqMkUnR28k60eztgnsckdp1s9TUjxG5RFZ1DD D1iODbDkHEtgHI1OsLTUvzG89aA68QzQK1733uAUyy7BNSSjhiaLBCkWbOEGSDYQWGsK AUhA==
X-Gm-Message-State: ALoCoQkMfPAJiP43PeaiCIVy6ixrTdZm/LsUEcJ5mgQmvrl1hpadqEB5KjJ6tsdxFyiAT93ggYVG
X-Received: by 10.52.136.196 with SMTP id qc4mr12338516vdb.22.1406223500989; Thu, 24 Jul 2014 10:38:20 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.4.70 with HTTP; Thu, 24 Jul 2014 10:38:00 -0700 (PDT)
In-Reply-To: <E1FE4C082A89A246A11D7F32A95A17828E4BCC13@US70UWXCHMBA02.zam.alcatel-lucent.com>
References: <CAOJ7v-0F9pysYLehjTVDv1Sxz3TKaxi2y6J7RrpGqMdA=tiR_g@mail.gmail.com> <E1FE4C082A89A246A11D7F32A95A17828E4BCC13@US70UWXCHMBA02.zam.alcatel-lucent.com>
From: Justin Uberti <juberti@google.com>
Date: Thu, 24 Jul 2014 13:38:00 -0400
Message-ID: <CAOJ7v-1r-vToAf-rUfZmKsBC4MX4ZXUcAkqahrskF1D3axOpuA@mail.gmail.com>
To: "Makaraju, Maridi Raju (Raju)" <Raju.Makaraju@alcatel-lucent.com>
Content-Type: multipart/alternative; boundary="bcaec51b12bd4087ca04fef3ec67"
Archived-At: http://mailarchive.ietf.org/arch/msg/rtcweb/ItVoMYbfJWYRMug8UI1XQ3bO5zg
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Sending of zero-length messages over data channels
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Jul 2014 17:38:23 -0000

Changing the send() API defeats the purpose of trying to provide full
WebSockets compatibility.

I think the PPID_EMPTY approach (probably PPID_EMPTY_TEXT and
PPID_EMPTY_BINARY, to be precise) is a simple and complete solution.


On Wed, Jul 23, 2014 at 8:00 AM, Makaraju, Maridi Raju (Raju) <
Raju.Makaraju@alcatel-lucent.com> wrote:

>
>
> In the existing data channel protocol, it's not possible to send
> zero-length messages, because SCTP prohibits it.
>
>
>
> While this may seem to be an academic point, it does represent a
> divergence from WebSockets, and this difference could be meaningful to
> applications who use empty messages for keepalives. Or maybe the Yo app.
>
>
>
> Since we can't send a zero-length SCTP message, I propose we add a
> PPID_EMPTY value or something similar to indicate a message with empty
> content.
>
> *[Raju] There is a genuine need for this and the proposal is good. *
>
> *However, I am thinking of an alternate proposal to achieve the same but
> in a generic way. *
>
> *Define a PPID_OOB (out of band) or something similar.*
>
> *Apps can use this to send a message of non-zero length. For the “Yo” kind
> of app or empty stream-level heartbeat purpose, app can send a 1 byte
> length message, which other end’s app ignores.*
>
> *This approach involves bit more API work for webrtc to have a variation
> of send(data, oobFlag) and new data type in onmessage(). IMHO, this
> approach allows more possibilities in future and also the same approach can
> be used by other SCTP use cases not involving webrtc.*
>
>
>
> *BR*
>
> *raju*
>