Re: [rtcweb] I-D Action: draft-ietf-rtcweb-data-protocol-01.txt

Paul Kyzivat <pkyzivat@alum.mit.edu> Sat, 26 October 2013 22:30 UTC

Return-Path: <pkyzivat@alum.mit.edu>
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 6DD6911E81EC for <rtcweb@ietfa.amsl.com>; Sat, 26 Oct 2013 15:30:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.048
X-Spam-Level:
X-Spam-Status: No, score=0.048 tagged_above=-999 required=5 tests=[AWL=-0.115, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_NET=0.611, J_CHICKENPOX_13=0.6, RDNS_NONE=0.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 G47BoGIfj7O1 for <rtcweb@ietfa.amsl.com>; Sat, 26 Oct 2013 15:30:48 -0700 (PDT)
Received: from qmta14.westchester.pa.mail.comcast.net (qmta14.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:44:76:96:59:212]) by ietfa.amsl.com (Postfix) with ESMTP id 978CC11E81D1 for <rtcweb@ietf.org>; Sat, 26 Oct 2013 15:30:48 -0700 (PDT)
Received: from omta16.westchester.pa.mail.comcast.net ([76.96.62.88]) by qmta14.westchester.pa.mail.comcast.net with comcast id hyW71m0011uE5Es5EyWooy; Sat, 26 Oct 2013 22:30:48 +0000
Received: from Paul-Kyzivats-MacBook-Pro.local ([50.138.229.164]) by omta16.westchester.pa.mail.comcast.net with comcast id hyWn1m00X3ZTu2S3cyWn2l; Sat, 26 Oct 2013 22:30:48 +0000
Message-ID: <526C4297.2000006@alum.mit.edu>
Date: Sat, 26 Oct 2013 18:30:47 -0400
From: Paul Kyzivat <pkyzivat@alum.mit.edu>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
MIME-Version: 1.0
To: rtcweb@ietf.org
References: <20131021191343.32574.60876.idtracker@ietfa.amsl.com> <03FBA798AC24E3498B74F47FD082A92F3D86C821@US70UWXCHMBA04.zam.alcatel-lucent.com> <A87B4291-FA11-43BB-B8F0-55C59CF63421@lurchi.franken.de> <CAOJ7v-20YkvazNLqmbjQcOkhaedd+MKm8d6x2oeL46imvuLrzA@mail.gmail.com> <03FBA798AC24E3498B74F47FD082A92F3D86C8DB@US70UWXCHMBA04.zam.alcatel-lucent.com> <120FE29C-150E-47BF-951C-B8124EB7A262@lurchi.franken.de> <03FBA798AC24E3498B74F47FD082A92F3D86C9A2@US70UWXCHMBA04.zam.alcatel-lucent.com> <5269F3B5.2020308@alvestrand.no> <03FBA798AC24E3498B74F47FD082A92F3D86CD4C@US70UWXCHMBA04.zam.alcatel-lucent.com>
In-Reply-To: <03FBA798AC24E3498B74F47FD082A92F3D86CD4C@US70UWXCHMBA04.zam.alcatel-lucent.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1382826648; bh=2wdlussntnQthENuwSj4doPdsw2CHhIlTzvDgin7ZFw=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=hhHdcXmNK1McoNByLF/mRebOeXjH4vYWNUijPQM5dRBELFy4Z+TRIrixfFEpE1IwJ 5CZazr0L9j7GpUkin5UpCY0ZAcdl4ruvCDr2240gM0+lIjcebyoi2m8NVzs9czYegQ ANZC/y7OAsm+JNxyRCO2fOlQ8Y2/KSj1u5l3I0YroFbaQiMdgKxAX9vu1J/0EK6WHD wb5syZiqevNb0FebdyzyZhuLSyMHrb/JuIQsSR3j9sken6zRtCKthibRQw0K1Je15A JL9smMA1RNTNXtpOa1Vv0fqvT5JLFAlFImcKAVs/XfFDhKUsyqLaSHkEbR4FUDN3wZ FDzGHvtt8Gv7Q==
Subject: Re: [rtcweb] I-D Action: draft-ietf-rtcweb-data-protocol-01.txt
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, 26 Oct 2013 22:30:53 -0000

