Re: [rtcweb] Another approach to forking...

Harald Alvestrand <harald@alvestrand.no> Fri, 23 September 2011 13:28 UTC

Return-Path: <harald@alvestrand.no>
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 33BE721F8C3C for <rtcweb@ietfa.amsl.com>; Fri, 23 Sep 2011 06:28:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -108.581
X-Spam-Level:
X-Spam-Status: No, score=-108.581 tagged_above=-999 required=5 tests=[AWL=1.418, BAYES_00=-2.599, J_CHICKENPOX_25=0.6, RCVD_IN_DNSWL_HI=-8, USER_IN_WHITELIST=-100]
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 ZXuX9ULXPbG0 for <rtcweb@ietfa.amsl.com>; Fri, 23 Sep 2011 06:28:22 -0700 (PDT)
Received: from eikenes.alvestrand.no (eikenes.alvestrand.no [158.38.152.233]) by ietfa.amsl.com (Postfix) with ESMTP id 9510E21F8B92 for <rtcweb@ietf.org>; Fri, 23 Sep 2011 06:28:22 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by eikenes.alvestrand.no (Postfix) with ESMTP id 743A139E112; Fri, 23 Sep 2011 15:30:55 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at eikenes.alvestrand.no
Received: from eikenes.alvestrand.no ([127.0.0.1]) by localhost (eikenes.alvestrand.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VwHAyaybIAqE; Fri, 23 Sep 2011 15:30:54 +0200 (CEST)
Received: from hta-dell.lul.corp.google.com (62-20-124-50.customer.telia.com [62.20.124.50]) by eikenes.alvestrand.no (Postfix) with ESMTPS id 3EEE439E0C4; Fri, 23 Sep 2011 15:30:54 +0200 (CEST)
Message-ID: <4E7C8A0D.2010307@alvestrand.no>
Date: Fri, 23 Sep 2011 15:30:53 +0200
From: Harald Alvestrand <harald@alvestrand.no>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11
MIME-Version: 1.0
To: Hadriel Kaplan <HKaplan@acmepacket.com>
References: <4E7C8277.9000902@alvestrand.no> <2DB2EECF-82F3-4D36-AD17-6891CDAACBBF@acmepacket.com>
In-Reply-To: <2DB2EECF-82F3-4D36-AD17-6891CDAACBBF@acmepacket.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Another approach to forking...
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: Fri, 23 Sep 2011 13:28:23 -0000

On 09/23/11 15:25, Hadriel Kaplan wrote:
> On Sep 23, 2011, at 8:58 AM, Harald Alvestrand wrote:
>
>> Just to confuse the forking issue still further:
>>
>> If the APIs remain as they are today, a JS application that wants to support forking can do the following:
>>
>> - Create a PeerConnection
>> - Cause it to generate an SDP blob ("SDP OFFER")
>> - Send that SDP blob out to be forked
>> - Throw away the PeerConnection
>> - As the answers come back, for each answer:
>>   - Create a new PeerConnection
>>   - Take out the SDP blob, put "SDP OFFER" at the top, and give it to the PeerConnection
> By this you mean take the answer and make it appear as an offer to PeerConn, right?
>
>
>>   - Throw away the generated "SDP ANSWER"
> But wouldn't the new PeerConn's be creating new ICE ufrag/passwords that won't match the one it created in the original PeerConn's offer, and thus not be able to successfully negotiate ICE with the peer(s)?
>
> And doesn't PeerConn create/allocate the IP:ports used for MediaStreams?  If so, each new PeerConn would also presumably be using a new UDP listen port and break this.
Oops. There was something I'd forgotten.

You're right - it won't work unless we create PeerConnections from the 
initial PeerConnection so that they can clone the ICE data and share the 
port.

Back to the drawing board. Thanks!

(in a previous API discussion I suggested a PeerConnectionFactory 
class.... nobody liked it at the time...)