Re: [rtcweb] Open data channel issues

Randell Jesup <> Tue, 04 March 2014 03:39 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 106231A031B for <>; Mon, 3 Mar 2014 19:39:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id yy4kwODwVEDY for <>; Mon, 3 Mar 2014 19:39:47 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id EDCDD1A031A for <>; Mon, 3 Mar 2014 19:39:45 -0800 (PST)
Received: from ([]:3206 helo=[]) by with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from <>) id 1WKgCk-0002a9-Ar for; Mon, 03 Mar 2014 21:39:42 -0600
Message-ID: <>
Date: Mon, 03 Mar 2014 22:38:16 -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: multipart/alternative; boundary="------------050703090904060301060305"
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: Tue, 04 Mar 2014 03:39:53 -0000

On 3/3/2014 12:54 PM, Justin Uberti wrote:
> On Mon, Mar 3, 2014 at 7:26 AM, Randell Jesup < 
> <>> wrote:
>     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).
> While I agree with the final outcome of #3, I don't think going down 
> the 1/2/2a path makes sense, since it leads to an additional 
> intermediate state over the current situation. i.e. we end up with 3 
> states:
> a) today: max safe send is 16 KB
> b) soon: ndata exists, but large sends lock out other sends
> c) final: ndata exists, and large sends work OK
> I would rather maintain a) or similar for now (using the 
> max-message-size param) and jump to c) when we have the right stuff in 

So, is there any significant advantage to using a max-message-size param 
(with >16K) as an interim step?  You get 3 similar steps (though perhaps 
with a smaller lockout).

To take your suggestion:
a) applications assume 16KB if ndata wasn't negotiated (per the current 
b) implement ndata and EOR support in the browsers, and drop the 16KB 
limit when ndata is negotiated.
All this needs is "is ndata supported by this association" exposed to 
the app; no sdp changes needed.  (One less dependency!)

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