Richard,

On 10/25/13 4:51 PM, Ejzak, Richard P (Richard) wrote:
> Hi Harald,
> You said: " I can't see a way to mix the two paradigms that guarantees this never happening."  The two paradigms being browser selection vs. application selection of data channel stream ids.
>
> I agree with this statement if the browser selection algorithm is based on DTLS role since the application needs to be able to select ids before the DTLS role is known.  It is also clear that this is not an easy problem to solve since the peers need to interact in some way before their relative roles are clearly established.
>
> I am ok with documenting this limitation clearly (i.e., that the application should use either browser selection of stream ids or application selection of stream ids but not both together) but have a suggested alternative solution for consideration.  I would prefer a solution where the two paradigms can be "mixed", if one can be agreed.
>
> My proposal has three elements, which together can guarantee that there are no stream id allocation conflicts between peers:
> 	1. The browser and application select stream ids based on initial SDP offerer/answerer role rather than DTLS role (e.g., initial offerer uses even ids, initial answerer uses odd ids).  With this rule, the offering application knows its role immediately without waiting for the DTLS or SDP handshake to occur.

A similar issue has come up in the discussion of partial offers/answers. 
(Regarding how to assign a=mid values.) And a similar solution was proposed.

It was then rejected on the basis that sometimes both "ends" think they 
are offerers or answerers. This comes about as a result of 
signaling-only B2BUAs that play games with O/A on two legs.

	Thanks,
	Paul

