Re: [rtcweb] DataChannels API and external negotiation

Peter Thatcher <pthatcher@google.com> Thu, 04 April 2013 03:13 UTC

Return-Path: <pthatcher@google.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 6C4D021F84F5 for <rtcweb@ietfa.amsl.com>; Wed, 3 Apr 2013 20:13:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.977
X-Spam-Level:
X-Spam-Status: No, score=-101.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, USER_IN_WHITELIST=-100]
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 I1WKNe6M7euH for <rtcweb@ietfa.amsl.com>; Wed, 3 Apr 2013 20:13:14 -0700 (PDT)
Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by ietfa.amsl.com (Postfix) with ESMTP id C7ED521F84E7 for <rtcweb@ietf.org>; Wed, 3 Apr 2013 20:13:14 -0700 (PDT)
Received: by mail-pd0-f169.google.com with SMTP id 10so1199915pdc.14 for <rtcweb@ietf.org>; Wed, 03 Apr 2013 20:13:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=cWEn+Z0mgnkg42fwBvyLONttB+53lLG9TWSDjNRr0bA=; b=j3WpUzmLnM+JXt+BvJR5Y0NbYTD2KTRkVaVY9R9G/7uwzHU26h4uUBZKvwV+8V31HN WXbqhSjbDISciseUHByLgHrCHpihYvlp7xJtd2E4dwr9sMuJfZOGgsUtw/FtkiP0V6jB udSuO29itk5+boUnESzniLZkzXBX4anbHY6t09BFLZql7ZF6kGB9Qd7tE6ZCrKS3I1Tn V/onupOw3+wubP4qlsrt8qfnOVpnu0outcaV2RnELExro//xZeBkUMFm+OjDtL3RUz6O OqPDAweqt9brw9CAt/J50mUJetRSgdpYZLqJZVxZfZXPhJ/FoLOe9hAHDHLXkCaoZ4FL nMiQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:x-gm-message-state; bh=cWEn+Z0mgnkg42fwBvyLONttB+53lLG9TWSDjNRr0bA=; b=UfSlkXPw9no3yGscaIbHVpqWB8cz8lYoSHApdGY1UaMgA0RcArxkurM37QbLod+Zub tx27kkVtD5qaUol42+SisEmDWwH4HPuN5d7SyZBmzZcDAo3b9kniRimB94ILxLKUaQTW jJQYHqo46cRx0RPfk9vB9OFgHoG/AW38fsxWq7KBM+Uj5gc5vvIeJ+mbfeN/oYI3F6C7 yXAOmNa4ACI9+vIMU1eFxjZEWYuVFnOElM3J/CNfjLnjcQkD0yBoD22UA86VQVD80aVs 9ThgjWFg6ROfs6xUlX5QvkBh8tT1+OP0zhZ3WUB7W4pjHXZfUD9LOxPu/MrH6XJSwJyL uATg==
X-Received: by 10.68.160.162 with SMTP id xl2mr6363059pbb.29.1365045194405; Wed, 03 Apr 2013 20:13:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.66.248.196 with HTTP; Wed, 3 Apr 2013 20:12:34 -0700 (PDT)
In-Reply-To: <515C56F6.8070308@jesup.org>
References: <5158F0FC.3070104@jesup.org> <CABkgnnWBR5SqOF6Ygp7AaEyG19yoG88hpUs4_mWbv59dyCm1gA@mail.gmail.com> <5159E6F9.4070808@jesup.org> <CABkgnnWe-+80WxD8==CxDhAu5+MEa-Tqi7Pr1x8sgkUkE9Z09Q@mail.gmail.com> <CAJrXDUGm-LuddkaUgMUp-p8-Bj-B-zBcqomHcDy+jm6WJtT9wQ@mail.gmail.com> <515C5688.4070004@jesup.org> <515C56F6.8070308@jesup.org>
From: Peter Thatcher <pthatcher@google.com>
Date: Wed, 03 Apr 2013 20:12:34 -0700
Message-ID: <CAJrXDUGvUqFEYd4j6Bas_Puqc3Os=5dEw-nxYgRXhnwQmU6OXw@mail.gmail.com>
To: Randell Jesup <randell-ietf@jesup.org>
Content-Type: text/plain; charset="UTF-8"
X-Gm-Message-State: ALoCoQnG0YWbX0cOQdHqmdhYgojjvTb0vGoRT+Tx4nUQd0WD867Zj2SX+XQksaXqIAhKeKZhiHdOA9sSPSe7VATj2Eq+gElEtmGNm9id7evXBlsOXRyEFKtd22rw90szfGuPPHIUURYcEW9UkPcE4LHYh2zc1P9JfOwc9hPzIwRYFirJEpmN+rj+zti2V8iPQlcXgzIwPeCu
Cc: "<rtcweb@ietf.org>" <rtcweb@ietf.org>, "public-webrtc@w3.org" <public-webrtc@w3.org>
Subject: Re: [rtcweb] DataChannels API and external 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: Thu, 04 Apr 2013 03:13:15 -0000

Randell, thanks for explaining.  I think it's a valid use case to say
"I don't want the in-band open message, but I do want you to choose
the SID for me".  In that case, I'm OK with a separate flag meaning
"send the in-band open message", and I'd prefer a name like
"sendOpenMessage" or "sendControlMessages", which would default to
true.

