Re: [rtcweb] Proposal for PeerConnection cloning
Martin Thomson <martin.thomson@gmail.com> Sun, 06 May 2012 22:20 UTC
Return-Path: <martin.thomson@gmail.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 0313321F8559 for <rtcweb@ietfa.amsl.com>; Sun, 6 May 2012 15:20:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.783
X-Spam-Level:
X-Spam-Status: No, score=-3.783 tagged_above=-999 required=5 tests=[AWL=-0.185, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 ThAoLfhJ-+x7 for <rtcweb@ietfa.amsl.com>; Sun, 6 May 2012 15:19:59 -0700 (PDT)
Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by ietfa.amsl.com (Postfix) with ESMTP id 910B221F854F for <rtcweb@ietf.org>; Sun, 6 May 2012 15:19:58 -0700 (PDT)
Received: by bkty8 with SMTP id y8so3932524bkt.31 for <rtcweb@ietf.org>; Sun, 06 May 2012 15:19:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Yj6ykmTjo4mYO0VZNdA1kyoap/2nagKUiRZZ/ukK6kg=; b=A6O1DW1Ww4Tgl4OnS4Kb+Sk9+2xzIOXsguPrKZGejS22acxIIU7bZGlAWyZxtXfmQr nnfkGCcn3DcQyWahux72rdUPxM40ACU7uE07FETpYcYb/tZSOKXc5B5qjHvqacixlAw+ KY/CN3Gs+Fi++Vb+W2lhXHqHBNDLOMOB4XEZIyqrC12YoNZV2tpp6aF6XIzEQPYN4O/h M2W730vM26DAJlVvXJAe4gLcjc4wdEJm+raC2UnxyjZZl2UEI6O2R5eQNDdXZnUDm2kd rPX9JS+F1XercjVbm8C1guDMuVoOpO6tWa6S9yGwKqN1AGhNrqdG+6yqEngYfK1SQ/pD p/hw==
MIME-Version: 1.0
Received: by 10.204.128.149 with SMTP id k21mr4615508bks.42.1336342797298; Sun, 06 May 2012 15:19:57 -0700 (PDT)
Received: by 10.204.185.205 with HTTP; Sun, 6 May 2012 15:19:57 -0700 (PDT)
Received: by 10.204.185.205 with HTTP; Sun, 6 May 2012 15:19:57 -0700 (PDT)
In-Reply-To: <6F428EFD2B8C2F49A2FB1317291A76C11364EC028C@USNAVSXCHMBSA1.ndc.alcatel-lucent.com>
References: <6F428EFD2B8C2F49A2FB1317291A76C11364EC028C@USNAVSXCHMBSA1.ndc.alcatel-lucent.com>
Date: Sun, 06 May 2012 15:19:57 -0700
Message-ID: <CABkgnnXcSepa63+PrxiQEqMXhCR-bQOuQX1h=kCp6Av_4mG7mg@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: "Ejzak, Richard P (Richard)" <richard.ejzak@alcatel-lucent.com>
Content-Type: multipart/alternative; boundary="0015174c43aabb2dbe04bf658d2f"
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
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 22:20:00 -0000
Such a complicated process would not be necessary if the PeerConnection object were not home to two largely independent state machines. Nor would it be necessary if this scenario were considered out of scope. Certainly, if you consider the scenario interesting enough to do something about (I don't), then you news some support from the browser in setting up two ICE associations on the same local port, but that is easier without having to worry about the state of the media negotiation. Let's assume you could have transport and media separate. Then what you need is a clone operation for the transport object. You can simply start the media negotiation, as if from scratch on the cloned transport. The state of the media has no real bearing on this then, and Christer's concern becomes irrelevant. ...Though it is certainly valid given the current proposal. Other considerations: -does the clone get a copy of local streams if they are added to the original? I'm guessing not. -the transition from PR_ANSWER to OFFER will be difficult given that this is the obvious way to implement this -how does the application learn that cloning fails due to lack of resources? Normally, an offer can't include capabilities that cannot be provided, but this implies it. An alternative, within the constraints offered by JSEP, is to create a new PeerConfection and bind it to an existing one. What reasons can you offer for avoiding this choice? --Martin On May 6, 2012 11:54 AM, "Ejzak, Richard P (Richard)" < richard.ejzak@alcatel-lucent.com> wrote: > 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**** > > ** ** > > _______________________________________________ > rtcweb mailing list > rtcweb@ietf.org > https://www.ietf.org/mailman/listinfo/rtcweb > >
- Re: [rtcweb] Proposal for PeerConnection cloning Christer Holmberg
- Re: [rtcweb] Proposal for PeerConnection cloning Randell Jesup
- Re: [rtcweb] Proposal for PeerConnection cloning Ejzak, Richard P (Richard)
- Re: [rtcweb] Proposal for PeerConnection cloning Stefan Hakansson LK
- [rtcweb] Proposal for PeerConnection cloning Ejzak, Richard P (Richard)
- Re: [rtcweb] Proposal for PeerConnection cloning Christer Holmberg
- Re: [rtcweb] Proposal for PeerConnection cloning Ejzak, Richard P (Richard)
- Re: [rtcweb] Proposal for PeerConnection cloning Martin Thomson
- Re: [rtcweb] Proposal for PeerConnection cloning Ejzak, Richard P (Richard)
- Re: [rtcweb] Proposal for PeerConnection cloning Randell Jesup
- Re: [rtcweb] Proposal for PeerConnection cloning Christer Holmberg
- Re: [rtcweb] Proposal for PeerConnection cloning Randell Jesup
- Re: [rtcweb] Proposal for PeerConnection cloning Christer Holmberg
- Re: [rtcweb] Proposal for PeerConnection cloning Ejzak, Richard P (Richard)
- Re: [rtcweb] Proposal for PeerConnection cloning Iñaki Baz Castillo
- Re: [rtcweb] Proposal for PeerConnection cloning Randell Jesup
- Re: [rtcweb] Proposal for PeerConnection cloning Roman Shpount
- Re: [rtcweb] Proposal for PeerConnection cloning Harald Alvestrand
- Re: [rtcweb] Proposal for PeerConnection cloning Harald Alvestrand
- Re: [rtcweb] Proposal for PeerConnection cloning Randell Jesup
- Re: [rtcweb] Proposal for PeerConnection cloning Ejzak, Richard P (Richard)
- Re: [rtcweb] Proposal for PeerConnection cloning Roman Shpount
- Re: [rtcweb] Proposal for PeerConnection cloning Roman Shpount
- Re: [rtcweb] Proposal for PeerConnection cloning Martin Thomson