Re: [rtcweb] Data Channel Negotiation

Randell Jesup <randell-ietf@jesup.org> Sat, 09 February 2013 15:24 UTC

Return-Path: <randell-ietf@jesup.org>
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 81D4721F88E4 for <rtcweb@ietfa.amsl.com>; Sat, 9 Feb 2013 07:24:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
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 p3lgLtO1BVz3 for <rtcweb@ietfa.amsl.com>; Sat, 9 Feb 2013 07:24:42 -0800 (PST)
Received: from r2-chicago.webserversystems.com (r2-chicago.webserversystems.com [173.236.101.58]) by ietfa.amsl.com (Postfix) with ESMTP id C860921F85DA for <rtcweb@ietf.org>; Sat, 9 Feb 2013 07:24:42 -0800 (PST)
Received: from 216-206-165-162.dia.static.qwest.net ([216.206.165.162]:58107 helo=[192.168.5.197]) by r2-chicago.webserversystems.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80) (envelope-from <randell-ietf@jesup.org>) id 1U4CIE-000Bgh-27 for rtcweb@ietf.org; Sat, 09 Feb 2013 09:24:42 -0600
Message-ID: <51166A3C.4000604@jesup.org>
Date: Sat, 09 Feb 2013 10:24:44 -0500
From: Randell Jesup <randell-ietf@jesup.org>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20130117 Thunderbird/19.0
MIME-Version: 1.0
To: rtcweb@ietf.org
References: <CABkgnnWUpMSBLioSD2+p82vGszX9R0Q4WFfME5j-DuK+B7KVJw@mail.gmail.com> <5113CD16.6090806@jesup.org> <CABkgnnW792o76t9dKhidOMJpa21VcbPQZFU1HYnY_yjTPCWhYw@mail.gmail.com>
In-Reply-To: <CABkgnnW792o76t9dKhidOMJpa21VcbPQZFU1HYnY_yjTPCWhYw@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - r2-chicago.webserversystems.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - jesup.org
X-Source:
X-Source-Args:
X-Source-Dir:
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: Sat, 09 Feb 2013 15:24:43 -0000

On 2/8/2013 4:21 AM, Martin Thomson wrote:
> On 7 February 2013 10:49, Randell Jesup <randell-ietf@jesup.org> wrote:
>> The proposal I made yesterday (though I really didn't get a chance to
>> present it) was purely declarative in the SDP (the mixed case I proposed).
>> They were stand-ins for the Open in-band messages and carried the same
>> declarative info.
> The difference, from what I saw, was that the declarations in your
> examples showed stream 1 in the offer and no stream 1 in the answer.
> This would require that stream 1 appear in the answer with the
> attributes that the answerer had assigned (which we would require to
> be the same as the offerer, unless the answerer side had already had
> created a DataChannel).

As I mentioned, it was purely declarative (no response/negotiation), 
which is why the return SDP doesn't have them.

If you were to extend this to work for renegotiations where glare is 
possible, you'd have to either wait for the renegotiation to finish, or 
use some even/odd sort of trick which was proposed way back when on the 
list.

>> This limit probably can be relaxed; Websockets allows IIRC 71-bit lengths
>> ...  just in case you need them.
> 63 bit.  A poor decision in my opinion, but we need to respect working
> group consensus.

Ah yes, you're correct, 63 bits (encoded in 71 bits).  So small!


My proposal:
>> I like (a lot) the declarative approach, and all the complications were due
>> to needing to fulfill glare considerations (now resolved by not requiring
>> resolving of label glare and not requiring bidirectional stream pairs have
>> the same number), and due to the requirement for websockets compatibility
>> with onOpen (and to not fire it until you have positive notification from
>> the other side). If you drop that last part, you have immediate declarative
>> 0-RTT opening time DataChannels.  I would propose keeping things simpler for
>> users and to use the wireline protocol for the declaration/response, and
>> avoid all the weirdnesses around labels, protocols and modes caused by
>> dropping it.
>>
>> I like your Layer 2, but with the wireline protocol previously speced.  It
>> gets you all the label/mode/etc sync stuff, and merely rules out option A
>> (or requires you to dedicate a control stream).
> If we have out-of-band negotiation, the only thing that the protocol
> needs is a type indicator (one bit).  Reserve the other 7 bits (or 254
> values) and we're done.  There is no benefit to the control messages.

Out-of-band negotiation means either:

a) SDP offer/answer (which in many cases will go via a central server, 
though it can go over an existing datachannel), min 1 RTT (perhaps 
1-RTT-through-server) plus SDP processing delay, and requires 
implementing error handling for cases where the answers and offers don't 
properly match up,

b) a single control stream, which works, but it adds complexity since 
SCTP doesn't make between-stream guarantees about delivery, so you have 
to either have a handshake on the control stream before sending data (1 
RTT at least), or you need to have methods in place to handle 
out-of-order control versus data delivery, or

c) application-implemented out-of-band negotiation, which just (IMHO) 
pushes the problem off onto the application without solving any problems 
for the general case.  In the (fairly common) app talking to another 
instance of itself or a "known" peer, the application could pre-define 
what streams/channels mean, if we surface the stream numbers to the API 
(this would be far closer to the old 'raw SCTP' proposals, which push a 
lot over onto the app). This would also make interoperating in 
federation cases considerably more complex.

The reason the current in-band protocol uses in-stream open messages is 
that this avoids any out-of-order delivery issues (they're marked as 
reliable-in-order).  If you relax the don't-send-until-onopen JS 
requirement (which is no work for the wireline protocol; it's already 
supported) and fire onopen immediately on createDataChannel or when a 
channel open comes in, you have 0-RTT startup, and you retain all the 
symmetry, label, protocol, etc that had been previously agreed to.  See 
my quoted proposal above.

Are there real usecases where the in-band Open and OpenResponse messages 
actually cause a usecase not to work?

-- 
Randell Jesup
randell-ietf@jesup.org