Re: [rtcweb] Open data channel issues

Randell Jesup <> Mon, 03 March 2014 15:27 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 911471A014A for <>; Mon, 3 Mar 2014 07:27:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id qKywpMNxGomk for <>; Mon, 3 Mar 2014 07:27:32 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 270561A004A for <>; Mon, 3 Mar 2014 07:27:32 -0800 (PST)
Received: from ([]:1914 helo=[]) by with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from <>) id 1WKUm9-000A4a-4F for; Mon, 03 Mar 2014 09:27:29 -0600
Message-ID: <>
Date: Mon, 03 Mar 2014 10:26:04 -0500
From: Randell Jesup <>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
References: <> <> <> <> <> <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname -
X-AntiAbuse: Original Domain -
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain -
X-Get-Message-Sender-Via: authenticated_id:
Subject: Re: [rtcweb] Open data channel issues
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 03 Mar 2014 15:27:39 -0000

On 3/3/2014 8:53 AM, Martin Thomson wrote:
> On 3 March 2014 03:44, Randell Jesup <> wrote:
>> Hopefully so, though I hate forcing apps to include a bunch of code for
>> backwards compat for a year or two (and many won't, or won't test it, etc).
>> That hurts the feature.  And today no one has ndata.
> Since WebRTC is behind a flag, I don't find this particularly
> convincing.  We can implement ndata.

I don't understand the "behind a flag" comment; an app using 
DataChannels for anything variable-length (unless with low bounds) must 
care until all old implementations are gone.  Since we already have 
DataChannel impls in  ESR releases, there's no avoiding this if we rely 
on that (even worse, since this undefined property doesn't exist yet 
(let alone in ESR), the app has to handle that case as well).  Or add 
browser and version sniffing to all the apps...

> I think that we could even remove our temporary length restriction.

Sure, we can.  This will reduce or eliminate source changes for apps 
that don't care about interleaving, which is a plus.  It will cause 
total stall of all other DataChannels during  transmission of one large 
message, which some applications would be ok with, and others would not, 
and so those that would not would have to somehow deal with it.

So, applications that are ok with blocking other channels with large 
sends could be allowed to send arbitrary-sized messages, and receivers 
would be required to receive them (without chunking). Applications that 
do care about other channels would need to restrict their sending size 
when ndata isn't available at both ends.  We really only need to know if 
ndata is available and expose that fact to the application, not a 
receive size from the receiver.

So this plan would be:
1) We expose ndata being agreed to (currently == false);
2) We turn off the PPID chunking in Firefox (and live with ESR24 and 
current revs of Firefox not being compatible; see 2a)
2a) we make sure the app can detect if the local client has the ndata 
property at all (supports this solution).
3) We make sure Chrome and Firefox both implement both EOR sending and 
EOR reception and unlimited (or virtually) send/receive sizes.

For bonus points, on EOR reception of a blob, spool it to disk in the 
browser (if over some limit perhaps), and on EOR send of a blob, 
optimize it to avoid send-side memory hits and performance issues.

This will break large send/receive between Chrome and current/older 
Firefox - but those are broken today by Chrome not implement PPID 
chunking and Firefox doing so.  Firefox can still fall back on PPID 
chunking if it knows it's talking to another Firefox until we decide 
that this no longer matters.  I could be wrong, but I think Chrome 
doesn't support EOR sending currently; I know Firefox doesn't since we 
were using PPID chunking, so we'd need to add that.

Once ndata is supported, all will work well, and applications that 
didn't care about interleaving don't have to change, and those that do 
will trigger on ndata and switch (and they can test ndata==true mode 
reasonably well by forcing it in the app, since send(large) will work).

Randell Jesup -- rjesup a t mozilla d o t com