Re: [rtcweb] SDP_PRANSWER followed by SDP_OFFER scenario in JSEP

Roman Shpount <roman@telurix.com> Wed, 02 May 2012 16:23 UTC

Return-Path: <roman@telurix.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 E096521F861B for <rtcweb@ietfa.amsl.com>; Wed, 2 May 2012 09:23:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.817
X-Spam-Level:
X-Spam-Status: No, score=-2.817 tagged_above=-999 required=5 tests=[AWL=0.159, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 EO50DThItl-P for <rtcweb@ietfa.amsl.com>; Wed, 2 May 2012 09:23:38 -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 C402921F85B7 for <rtcweb@ietf.org>; Wed, 2 May 2012 09:23:37 -0700 (PDT)
Received: by bkty8 with SMTP id y8so767313bkt.31 for <rtcweb@ietf.org>; Wed, 02 May 2012 09:23:36 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=7ipmZ5PPoWLFZ5dIY3HclgreXG6SzzpxKJpgSljwa5A=; b=eRLTFKkdqt/zXByVI+llvw71IahaW5F8hJuRJRMkSpKJr9L3dNrPo5Ew39EJzU30Pj YqgNpM+smeetrJSBbJmnThXS+TEh7JD6YSdGpliE5jxWSYFnoJKkjVBMEjjgomOSNPHK nLqBeS6yuhtXd7DS8MuR+KYIpprNxoCs+AwirCn+XZIjviKHAJvIOwlQKwfz3OGDwMVI CRQz1KwxbOgxwUqcMA5AZ3e66LgvJzy+oFOI6HmDjVtmv/inA+dVm40K9z63yASUy1t8 pMqCKCl7L+r1S9FAcvxpxG+LGplPXi7SA1fgsfoOZz+j0/zjhQusJTBTa5b53tySfLJI w98w==
Received: by 10.204.153.199 with SMTP id l7mr5171307bkw.86.1335975816662; Wed, 02 May 2012 09:23:36 -0700 (PDT)
Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by mx.google.com with ESMTPS id r14sm5012675bkv.11.2012.05.02.09.23.35 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 May 2012 09:23:35 -0700 (PDT)
Received: by bkty8 with SMTP id y8so767269bkt.31 for <rtcweb@ietf.org>; Wed, 02 May 2012 09:23:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.148.83 with SMTP id o19mr6296592bkv.96.1335975811443; Wed, 02 May 2012 09:23:31 -0700 (PDT)
Received: by 10.205.117.146 with HTTP; Wed, 2 May 2012 09:23:27 -0700 (PDT)
In-Reply-To: <4FA15898.1040204@alvestrand.no>
References: <387F9047F55E8C42850AD6B3A7A03C6C0E23B102@inba-mail01.sonusnet.com> <CA+rAfUMfZBHxAjR0zmwhSxftQbPK0X3sNuxu4UV6bnMvnJ_9xA@mail.gmail.com> <CAOJ7v-3K=NK6zCLr-E-aSHDKVv2hMqnUhZKroX0YoBTo6-nQ+Q@mail.gmail.com> <6F428EFD2B8C2F49A2FB1317291A76C1136029362A@USNAVSXCHMBSA1.ndc.alcatel-lucent.com> <4FA13816.6050003@alvestrand.no> <CAD5OKxsOAeTRdCgj2g4BY8maeG1n9nzCv29g8kaFPVZ4tf8C5w@mail.gmail.com> <4FA15898.1040204@alvestrand.no>
Date: Wed, 02 May 2012 12:23:27 -0400
Message-ID: <CAD5OKxsmOiP3jfviMhyFbQ3NmhXHhHHsSXmuPpeW=3TyU2R2zQ@mail.gmail.com>
From: Roman Shpount <roman@telurix.com>
To: Harald Alvestrand <harald@alvestrand.no>
Content-Type: multipart/alternative; boundary="0015175cdc56ab6ae104bf101b98"
X-Gm-Message-State: ALoCoQnnPmlu/UFfU5tzpon0AhVMsa7n1Lkrh0Guk0VINQRG37k8ZNxLsgfLiSdFIm50yuEX45ff
Cc: rtcweb@ietf.org
Subject: Re: [rtcweb] SDP_PRANSWER followed by SDP_OFFER scenario in JSEP
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: Wed, 02 May 2012 16:23:39 -0000

On Wed, May 2, 2012 at 11:54 AM, Harald Alvestrand <harald@alvestrand.no>wrote:

>  It does mean that the implementation will have to do reference counting
> to know when it can close the port - if one clones the socket and binds the
> clones to different remote ports, I think the OS will take care of it on
> Unix, I'm not sure how it goes for other OSes.
>
> Does someone know what the semantic of bind() is here - whether one needs
> to have an unbound port to fork from in order to bind to different remote
> addresses? I've not tried this myself.
>

I actually do not think this cloning the socket will work properly even on
Unix. You can connect a cloned UDP socket to a different remote IP/port but
both sockets will continue to receive packets from ALL the remote IP/ports.

Even if it does work, this does not prevent the implementation from
reference counting, since the same TURN allocation would need to be reused
across multiple peerconnections, with a new set of permissions/channels
created for each connection.

In the case of hardware codecs that must be allocated to a specific stream
> .... if one supports forking, which connection (if any) gets the codec? The
> first one to start using it? What happens to the second one?
>

My understanding was that you do not really need to allocated hardware
resources until the answer arrives and ICE handshake completes. So, my
assumption was that in case of forking, original connection does not
allocate any codec related resources. If the connection is cloned, then it
does not allocation any codec related resources either and stores the
reference for the sockets and TURN allocations from the original
connection. When either connection receives an answer, it conducts the ICE
handshake and allocates resources as needed.


>  I kind of think it's less disruptive to the people who don't want to fork
> stuff if you must instantiate a different object in order to support
> forking. Then implementations that don't support forking can simply not
> offer a constructor for that object.
>

Alternatively clone can return and error/null if cloning is not supported.
_____________
Roman Shpount