Re: [rtcweb] Data channel setup and signalling

Justin Uberti <juberti@google.com> Tue, 15 November 2011 14:06 UTC

Return-Path: <juberti@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 4BB4821F8C94 for <rtcweb@ietfa.amsl.com>; Tue, 15 Nov 2011 06:06:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.102
X-Spam-Level:
X-Spam-Status: No, score=-102.102 tagged_above=-999 required=5 tests=[AWL=-0.792, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, SARE_HTML_USL_OBFU=1.666, 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 z+VpZ8jVQyHm for <rtcweb@ietfa.amsl.com>; Tue, 15 Nov 2011 06:06:14 -0800 (PST)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by ietfa.amsl.com (Postfix) with ESMTP id 3959021F8B91 for <rtcweb@ietf.org>; Tue, 15 Nov 2011 06:06:14 -0800 (PST)
Received: by ggnr5 with SMTP id r5so2551860ggn.31 for <rtcweb@ietf.org>; Tue, 15 Nov 2011 06:06:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=3fKYFUbO+16YYExaP5m2R36ToiWHI5Uy3gcjs+JcbeM=; b=F2f2eD7XpcaqKEzOkoJtWN4R3kXBNPS6aN6ZvxpXBx9yaz243UcQhr8HzWVV2TV/BZ Whj9htdIUfBppdw6Mz0g==
Received: by 10.50.169.97 with SMTP id ad1mr28284466igc.35.1321365972297; Tue, 15 Nov 2011 06:06:12 -0800 (PST)
Received: by 10.50.169.97 with SMTP id ad1mr28284432igc.35.1321365972115; Tue, 15 Nov 2011 06:06:12 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.194.134 with HTTP; Tue, 15 Nov 2011 06:05:51 -0800 (PST)
In-Reply-To: <4EC23013.1030302@alvestrand.no>
References: <4EC209EB.3080402@jesup.org> <4EC23013.1030302@alvestrand.no>
From: Justin Uberti <juberti@google.com>
Date: Tue, 15 Nov 2011 09:05:51 -0500
Message-ID: <CAOJ7v-3wmciNyFrHMhZZTydAhcTpAxRj+U1sq11Ku6Ygwodg2Q@mail.gmail.com>
To: Harald Alvestrand <harald@alvestrand.no>
Content-Type: multipart/alternative; boundary="e89a8f2359a962e23204b1c67d2f"
X-System-Of-Record: true
Cc: rtcweb@ietf.org
Subject: Re: [rtcweb] Data channel setup and signalling
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: Tue, 15 Nov 2011 14:06:15 -0000

On Tue, Nov 15, 2011 at 4:25 AM, Harald Alvestrand <harald@alvestrand.no>wrote:

> On 11/15/2011 02:42 PM, Randell Jesup wrote:
>
>> The signalling discussion and how it touched on data channels got me
>> thinking.
>>
>> One open issue is how we define data channels, both in the "internal"
>> case (no interop) and the federated case (which may have the same JS app or
>> different ones at either end).
>>
>> One solution is that all data channels are defined as m= lines.  They
>> could be generic "m=data", or they could specify the data to be passed in
>> the m= line.  For "public" message structures that might be used by
>> different applications (an IM protocol, for example), one would specify
>> that in some manner in the media description (perhaps via a MIME type).
>>  This also implies that any addition or removal (or change to) a data
>> channel requires a full replacement OFFER and ANSWER.  If we stick with the
>> SDP requirement about never removing m= lines, then the OFFER size may
>> become unbounded.
>>
> Just to add to the confusion:
> If one instead keeps the (each?) SCTP connection as one m= line, one could
> instead model the data channels as corresponding to SSRCs, and reuse the
> codec declaration mechanisms from RTP m= lines to assign specific data
> syntaxes to each SSRC....
>
> this seems to me to be a model that adheres more closely to the RTP model,
> but that doesn't mean it's a good fit to SCTP, or a good fit to real
> applications' real requirements.
>
>
>
>> The other option is to have (some) data channels be separate from media,
>> in particular app-specific anonymous data channels.  There's no requirement
>> for describing the channels if they're private to the app, at least to the
>> first approximation.  An app could pre-define data channel 3 as a private
>> message structure for game map updates, so long as it knows its talking to
>> itself.
>>
>> This has advantages in setup time, especially if the data channels are
>> dynamic and invoked via another data channel, since there doesn't have to
>> be a full offer-answer including the media channels.  You just need to make
>> sure the two sides agree on the data to be exchanged and that they listen
>> before receiving data.  It has a minor advantage in reducing the amount of
>> information leakage to the server about the creation and types of streams
>> (and potentially significant metadata about them).
>>
>>
>> A use-case would be a background http proxy-server during chat.  If you
>> have to re-OFFER for each data channel that comes and goes to transfer a
>> resource, it will both swamp the server and be slow (due to the triangle
>> signalling).  If instead the application can open a single control data
>> channel, and invoke transfers over it, the application can efficiently
>> transfer a high number of URIs.  Are there other ways to do this without
>> re-OFFERing constantly?  yes.  But they generally involve building
>> protocols on top of an array of long-lasting generic connections.
>>
>> For example, the control data channel might pass messages (directly
>> browser-to-browser) like
>> {
>>   id: 1,
>>   command: "GET",
>>   URI: "blah/foo/bar",
>>   channel: 5,
>> }
>> with an answer:
>> {
>>   id: 1,
>>   result: "ok",
>>   size: 1234,
>> }
>> followed by transfer of the URI on data channel 5.  (Note: in this I'm
>> assuming an API that lets the app open a specific data channel of the peer
>> connection.)
>>
>> Now, this is contrived, though plausible.  You could pre-open a bunch of
>> idle data connections and then re-use them as needed.  The counter-argument
>> is that one could write a connection-server library that abstracts a bunch
>> of pre-opened data channels into an API for the app that works like I
>> described above, though it may require more housekeeping and larger fixed
>> resource usage.
>>
> This example in fact VERY closely resembling FTP..... make the commands
> one-line instead of JSON blobs, and the responses into numeric codes, and
> the resemblance is just about uncanny....
>
>
>> So.....
>>
>> Is it worthwhile to consider interfaces/APIs whereby an application could
>> directly open data channels with no re-OFFER and implement a control
>> protocol similar to the one I described?  Are there other use-cases for
>> high-volume data channel create/removal, or where data channel latency
>> creation is critical? (my usecase is a little contrived since I'm falling
>> asleep a the keyboard.)
>>
>>  I kind of like the idea of being able to open data channels with no
> re-offer; we could pattern the API of new incoming data channels on the
> handling of SSRCs that weren't mentioned at negotiation time .... not that
> we've worked that out at the API level, last time we discussed it, I think
> it was suggested that any new SSRC was signalled as a new MediaStream...
>
>
I'd prefer to have one way of doing things that's consistent, i.e. using
re-OFFER for adding datastreams or SSRCs. This wouldn't have to be slow; if
you already had a datastream, as you indicate in your example, the re-OFFER
could occur over this path. Doing it this way would also allow metadata
regarding the SSRC or datastream to be communicated to the other side prior
to using the stream.

>
> ______________________________**_________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/**listinfo/rtcweb<https://www.ietf.org/mailman/listinfo/rtcweb>
>