Re: [rtcweb] Proposal for PeerConnection cloning

Christer Holmberg <christer.holmberg@ericsson.com> Sun, 06 May 2012 19:05 UTC

Return-Path: <christer.holmberg@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 BFBEF21F8554 for <rtcweb@ietfa.amsl.com>; Sun, 6 May 2012 12:05:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.15
X-Spam-Level:
X-Spam-Status: No, score=-6.15 tagged_above=-999 required=5 tests=[AWL=0.099, 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 ucv9FswEvokP for <rtcweb@ietfa.amsl.com>; Sun, 6 May 2012 12:05:56 -0700 (PDT)
Received: from mailgw7.ericsson.se (mailgw7.ericsson.se [193.180.251.48]) by ietfa.amsl.com (Postfix) with ESMTP id BEED421F8551 for <rtcweb@ietf.org>; Sun, 6 May 2012 12:05:55 -0700 (PDT)
X-AuditID: c1b4fb30-b7c78ae000006de5-0b-4fa6cb92785e
Authentication-Results: mailgw7.ericsson.se x-tls.subject="/CN=esessmw0247"; auth=fail (cipher=AES128-SHA)
Received: from esessmw0247.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) (using TLS with cipher AES128-SHA (AES128-SHA/128 bits)) (Client CN "esessmw0247", Issuer "esessmw0247" (not verified)) by mailgw7.ericsson.se (Symantec Mail Security) with SMTP id 72.1C.28133.29BC6AF4; Sun, 6 May 2012 21:05:54 +0200 (CEST)
Received: from ESESSCMS0356.eemea.ericsson.se ([169.254.1.64]) by esessmw0247.eemea.ericsson.se ([153.88.115.93]) with mapi; Sun, 6 May 2012 21:05:54 +0200
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: "Ejzak, Richard P (Richard)" <richard.ejzak@alcatel-lucent.com>, "rtcweb@ietf.org" <rtcweb@ietf.org>
Date: Sun, 06 May 2012 21:01:12 +0200
Thread-Topic: [rtcweb] Proposal for PeerConnection cloning
Thread-Index: Ac0ruaKw/sIXfcxHRLuCOzit4TRF6gAAPhbN
Message-ID: <7F2072F1E0DE894DA4B517B93C6A05852C44001342@ESESSCMS0356.eemea.ericsson.se>
References: <6F428EFD2B8C2F49A2FB1317291A76C11364EC028C@USNAVSXCHMBSA1.ndc.alcatel-lucent.com>
In-Reply-To: <6F428EFD2B8C2F49A2FB1317291A76C11364EC028C@USNAVSXCHMBSA1.ndc.alcatel-lucent.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
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: Sun, 06 May 2012 19:05:56 -0000

Hi Richard,

Interesting proposal.

In bullet 11, you say that, if a final answer has been received (and unused resources released), resources would have to be reallocated once a clone is created.

A couple of questions:

1. Is there a need to allow cloning once a final answer has been received?

2. Once a final answer is received on a given PC, would it automatically remove all associated CPCs?

The basic question is really whether there is a need for clones once a final answer has been received. After all, there is a reason we call it "final" :)

Regards,

Christer

________________________________
From: rtcweb-bounces@ietf.org [rtcweb-bounces@ietf.org] On Behalf Of Ejzak, Richard P (Richard) [richard.ejzak@alcatel-lucent.com]
Sent: Sunday, May 06, 2012 9:54 PM
To: rtcweb@ietf.org
Subject: [rtcweb] Proposal for PeerConnection cloning

Harald asked for a proposal for PeerConnection cloning, so here it goes:

I propose to create a new constructor “ClonePeerConnection” (CPC below) with the following semantics.


 1.  CPC will create a new PeerConnection object when successful.  The resulting PC behaves just like any other PC except as described below.
 2.  CPC will take as input a reference to an existing PeerConnection (PC) object (no configuration or IceCallback parameters).
 3.  CPC can clone any other PC (including a cloned PC).  The sequence of cloning is not important and parents have no particular status different from any generation of clone.
 4.  CPC will fail if either the local description of the parent PC is not set or the parent PC ICE is in ICE_CLOSED or ICE_GATHERING state.  The parent PC can be in the OPENING or ACTIVE state.
 5.  The CPC object will inherit the local streams, local ICE candidates, and local description of the PC.
 6.  The remote streams and remote description for the CPC object will be set to empty.
 7.  The CPC object will be set to the OPENING state to reflect that only the local description is set.
 8.  The ICE states other than CLOSED and GATHERING will be handled independently for each PC and its clones (as is true in standard forking scenarios).
 9.  The ICE state for this clone will be set to ICE_WAITING to reflect that all candidates are available but the remote configuration is not yet set.
 10. The PC and its clone(s) use a common pool of media resources.
 11. If the parent PC object has already released unused resources (final ANSWER), resources are reallocated as available to reflect the capabilities for each stream (as they would be reflected in a createOffer).
 12. The local streams might multicast toward the remote targets depending on the directionality attributes independently set for each PC and clone.
 13. The application should manage the directionality attributes for remote streams from different targets to avoid resource conflicts.

CPC will be used primarily if forking is anticipated or actually occurs.  It can also be used to clone a stable PC if desired for other reasons.  When used for SIP forking, creation of the clone can be delayed until an ANSWER actually arrives from a 2nd target as long as final ANSWER hasn’t been applied to the parent (PRANSWER is OK).  The parent always handles the first target; the first clone handles the 2nd target; etc.  The application can even try to clone for forking after the first ANSWER is applied to the parent and resources are released, as long as the local description has not changed, at the risk that some resources needed for the 2nd target are no longer available and must be renegotiated.

Comments on this proposal are welcome.

Richard