Re: [rtcweb] Data Channel Negotiation

Martin Thomson <martin.thomson@gmail.com> Mon, 11 February 2013 21:44 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 20A9F21F8682 for <rtcweb@ietfa.amsl.com>; Mon, 11 Feb 2013 13:44:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.799
X-Spam-Level:
X-Spam-Status: No, score=-4.799 tagged_above=-999 required=5 tests=[AWL=-1.200, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
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 Ze5N9oMCkxxb for <rtcweb@ietfa.amsl.com>; Mon, 11 Feb 2013 13:43:59 -0800 (PST)
Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by ietfa.amsl.com (Postfix) with ESMTP id 35AEC21F8893 for <rtcweb@ietf.org>; Mon, 11 Feb 2013 13:43:59 -0800 (PST)
Received: by mail-wi0-f173.google.com with SMTP id hq4so3698969wib.12 for <rtcweb@ietf.org>; Mon, 11 Feb 2013 13:43:58 -0800 (PST)
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=c3Ei2DILfB+QwTDL+vItArHelZwf5tOp4FboLdL6Ls4=; b=ohPoMQXYueP6sbvwayB0Hy/19uKSgaq5Qt7SO+MjyjOCXJKTuBdiaIYfVgmrCkRQFw x4dWsiRHaBlrPDvS3QvOuIrlsjUilVLFKhQWzkTBN619nVuYFPdnioVLKHT08LfyzvHa bVMNR3kI8wRiHdCTKtZQJWP5WlQJ8Dk8W5fqK8gJPV1Vs0ZHvE/yqbtcCeo1pb+c6pSy AtctSxNCi+8uNqdNwUgOVHJBS741g0GJnZzoIiiceVmx1zPW0BGcYTd4EAM4sqNkFbfG DPiXROtLTOs6s6zoe4oap2aEu6e5TB61vNfPUxrxyqDi+B27W7AIYp3wP2MvmkkLq5LY 3vBQ==
MIME-Version: 1.0
X-Received: by 10.194.76.37 with SMTP id h5mr19699050wjw.21.1360619038398; Mon, 11 Feb 2013 13:43:58 -0800 (PST)
Received: by 10.194.5.135 with HTTP; Mon, 11 Feb 2013 13:43:58 -0800 (PST)
In-Reply-To: <F472FE00-D8F8-4D28-BC9F-201E6DE1E2C0@lurchi.franken.de>
References: <CABkgnnWUpMSBLioSD2+p82vGszX9R0Q4WFfME5j-DuK+B7KVJw@mail.gmail.com> <C6503CC4-34D6-408A-8EFC-037F1668DDD0@lurchi.franken.de> <CABkgnnWWF5LCm7YqfUT9LY4mkHS5E5n2miihA_ymStcOBcbgrw@mail.gmail.com> <F472FE00-D8F8-4D28-BC9F-201E6DE1E2C0@lurchi.franken.de>
Date: Mon, 11 Feb 2013 13:43:58 -0800
Message-ID: <CABkgnnXjudNXg_ETBaGeNTUy8D+rp6q5Eji4BTQrBy467eU3PA@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
Content-Type: text/plain; charset="UTF-8"
Cc: Randell Jesup <randell-ietf@jesup.org>, "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Data Channel Negotiation
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: Mon, 11 Feb 2013 21:44:00 -0000

On 11 February 2013, Michael Tuexen <Michael.Tuexen@lurchi.franken.de> wrote:
> One important thing is that they tie the two outgoing streams together.
> Each side controls its outgoing streams.
> The other things are just declaring channel properties...

The binding between stream X in one direction and stream X in the
other is as strong - or as loose - as the application needs.  This is
a departure from what was previously specified, but I think that the
advantages (0 RTT establishment) outweigh the disadvantages.


>>> How do you handle a shortage in the number of streams? How do you
>>> handle collisions if both sides want to open a data channel and
>>> chose the same streams?
>>
>> A shortage is easy, createDataChannel can throw an exception.
>>
>> Collisions are also easy - if you care about consistency, then do an
>> offer/answer, which has inbuilt glare resolution.  If you don't care
>> about consistency, both sides can create and use channels without
>> having to agree on the details.  (That's mostly based on the stuff
>> below.
> However, *if* data channels are bidirectional (which they currently are),
> then you need to tie two streams together. This has to be done somehow.
> I'm wondering how you envision this without using SDP and without the
> data channel protocol...

The easiest way to tie two channels together is to use the stream
number.  That is what I was proposing.

(If stream numbers are used, then you don't even need to have a strong
uniqueness guarantee on the label.)

In the case that this is negotiated, then the guarantee is exactly the
same as the one provided previously.  Otherwise, it's a little less
strong.  If both sides create a channel at the same time, then they
could be bound together without any strong assurances about the exact
nature of the bidirectionality guarantee.  Now, I'm OK with that.  You
may not be.

> If we change to data channels being uni-directional, then most of
> the stuff done by the data channel protocol is not required... I agree
> with that conclusion.
> However, currently that the bi-directional.

The API would remain bi-directional.  In fact, the API would be
unchanged, except as it pertains to timing of channel use.  The
guarantees with respect to consistency would be weaker than what is
provided, depending (again) on that timing.

> Instead of "prevent sending the return message" which would one side
> waiting forever,

That presumes a lot.  Many protocols have one-way messages.

> I would prefer sending some sort of error message
> (which is currently not specified enough in the data channel protocol).

This also assumes that you have some channel upon which to end this
error message, plus a definition for the error message.  I'm looking
to have less protocol machinery, not more.

>> number of channels to the lower of the two stream limits.  I prefer
>> the latter.
> As long as you know this limit... But RFC 6525 allows you to increase the
> number of streams (unless the peer agrees to do so).

Negotiating stream limits up doesn't seem like a particularly likely
thing in this sort of environment.  That said, we probably need to
decide if this is a feature that we want to have available.  If it is
available, then this could be used in the case that the limits are
reached.

>> b. There is no guarantee that the other side hasn't already created a
>> data channel on the same number.  That's not a problem - you just end
>> up with asymmetry.
> This is a normal case with the current data channel protocol. The
> stream identifiers might not be the same in both directions.
> When testing with the current implementation in Firefox, this actually
> happens a lot.

Interesting.  I'd be interested in learning how this would be signaled
and what the advantages of this arrangement are.