Re: [rtcweb] Proposal for PeerConnection cloning

Stefan Hakansson LK <stefan.lk.hakansson@ericsson.com> Tue, 08 May 2012 06:51 UTC

Return-Path: <stefan.lk.hakansson@ericsson.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 AF1C721F861B for <rtcweb@ietfa.amsl.com>; Mon, 7 May 2012 23:51:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.249
X-Spam-Level:
X-Spam-Status: No, score=-6.249 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, HELO_EQ_SE=0.35, RCVD_IN_DNSWL_MED=-4]
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 BT1pFli7vFtn for <rtcweb@ietfa.amsl.com>; Mon, 7 May 2012 23:51:10 -0700 (PDT)
Received: from mailgw2.ericsson.se (mailgw2.ericsson.se [193.180.251.37]) by ietfa.amsl.com (Postfix) with ESMTP id 64CC721F860E for <rtcweb@ietf.org>; Mon, 7 May 2012 23:51:09 -0700 (PDT)
X-AuditID: c1b4fb25-b7b09ae000007d0f-0c-4fa8c25a2845
Authentication-Results: mailgw2.ericsson.se x-tls.subject="/CN=esessmw0197"; auth=fail (cipher=AES128-SHA)
Received: from esessmw0197.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) (using TLS with cipher AES128-SHA (AES128-SHA/128 bits)) (Client CN "esessmw0197", Issuer "esessmw0197" (not verified)) by mailgw2.ericsson.se (Symantec Mail Security) with SMTP id 77.05.32015.A52C8AF4; Tue, 8 May 2012 08:51:06 +0200 (CEST)
Received: from [150.132.142.244] (153.88.115.8) by esessmw0197.eemea.ericsson.se (153.88.115.88) with Microsoft SMTP Server id 8.3.213.0; Tue, 8 May 2012 08:51:06 +0200
Message-ID: <4FA8C259.7060904@ericsson.com>
Date: Tue, 08 May 2012 08:51:05 +0200
From: Stefan Hakansson LK <stefan.lk.hakansson@ericsson.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: rtcweb@ietf.org
References: <6F428EFD2B8C2F49A2FB1317291A76C11364EC028C@USNAVSXCHMBSA1.ndc.alcatel-lucent.com> <4FA83F6D.9040308@alvestrand.no> <4FA84446.1000308@jesup.org>
In-Reply-To: <4FA84446.1000308@jesup.org>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [rtcweb] Proposal for PeerConnection cloning
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, 08 May 2012 06:51:10 -0000

On 05/07/2012 11:53 PM, Randell Jesup wrote:
> On 5/7/2012 5:32 PM, Harald Alvestrand wrote:
>> Richard, thank you for doing this! It's definitely the most
>> thought-through proposal I've seen on this question!
>
> Ditto!
>
>>>   5. The CPC object will inherit the local streams, local ICE
>>>      candidates, and local description of the PC.
>>>
>> when it inherits the local streams, do you assume that unless the JS
>> applies some setting, they will also inherit the "enabled/disabled"
>> state, but that the "enabled/disabled" state can be changed
>> independently for each PeerConnection's local streams after the cloning?
>
> I would assume that personally, and that typically after cloning you'd
> do "appropriate" tweaking to new (and old).

As the APIs are designed right now, this is not possible AFAIK. The 
"local streams" is more or less just a list of the streams that has been 
added to the PeerConnection (PC) using "addStream". So if you have one 
PC with one MediaStream added, then clones the PC, the result would be 
that that MediaStream now has two consumers. And if you disable a track, 
that track would be disabled for all consumers.

I think a more flexible solution would be that the new PC does _not_ 
inherit the streams. This way the application can choose to clone the 
MediaStream's attached to the first PC, and add the cloned MS's to the 
new PC, and thereby get independent control of e.g. enable/disable 
state. After all, it is the application that initiates the PC cloning, 
so it knows exactly when it happens and the context, so adding the req. 
to the app to add the stream(s) that should be added would not make it 
more complex IMO.

The possible problem I can see with this approach is that if the set of 
MS's added to the cloned PC is not exactly the same as for the original 
PC, the number of ICE connections needed might not match. But is that 
problem not already there, and must be handled by the ICE agent? The 
cloned PC may connect to an endpoint that does not support multiplexing 
of RTP-streams, or new streams might be added to the cloned PC at any 
time after cloning.

>
>>>   8. The local streams might multicast toward the remote targets
>>>      depending on the directionality attributes independently set for
>>>      each PC and clone.
>>>
>> So far, we've stayed away from anything that involves IP multicast. Are
>> you sure it's worth the potential complexity to try to use this here?
>
> Richard - do you mean "IP Multicast" (tm) or 'multicast' by sending the
> same encoded data to more than one destination in separate RTP streams?
>    (i.e. one encoding being used to simulcast to multiple receivers?)
>
> Simulcast is possible and useful (almost required for Mesh
> Conferencing); IP Multicast has been pretty much ruled out-of-scope IIRC.
>