Re: [rtcweb] Data Channels Proposal: Now in Internet Draft Form
Martin Thomson <martin.thomson@gmail.com> Mon, 04 March 2013 17:00 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 EFD6B21F8CC2 for <rtcweb@ietfa.amsl.com>; Mon, 4 Mar 2013 09:00:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_48=0.6, NO_RELAYS=-0.001]
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 krG23uPFuC+I for <rtcweb@ietfa.amsl.com>; Mon, 4 Mar 2013 09:00:51 -0800 (PST)
Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) by ietfa.amsl.com (Postfix) with ESMTP id 0070021F8C26 for <rtcweb@ietf.org>; Mon, 4 Mar 2013 09:00:50 -0800 (PST)
Received: by mail-wi0-f170.google.com with SMTP id hm11so2466493wib.5 for <rtcweb@ietf.org>; Mon, 04 Mar 2013 09:00:50 -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:content-transfer-encoding; bh=dX6agABwqy9ODLaSygMTyLuea9GcNH0SKDmXJB9AQpw=; b=vP/F/lUZQHX54B9rHxZGNjY0wjKbFnWC3k6ozEDnaFvqi3o7lC11PXcvkJo0b0iVGI HUB8dFWgFbk9CS2ftATn8fPhjIeEJkEig9RqIuWcgiFR4kzkLlwM42vRSFUnvpFxEA5+ JJk/lg8sfr6ioOY6iAbOY0RYpKPigTj2FL8c3hRwchsEW0ctxXq9w+b/TEsr2cGAhmv/ 1JGPsOyYPainkiURoCumigTqMdWByt6gDmNU0ZFtnW0fxuoK4LyP6XTgpqwoZLlCcvkg Wno5V1OtERfAIEm7vkaLMSgU3K/AY0LeAGh6FNLwTK7LvSK9f7SR7kwzXg8uxBltDgYp eqDg==
MIME-Version: 1.0
X-Received: by 10.180.103.40 with SMTP id ft8mr13149994wib.28.1362416449949; Mon, 04 Mar 2013 09:00:49 -0800 (PST)
Received: by 10.194.5.135 with HTTP; Mon, 4 Mar 2013 09:00:49 -0800 (PST)
In-Reply-To: <39821B4C400EC14DAD4DB25330A9271A019231@FR711WXCHMBA03.zeu.alcatel-lucent.com>
References: <CABkgnnXR5Gp-C8G6AyHDMKKqE=xohkN-GKYV-=B1BhqHkxdHDw@mail.gmail.com> <39821B4C400EC14DAD4DB25330A9271A019231@FR711WXCHMBA03.zeu.alcatel-lucent.com>
Date: Mon, 04 Mar 2013 09:00:49 -0800
Message-ID: <CABkgnnU1JRZb9QUiu1Z1v6Fa0=bX4UbA4aKhF21FP8KH-V7g7A@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: "MARCON, JEROME (JEROME)" <jerome.marcon@alcatel-lucent.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Data Channels Proposal: Now in Internet Draft Form
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, 04 Mar 2013 17:00:52 -0000
Brief answers inline. On 4 March 2013 08:28, MARCON, JEROME (JEROME) <jerome.marcon@alcatel-lucent.com> wrote: > > Hi Martin, thanks for your proposal. I have some comments/questions: > > 1. So the label locally assigned to a data channel created in-band is not transmitted to the peer ? (note that I am fine with this) The label is a handle that is provided to the application as a convenience. The label is a new invention, which I'm not certain we entirely need. It might provide some use, but it's unclear how it adds value over the subprotocol label. > 2. Whereas defaulting properties like order or reliability is more or less OK, it seems more critical to default the subprotocol property. The app would have to parse the incoming user message to guess if this message is about 'chat' or 'file transfer' Actually, in most cases, an application will only ever receive packets that they know about beforehand. If they need to distinguish between chat and file transfer, they will have established conventions for identifying those packets. PPID is one possible convention, though I note that most uses of SCTP I've seen don't use more than one value, so most code ends up ignoring the PPID. I share the same leeriness about the "protocol" label used in thewebsocketprotocol. > 3. Why does StreamID need to be exposed to the app ? I first thought it was to allow in-band data channel creation by a simple message sending. But then: > - either the StreamID is a parameter of send(streamID, data) - and this breaks the alignment with WebSocket API and also the app has no handle on this data channel > - or streamID is a parameter of createDataChannel and this seems useless as the browser is able to select a new stream number internally Stream ID is exposed to the app because it allows the app to create their own usage pattern. It can create the streams it wants and attach meaning to those numbers. That said, stream IDs are allocated automatically by the browser for most uses. I'd expect that streamId would be an optional constraint (i.e., optional in usage) on channel creation. There is no in-band protocol, except for the one that the application uses. That's important. > 4. Why does binaryPPID need to be exposed to the app ? The browser is expected to infer the message type from the data passed to send(). binaryPPID allows the application to generate (though not consume, except in constrained cases) SCTP that can be consumed by any application. The browser doesn't "infer" anything about message types, other than when messages use the textual PPID, in which case they are surfaced as strings rather than the specified binary type (a Blob or ArrayBuffer). > 5. Finally to decrease the number of mismatching properties situations, you could simply assign a "Default=strict|loose" property to one of the data channels in the SDP. > If set to "strict", endpoints could only create in-band data channels for which the default set of properties applies. To create other types of data channels in-band, renegotiation is required > If set to "loose'", an endpoint receiving a user message on an closed data channel would open the data channel using these default properties. But with the risk of mismatch on subprotocol... > This would make scalable setup scenarios like: > - the SDP offer/answer exchange negotiates one 'chat' data channel, and one 'file transfer' Default data channel > - later on, either endpoint creates in-band 100 data channels for file transfer -> no renegotiation needed, no property mismatch. That's unnecessary. If I want an application that has one "special" channel and an arbitrary number of "normal" channels, I can do exactly as you say and then set the properties of those spontaneously created channels as they appear. It doesn't require any more standardization or browser machinery: pc.addEventListener('datachannel', function(e) { var fileTransferChannel = e.channel; fileTransferChannel.ordered = true; fileTransferChannel.subprotocol = 'filetransfer'; }); > This reduces the mismatching situations, in the case where one single set of properties is mostly used at a given time in the session. But the browser (or the app) has to guess at the time of SDP negotiation which set of properties should be the default, i.e. will be used more frequently than the others later on in the session. > > An extended (and deterministic) approach is to restrict the role of SDP offer/answer to the negotiation of some identified set of properties (not data channels). Then data channels are created in-band by the sending of user messages on closed streams, where each user message includes a "set of properties" identifier. You may have a look at the draft I have submitted. I didn't see a specific need for negotiating properties in such a generic fashion. Ultimately, each property needs some semantics when you use it, so it seemed excessive. In SDP at least, the extension mechanism is well enough understood to be able to support extension enough to allow for new properties to be defined (like ordering, which I omitted from my draft by mistake). That said, if you are defining an in-band protocol (a bad idea in my opinion), the idea that properties are generic makes a great deal of sense. That allows applications to define what they need and allows them to avoid unnecessary noise. --Martin
- Re: [rtcweb] Data Channels Proposal: Now in Inter… Randell Jesup
- [rtcweb] Data Channels Proposal: Now in Internet … Martin Thomson
- Re: [rtcweb] Data Channels Proposal: Now in Inter… Martin Thomson
- Re: [rtcweb] Data Channels Proposal: Now in Inter… Michael Tuexen
- Re: [rtcweb] Data Channels Proposal: Now in Inter… Randell Jesup
- Re: [rtcweb] Data Channels Proposal: Now in Inter… MARCON, JEROME (JEROME)
- Re: [rtcweb] Data Channels Proposal: Now in Inter… Martin Thomson
- Re: [rtcweb] Data Channels Proposal: Now in Inter… MARCON, JEROME (JEROME)
- Re: [rtcweb] Data Channels Proposal: Now in Inter… Martin Thomson