Re: [rtcweb] Review of draft-ietf-rtcweb-jsep-07

Justin Uberti <juberti@google.com> Mon, 21 July 2014 20:29 UTC

Return-Path: <juberti@google.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 43A581A0373 for <rtcweb@ietfa.amsl.com>; Mon, 21 Jul 2014 13:29:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.378
X-Spam-Level:
X-Spam-Status: No, score=-1.378 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, NORMAL_HTTP_TO_IP=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6BLnK2GKq3UE for <rtcweb@ietfa.amsl.com>; Mon, 21 Jul 2014 13:29:10 -0700 (PDT)
Received: from mail-vc0-x230.google.com (mail-vc0-x230.google.com [IPv6:2607:f8b0:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E383C1A01DC for <rtcweb@ietf.org>; Mon, 21 Jul 2014 13:29:09 -0700 (PDT)
Received: by mail-vc0-f176.google.com with SMTP id id10so8477845vcb.21 for <rtcweb@ietf.org>; Mon, 21 Jul 2014 13:29:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=2sr8IMT6ne45PO28QrRFn3XL2jMlavRYiwha2OemC28=; b=o1VR8jHkTA/QUbnPAlNd5YgDmtVv3HmVs/ONSxf0Kd/wOSFCAfNBf0C31ko9LS7FE3 jhHZRDPhKAyKO0nf95f4ZrE1xDbC0A5hLSl/VaGqZI88bu7De/1Nbp0c7jA3oFJzf1rf 8q4Ls6tGr+KR4ULlCkv2a3otNwe553te+T+xhN2zb92YkBteG2k2iO7MwKwE6tcTDNZE EuKDisAn4jNsHMn3eJsXNgk4wHvDSjPxFYWRx8yG3MH6Jy3xQGwAcA9i6rRKtMcATuTD ve0T6l5jcV+80HxdZc+jwZZtgjHpqFBKg+3+JmV6An8EdJVkjidiRhvylLGGVbZZo9C1 gmpg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=2sr8IMT6ne45PO28QrRFn3XL2jMlavRYiwha2OemC28=; b=Z4jrfspmRyRK/MxPpg8mvrTJGzVrzUp58PJV3RLROSq9UM5fRj4DRzyEuE+QHXlyoi Th8gMSosxNDsXO2Rn0wEZ90JbCQ+XS0VHZugWByJ1OSCnnsiX9hUu1clPkqq+h+vG1Vw ybw1aG9Syillvrq9QFY/i7aIRyYgk4dQx/L/qpRmkwWdJ/3tMxyjwqLlpe/fBTQNoXdw YbJePESEId4GQIyAmoJ2L7iXNoRr+F+tt7eiRKCF5teU7ZPZGECp2TDAADI3Ho4SlQDM 6G0J1aN/HB+zEyseMHvUxwtmyZ38y+jv6uQi4ec1Cmo6zu+zHREvUsLFMPUbzaxzRQ+r MffA==
X-Gm-Message-State: ALoCoQkN+qEQ/ojZ/n5xCLbY8aNsp+AlNFwzm5Umt1QhRanW/BEFRbnriQeHrcnIW+VlUep9XwNy
X-Received: by 10.52.249.83 with SMTP id ys19mr6691468vdc.77.1405974548668; Mon, 21 Jul 2014 13:29:08 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.66.242 with HTTP; Mon, 21 Jul 2014 13:28:48 -0700 (PDT)
In-Reply-To: <53C96838.6020507@alum.mit.edu>
References: <53C96838.6020507@alum.mit.edu>
From: Justin Uberti <juberti@google.com>
Date: Mon, 21 Jul 2014 16:28:48 -0400
Message-ID: <CAOJ7v-0WAoDtS74yw9PwpmHO+fS5UU38SFMrbUzryLKk-7Rvbw@mail.gmail.com>
To: Paul Kyzivat <pkyzivat@alum.mit.edu>
Content-Type: multipart/alternative; boundary="089e0149cdd689803604feb9f591"
Archived-At: http://mailarchive.ietf.org/arch/msg/rtcweb/lu73bvYaDLNIclB9cXxrIcBObx8
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Review of draft-ietf-rtcweb-jsep-07
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
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: Mon, 21 Jul 2014 20:29:12 -0000

Thanks for the review. Comments inline.

On Fri, Jul 18, 2014 at 2:32 PM, Paul Kyzivat <pkyzivat@alum.mit.edu> wrote:

> I just did my first thorough read-through of JSEP in quite some time. I
> came away with a number of concerns:
>
> Section 1.1:
>
> When describing offers, modification by the application is mentioned:
>
>    JSEP's handling of session descriptions is simple and
>    straightforward.  Whenever an offer/answer exchange is needed, the
>    initiating side creates an offer by calling a createOffer() API.  The
>    application *optionally modifies that offer*, and then uses it to set
>    up its local config via the setLocalDescription() API.
>
> but when describing answers it is not:
>
>    When the call is accepted, the callee uses the createAnswer() API to
>    generate an appropriate answer, applies it using
>    setLocalDescription(), and sends the answer back to the initiator
>    over the signaling channel.  When the offerer gets that answer, it
>    installs it using setRemoteDescription(), and initial setup is
>    complete.
>
> And Section 6 only talks about changing offers, not answers. It is equally
> important to be able to modify answers. (More on this in later comment on
> section 6.)
>

Agreed. This was simply an oversight.

>
> Section 4.1.4:
>
>    The only difference between a provisional and final answer is that
>    the final answer results in the freeing of any unused resources that
>    were allocated as a result of the offer.  As such, the application
>    can use some discretion on whether an answer should be applied as
>    provisional or final, and can change the type of the session
>    description as needed.  For example, in a serial forking scenario, an
>    application may receive multiple "final" answers, one from each
>    remote endpoint.  The application could choose to accept the initial
>    answers as provisional answers, and only apply an answer as final
>    when it receives one that meets its criteria (e.g. a live user
>    instead of voicemail).
>
> Issue: in this forking case, until the final selection is made it is
> unclear which one will need ICE completed. Only when a setlocal is done on
> one of the answers will ICE begin to be performed. Then, if another answer
> is provisionally set, won't that stop ICE for the prior one? And won't it
> require new candidates? What if one of the earlier ones is eventually
> chosen as final?
>

Yes. This will be discussed in the setRemoteDescription handling section,
when it is written. Basically, ICE will be performed with the current
answer, and may complete. If another answer is set, that will cause all
current remote ICE candidates to be discarded, breaking any existing
connections; ICE will resume using any candidates supplied in the new
answer (or after the fact in addIceCandidate).


> And what if ICE completes for one of the candidates? Can't media start to
> flow? Then what if a different candidate is set as the final answer?
>

Yes. This is an application problem to resolve.

>
> Section 4.1.4.1:
>
> I question the following:
>
>    ...  While it is good practice to send an immediate
>    response to an "offer", in order to warm up the session transport and
>    prevent media clipping, the preferred handling for a web application
>    would be to create and send an "inactive" final answer immediately
>    after receiving the offer.  Later, when the called user actually
>    accepts the call, the application can create a new "sendrecv" offer
>    to update the previous offer/answer pair and start the media flow.
>
> This is very unfriendly when receiving calls that might be forked. By
> immediately "answering" a call before knowing if the user will accept it,
> you preempt the possibility that it will be answered on some other fork.
>
> For instance, if a call could come to your browser, or be sent to an
> answering service, and your broswer is on but you aren't present to accept
> the call, then the call will be accepted and then dropped rather than sent
> to the answering machine.


> So this technique should not be used if there is any possibility that the
> request could be coming from a source that might try other possibilities.
>

Agreed. But if you are building an application from scratch, I think it
would be better to use a separate PeerConnection for each remote endpoint,
so that you can use this technique without any downsides.

>
> Section 5.2.1:
>
>    When createOffer is called for the first time, the result is known as
>    the initial offer.
>
> By this definition, if a peer connection initially *received* an offer and
> sent an answer, and then it later sends an offer then that offer would be
> considered an initial offer.
>
> I think perhaps what is intended is:
>
>    When createOffer is called before setLocal has been called with
>    an offer,  the result is known as the initial offer.
>

OK. Will clarify.

>
> The following doesn't support the "balanced" BUNDLE policy:
>
>    Once all m= sections have been generated, a session-level "a=group"
>    attribute MUST be added as specified in [RFC5888].  This attribute
>    MUST have semantics "BUNDLE", and MUST include the mid identifiers of
>    each m= section.  The effect of this is that the browser offers all
>    m= sections as one BUNDLE group.  However, whether the m= sections
>    are bundle-only or not depends on the BUNDLE policy.
>

Not sure what you mean; the BUNDLE policy controls the use of bundle-only,
as described here, so I don't see an issue.

>
> Section 5.2.2 says:
>
>    o  If any MediaStreamTracks have been added, and there exist recvonly
>       m= sections of the appropriate media type with no associated
>       MediaStreamTracks, or rejected m= sections of any media type,
>       those m= sections MUST be recycled, and a local MediaStreamTrack
>       associated with these recycled m= sections until all such existing
>       m= sections have been used.  This includes any recvonly or
>       rejected m= sections created by the preceding paragraph.
>
> This fails to say anything about codec compatibility. SDP O/A requires the
> answer to be a subset of the offer in terms of PT/codec configuration. You
> should not use the same m-line unless there is a desire to use the same
> settings for the new track as are currently in use in the other direction.
>

OK. This is an open issue (https://github.com/rtcweb-wg/jsep/issues/21) and
we were waiting for someone to point out a specific problem here. Would you
mind coming up with a specific example to illustrate the issue?

>
> Section 5.3.1:
>
>    When createAnswer is called for the first time after a remote
>    description has been provided, the result is known as the initial
>    answer.
>
> By this definition, if a peer connection initially sent an offer and
> received an answer, and then it later receives an offer then the answer to
> that first *received* offer would be considered an Initial Answer.
>
> I think perhaps what is intended is:
>
>    When createAnswer is called before setLocal has been called with
>    an offer,  the result is known as the initial answer.
>

As above.

>
> When specifying the mapping of local tracks to m-lines in a received
> offer, there is again no discussion of codec compatibility. It is quite
> possible that the m-line chosen by the algorithm in this section won't have
> compatible codec attributes, but some other m-line will.
>

As above.

>
> Sections 5.3.2, 5.3.3, and 5.4-5.7:
>
> Are these empty because the content is yet to be written?
>

Yes.

>
> Section 6:
>
> Other likely changes are addition of extra attributes and maybe other
> parameters. For instance, CLUE will want to add another grouping construct.
>

Would these things be changed prior to setLocalDescription? The browser
won't act on them, so I would think they could be added after the fact.

>
>         Thanks,
>         Paul
>
> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>