On "sid", If you don't like "sid", I'm OK with "id", or even
"streamid", but I prefer "id" over "streamid".  I don't like "index".

On "millis" vs. "millsecs", the closest thing in HTML I could find was
the Date object, which has "getMilliseconds".  That would lean us
toward "maxRetransmitMillieseconds", which seems too long.  But I
don't care too much about this name, and would be happy with any of
"maxRetransmitMs" or "maxRetransmitMillis",
"maxRetransmitMilliseconds", "maxRetransmitTime" or
"maxRetransmitDuration".

On "reliable: false", I'd say it's a synonym for "maxRetransmits: 0".
You can have "{ordered: true; reliable: false"} or "{ordered: false;
reliable: true}", which is the same as "{ordered:true,
maxRetransmits:0}" or "{ordered:false}", respectively.

Michael, you don't have to set "reliable: true", since that's the
default.  This is only to allow "reliable: false" as a more readable
and easy to understand way of saying "maxRetransmits: 0".  It's purely
a convenience synonym.

Finally, if it's possible for us to make such a breaking change, I do
think it makes sense to optionally allow the browser to choose the
label, just as it optionally chooses the sid.  As such, I'll include
that idea in the dictionary I propose below so that createDataChannel
would take only one argument, this dictionary (like so:
createDataChannel({"label: XYZ", ...}).  If everyone else dislikes
this idea, then so be, take out that field and keep the rest.  I feel
more strongly about the rest of the names and options than I do about
that one.  But if we can make the change, I think it makes the method
cleaner and more flexible.


So, I update my proposed dictionary to be the following:

dictionary DataChannelInit {
  DOMString label;  //  default: chosen by browser.
  DOMString protocol;  // default: undefined
  unsigned short id;  // default: chosen by browser.
  boolean ordered = true;
  boolean reliable = true;  //  false is just a synonym for maxRetransmits: 0.
  unsigned short maxRetransmits;  // default:  "forever"
  unsigned short maxRetransmitMilliseconds;  // default: "forever"
  boolean sendOpenMessage = true;
};

On Wed, Apr 3, 2013 at 9:21 AM, Randell Jesup <randell-ietf@jesup.org> wrote:
> Adding W3 list back ("Reply List" replies to one list in TB), since this
> really is a W3 item anyways.
>
>
> On 4/3/2013 12:19 PM, Randell Jesup wrote:
>>
>> On 4/3/2013 12:05 PM, Peter Thatcher wrote:
>>>
>>> I think moving protocol into the dictionary is a good idea.   In fact,
>>> I'd like to see label move there as well, but that's probably asking
>>> too much.
>>>
>>> And now for a little of my own bikeshedding:
>>>
>>> I don't understand way we have "stream" and "preset", since you can
>>> only set "stream" if "preset" is true.  Why not just make the rule "if
>>> stream is set, no in-band message is sent", and get rid of "preset"
>>> altogether?  I really don't like the word "stream" sneaking in, since
>>> it's so overloaded (MediaStream, RTP Stream, etc).  I'd prefer "sid"
>>> or just "id".
>>
>>
>> The reason was that I wanted a way to have the system select a stream to
>> use (that you can then communicate externally to the other side); this
>> avoids any chance of a collision with existing streams. If this is seen as
>> not useful, then we can collapse it to a single entry.   (I also toyed with
>> using stream 65535 as a flag to tell the system to allocate one; that seemed
>> too hacky.)
>>
>> Since this option was almost solely for those who understand the
>> underlying SCTP-ness of this, I used "stream", but I'm fine with "streamId"
>> or "id" (or "index" might be better than "id", which sounds like a label of
>> some sort).  I dislike "sid" for similar reasons to disliking "rtx".
>>
>>> I like the idea that reliable+ordered is the default, and both
>>> reliability and ordered can be set independently.  I also prefer
>>> "ordered" over "outOfOrderAllowed", and along with that I like the
>>> idea of a "reliable" flag that, if false, is the equivalent of either
>>> maxRetransmitNum:0 or maxRetransmitTime:0.  Finally, I think
>>> "maxRetransmitTime" should make its units clear, perhaps calling it
>>> "maxRetransmitMillis", and "maxRetransmitNum" could be shortened to
>>> simply "maxRetransmits".
>>
>>
>> Those seem reasonable (I'd use Millisec/MilliSec or perhaps MS instead of
>> Millis -- how are millisecond time values in other HTML5 specs described?).
>> On "reliable:false" - is this just a shorthand for "ordered:false,
>> maxRetransmits:0"?  If so, I'm probably ok with it - it's redundant, but
>> makes it easy to use/read for a common case.
>>
>>>
>>> So the dictionary for my bikeshed would be:
>>>
>>> dictionary DataChannelInit {
>>>    DOMString protocol;
>>>    unsigned short id;
>>>    boolean ordered;
>>>    boolean reliable;
>>>    unsigned short maxRetransmits;
>>>    unsigned short maxRetransmitMillis;
>>> };
>>
>>
>
>
> --
> Randell Jesup
> randell-ietf@jesup.org
>
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb