Re: [rtcweb] Data channel setup and signalling

Saúl Ibarra Corretgé <saul@ag-projects.com> Tue, 15 November 2011 09:04 UTC

Return-Path: <saul@ag-projects.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 671E021F8FAB for <rtcweb@ietfa.amsl.com>; Tue, 15 Nov 2011 01:04:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.688
X-Spam-Level:
X-Spam-Status: No, score=-1.688 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, HELO_MISMATCH_NET=0.611, MIME_8BIT_HEADER=0.3]
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 hw4b1+reLkej for <rtcweb@ietfa.amsl.com>; Tue, 15 Nov 2011 01:04:13 -0800 (PST)
Received: from mail.sipthor.net (node06.dns-hosting.info [85.17.186.6]) by ietfa.amsl.com (Postfix) with ESMTP id 8AD3821F8D4D for <rtcweb@ietf.org>; Tue, 15 Nov 2011 01:04:13 -0800 (PST)
Received: by mail.sipthor.net (Postfix, from userid 5001) id A0913B01BC; Tue, 15 Nov 2011 10:04:12 +0100 (CET)
Received: from [192.168.99.36] (ip3e830637.speed.planet.nl [62.131.6.55]) by mail.sipthor.net (Postfix) with ESMTPSA id 85A62B017D; Tue, 15 Nov 2011 10:04:11 +0100 (CET)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset="iso-8859-1"
From: Saúl Ibarra Corretgé <saul@ag-projects.com>
In-Reply-To: <4EC209EB.3080402@jesup.org>
Date: Tue, 15 Nov 2011 10:04:10 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <EFE76E3E-1822-4661-A833-F4D463137428@ag-projects.com>
References: <4EC209EB.3080402@jesup.org>
To: Randell Jesup <randell-ietf@jesup.org>
X-Mailer: Apple Mail (2.1084)
Cc: "rtcweb@ietf.org" <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 09:04:14 -0000

HI,

On Nov 15, 2011, at 7:42 AM, 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.
> 

Once a stream is removed apart from setting the port to 0 all attributes may be removed to save some space (sorry, can't find where I read that :-S). Yes, it could still grow infinitely, but I've doing this for quite some time now (adding and removing audio, MSRP chat and MSRP file transfer streams) and only cheap-hotel wifi networks choked on SDP size. ;-)

> 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.
> 
> 
> 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.)
> 

Your proposal seems fine to me. Some may want to negotiate the data channel, some may not. A use case that comes to mind for a high-volume data channel usage would be file transfer using MSRP for example (assuming it's a valid use case).


Regards,

--
Saúl Ibarra Corretgé
AG Projects