Re: [rtcweb] Open data channel issues

Justin Uberti <> Mon, 03 March 2014 17:54 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id D63091A00E4 for <>; Mon, 3 Mar 2014 09:54:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.925
X-Spam-Status: No, score=-1.925 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.547, SPF_PASS=-0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id SuSSlV3HXj3K for <>; Mon, 3 Mar 2014 09:54:54 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:400c:c01::231]) by (Postfix) with ESMTP id 4D3211A02FC for <>; Mon, 3 Mar 2014 09:54:52 -0800 (PST)
Received: by with SMTP id sa20so3972549veb.36 for <>; Mon, 03 Mar 2014 09:54:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=6dDHQjLjw+QvuFcye9axXTg+UZIRHMQa98WKtai2uVk=; b=nEjsWStUuzqKA9mV2d/icU+78YFmefKfSl5de3fe+Q6WFJDVgGvPFlD8LG8JVRktRk +1oEJOVRAKAskOgtXjdnsjXStbARVUnVnxEL3T390cr3vN8FaNO9Yj++maH9dUutWco9 xKF2iITjiIQgNTHcpy4pZIVQsqaZfjbtz7w8KIfm8CD9ay7EKpj7Pf7yfIVDVaGEhNVO TMm2P7aatc6qjwuBNG2oGnJ7cJ1m07FFIwnMN6hbq2ETdnGPrUwc1HCOlguzNQtIVQkN jvr4poYyoCE0ky7N7nv833HdrUqDv9zXprvaPJnNXKOwrWUHupPWRmtsah/xLyE28cKV FcVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=6dDHQjLjw+QvuFcye9axXTg+UZIRHMQa98WKtai2uVk=; b=dbQs8C7tZtlVfR65wXtcWliDNseKNtFYQo3fuzXSjJ75ejuQkpbUy15nQ03redoVGg FckfepoRdjmqEYy2e1+NlklBIJKtQsuFkBzYnpUZWQMIefg9I8VUtcnJqi1TV94vgL5c 36JP75d3irI3u1wW6fmiy8zXCcFKcAjJTkOjP1j9bXdr19fMRoY930bbi986XS8KlBwr aFV5BNqkdC1Qlot7v9yBCg//BZxBFbOJXouCo0A34ZSMPdrZ1+de5OlV7/dm/vORWG9Q dUrkmF4ngJm4pmwC1MGRrWXNMQhei4l5FZcL5Vpjn2vu6Qe11/IS09Kg9gxOfmmau55V 9YBA==
X-Gm-Message-State: ALoCoQlMQs4L0mDS+gH+a9FEXgAfKDeLbDUtaVivhRwCGBx6/qcprw9NcGrZWaJst8pCg40UYCNNI+5lDMks+aQh6yXID0m4gGMLv9x88teGSpVuVK+nQQLxvbk3NLN1OZYl0G9/LEFD+xgVaOLj2hnqEhHXtbMeFlkPBlN1tgmHu9aPwYup/qF9aI9wXS5o2KUM0wTnnQXC
X-Received: by with SMTP id v6mr591251vdh.6.1393869289132; Mon, 03 Mar 2014 09:54:49 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Mon, 3 Mar 2014 09:54:28 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <> <> <> <> <> <>
From: Justin Uberti <>
Date: Mon, 03 Mar 2014 09:54:28 -0800
Message-ID: <>
To: Randell Jesup <>
Content-Type: multipart/alternative; boundary="bcaec51d2eb8d7aa7704f3b77ba6"
Cc: "" <>
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 17:54:58 -0000

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

> --
> Randell Jesup -- rjesup a t mozilla d o t com
> _______________________________________________
> rtcweb mailing list