Re: [rtcweb] #13: Transport of DATA_CHANNEL_OPEN

Martin Thomson <martin.thomson@gmail.com> Wed, 17 April 2013 18:46 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1504621E8055 for <rtcweb@ietfa.amsl.com>; Wed, 17 Apr 2013 11:46:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.099
X-Spam-Level:
X-Spam-Status: No, score=-4.099 tagged_above=-999 required=5 tests=[AWL=-0.500, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nDrpT-2ZFu1E for <rtcweb@ietfa.amsl.com>; Wed, 17 Apr 2013 11:46:40 -0700 (PDT)
Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by ietfa.amsl.com (Postfix) with ESMTP id 58DC421E8047 for <rtcweb@ietf.org>; Wed, 17 Apr 2013 11:46:40 -0700 (PDT)
Received: by mail-wg0-f47.google.com with SMTP id j13so1920264wgh.2 for <rtcweb@ietf.org>; Wed, 17 Apr 2013 11:46:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=lXV8IK/Ry3mTZZye1PvFBUCLxCFx6LK46T/a+CKQ1oM=; b=jMXPZABWOPgDS4CEOEt5Lz3awSmdBp3A1ckqJ57p6GBv8MaNvkLYSUa/ULqnYWW5Z7 xbRAMxiuixhZdXFmaxLao0PRIbtKgU+OYCd2pMfQ0gFLaCMxUhyt/SiZkUJ9xKmfLUY9 EQJrnUjQRaP3DPWe4eV4OTE2ScTE8WKW+gfJA/ODzLp7PRka05BaFfqnJIa65oGCVzGg yaOoMzaQW2pjWXa72rgzH+jymyWkQX9Cur8NR4b9GOMOuQZAHN29mCss08IiCqXiv2nv Je4TRRlZRX18k6Nj5KAkVIQJdtr7zCE7lN4KFdlRAxxlRx+pV2eiC1W8+RAL1pU1wny/ OnjQ==
MIME-Version: 1.0
X-Received: by 10.180.79.6 with SMTP id f6mr28181331wix.26.1366224399535; Wed, 17 Apr 2013 11:46:39 -0700 (PDT)
Received: by 10.194.28.195 with HTTP; Wed, 17 Apr 2013 11:46:39 -0700 (PDT)
In-Reply-To: <CAJrXDUFgxLT3-1HehKbg5byzifFi4Obe3XW9G4sbWRbnU+Hi1A@mail.gmail.com>
References: <066.3120a55540cacaa74ee5fda0b5273a48@trac.tools.ietf.org> <516CE3EC.2050804@jesup.org> <CABkgnnVaTOLa-hs7AtEgaTk7eq00bEkCY+_8L96Y8pooqybBxA@mail.gmail.com> <CAJrXDUFgxLT3-1HehKbg5byzifFi4Obe3XW9G4sbWRbnU+Hi1A@mail.gmail.com>
Date: Wed, 17 Apr 2013 11:46:39 -0700
Message-ID: <CABkgnnXr85LZyJiSF+ok2KMS_xQnS0CE4VBq4PvEhBBscn2QZQ@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Peter Thatcher <pthatcher@google.com>
Content-Type: text/plain; charset="UTF-8"
Cc: Randell Jesup <randell-ietf@jesup.org>, "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] #13: Transport of DATA_CHANNEL_OPEN
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
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: Wed, 17 Apr 2013 18:46:41 -0000

On 17 April 2013 08:34, Peter Thatcher <pthatcher@google.com> wrote:
> What does the browser do when it receives data
> before an OPEN message for a SID that is not currently configured to receive
> data (ie JS has not called create channel for that SID and we've not
> received an OPEN for that SID)?

This is the key.  Doubly so in light of:

> A reminder:  If the JS specifically sets the SID when creating a data
> channel, then it can receive data without getting an OPEN message.

The only reasonable thing to do is to buffer data with an upper bound
on time, size and number of messages.  When any of those limits are
hit, then you need to do something.

> I think at that point, we either have to drop data or fire an event up to JS
> letting it know.  I would suggest that after some buffer limit N, the
> browser may fire .ondatachannel even if an OPEN message is not received, and
> then deliver buffered data through the channel given in that event.  The
> only alternative seems to be to just drop the data without telling the JS.
> Are there are any other alternatives I haven't thought of?

I see the same two options: create a data channel with some default or
inferred properties and fire events for the arrived messages, or
complain loudly and chuck the messages away.

I like the former, but we've violated expectations about consistency
of channel properties.  And this time its our (as a browser, that is)
fault, we were asked to do something and we failed to do it.  Packet
loss happens and we didn't allow for it.