> 	2. For early data channel creation, the browser assumes that it will take the offerer role in selecting stream ids until the application determines its role through the API (using JSEP API calls).
> 	3. The answerer application refrains from requesting browser selection of stream ids when creating data channels until after the browser knows it will take the answerer role (based on the sequence of JSEP API calls).  This is not a significant limitation since the answerer will typically not even create its end of the peer connection until after it receives the offer.
>
> This approach also has the advantage of being consistent with the data channel API spec as it is currently written, which requires stream id assignment at the time of data channel creation.
>
> Another (admittedly secondary) advantage of choosing a new selection algorithm that makes the two paradigms compatible would be that external negotiation options could use the same algorithm and also be fully compatible with the in-band options.
>
> BR, Richard
>
>> -----Original Message-----
>> From: rtcweb-bounces@ietf.org [mailto:rtcweb-bounces@ietf.org] On
>> Behalf Of Harald Alvestrand
>> Sent: Thursday, October 24, 2013 11:30 PM
>> To: rtcweb@ietf.org
>> Subject: Re: [rtcweb] I-D Action: draft-ietf-rtcweb-data-protocol-
>> 01.txt
>>
>> On 10/24/2013 10:38 PM, Ejzak, Richard P (Richard) wrote:
>>> Hi Michael,
>>>
>>>> From: Michael Tuexen [mailto:Michael.Tuexen@lurchi.franken.de]
>>>> Sent: Thursday, October 24, 2013 2:21 PM On Oct 24, 2013, at 8:36
>> PM,
>>>> "Ejzak, Richard P (Richard)"
>>>> <richard.ejzak@alcatel-lucent.com> wrote:
>>>>
>>>>> Justin, Michael,
>>>>> Thanks for the clarifications.  One more question.  What happens if
>>>> the application tries to select a stream id before the DTLS role is
>>>> known and it ends up selecting an invalid one?
>>>> I'm not completely familiar with the JS API, but if you want to
>>>> select a stream, aren't you managing the stream completely on your
>>>> own. I think the DTLS role stuff is only relevant if the streams are
>>>> managed by the browser.
>>> If this is the intent then that clarification would be very useful.
>> Reading the API text again, it is clear that the browser only manages
>> stream ids that it selects.  Does this mean that the browser stream id
>> selection option is not compatible with the application stream id
>> selection option?  Putting it more precisely, should we require that
>> the application not be allowed to select stream ids prior to
>> determining DTLS role if it expects that either side might use the
>> browser stream id selection option?  It would be easier if the even/odd
>> rule could be determined earlier than DTLS role establishment so that
>> the application could use the same even/odd assignment rule for early
>> data channel creation.
>>
>> My reading has been that once you start selecting IDs, you're
>> responsible for making sure those don't collide with platform-generated
>> ones, or deal with the result if they do.
>>
>> The result of
>>
>> A: pc.createDataChannel(label="foo") -> (channel with ID = 5, open
>> message sent)
>> B: pc.createDataChannel(label="bar", id=5) <open message arrives at B>
>>
>> should be well defined. I don't much care what the result is, as long
>> as it's well defined; closing the channel and calling the onerror()
>> handler with DOMError(error="UsageError", message="Duelling paradigms")
>> is fine with me.
>>
>> I can't see a way to mix the two paradigms that guarantees this never
>> happening.
>>
>>>
>>>>> Michael,
>>>>> While it's true that the data channel control protocol cannot open
>>>> the channel with the peer before the DTLS role is known, the API
>>>> allows the application to create the data channel before the DTLS
>>>> role is known, in which case the sending of the Open message must
>>>> wait until the SCTP association is established.  I want to know what
>>>> the application is supposed to do it if needs to create data
>> channels
>>>> with preselected stream ids before the DTLS role is known.  This
>>>> seems like something that the spec should make clear rather than
>>>> leaving it to implementation.
>>>> Can you assign the stream ID in the API? Could you point me to the
>>>> text?
>>> http://www.w3.org/TR/webrtc/#methods-1 describes the "id" attribute
>> in the RTCDataChannelInit dictionary that must be the equivalent of the
>> "stream identifier".  No other interpretation makes sense to me but
>> please correct me if I am wrong.  Note in particular the following text
>> within the description of the createDataChannel procedure (my
>> parenthetical): "If the value of the id attribute is null, initialize
>> it to a value generated by the user agent (browser), according to the
>> WebRTC DataChannel Protocol specification, and skip to the next step.
>> Otherwise, if the value of the id attribute is taken by an existing
>> RTCDataChannel, throw a TBD exception and abort these steps."  So "id"
>> must refer to "stream identifier" since there is no other id in your
>> draft that it could refer to.
>>>
>>> If I'm right, then it would be good if it were made clear that id
>> refers to "stream identifier", but that is a w3c issue.  Quoting from
>> 5.2.1 (my parentheticals for clarity): "The id was either assigned by
>> the user agent (browser) at channel creation time (not channel opening
>> time) or selected by the script (application). The attribute MUST
>> return the value to which it was set when the RTCDataChannel was
>> created (not opened)."
>>>
>>> I used the wrong terminology in my earlier mail when I referred to
>> "open" of the data channel when I meant "creation".  Since the data
>> channel can be "created" before DTLS role is known and before the data
>> channel can be opened, the quoted text above would seem to indicate
>> that the application can never determine the stream id actually
>> assigned to the data channel if id can't be determined at time of
>> creation.  Justin implied that the chrome behavior does not conform to
>> this description.  Comment, Justin?
>>>
>>> It still seems to me that a change in the rule describing even/odd
>> stream id assignment would be a good idea.
>>>
>>> BR, Richard
>>> _______________________________________________
>>> rtcweb mailing list
>>> rtcweb@ietf.org
>>> https://www.ietf.org/mailman/listinfo/rtcweb
>>
>> _______________________________________________
>> rtcweb mailing list
>> rtcweb@ietf.org
>> https://www.ietf.org/mailman/listinfo/rtcweb
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>