Re: [rtcweb] Another consideration about signaling

"Kevin P. Fleming" <kpfleming@digium.com> Mon, 10 October 2011 14:59 UTC

Return-Path: <kpfleming@digium.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 A47E921F8BA8 for <rtcweb@ietfa.amsl.com>; Mon, 10 Oct 2011 07:59:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.707
X-Spam-Level:
X-Spam-Status: No, score=-101.707 tagged_above=-999 required=5 tests=[BAYES_50=0.001, J_BACKHAIR_43=1, MISSING_HEADERS=1.292, RCVD_IN_DNSWL_MED=-4, 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 A5lRp41WgaNZ for <rtcweb@ietfa.amsl.com>; Mon, 10 Oct 2011 07:59:21 -0700 (PDT)
Received: from mail.digium.com (mail.digium.com [216.207.245.2]) by ietfa.amsl.com (Postfix) with ESMTP id 9D25B21F8B61 for <rtcweb@ietf.org>; Mon, 10 Oct 2011 07:59:21 -0700 (PDT)
Received: from zimbra.digium.internal ([10.24.55.203] helo=zimbra.hsv.digium.com) by mail.digium.com with esmtp (Exim 4.69) (envelope-from <kpfleming@digium.com>) id 1RDHK2-0000WK-Gb for rtcweb@ietf.org; Mon, 10 Oct 2011 09:59:18 -0500
Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.hsv.digium.com (Postfix) with ESMTP id 7ACFDD82A3 for <rtcweb@ietf.org>; Mon, 10 Oct 2011 09:59:18 -0500 (CDT)
Received: from zimbra.hsv.digium.com ([127.0.0.1]) by localhost (zimbra.hsv.digium.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c-rn69-Q8QQY for <rtcweb@ietf.org>; Mon, 10 Oct 2011 09:59:18 -0500 (CDT)
Received: from [10.24.250.46] (unknown [10.24.250.46]) by zimbra.hsv.digium.com (Postfix) with ESMTPSA id 1D0E7D8024 for <rtcweb@ietf.org>; Mon, 10 Oct 2011 09:59:18 -0500 (CDT)
Message-ID: <4E930845.60809@digium.com>
Date: Mon, 10 Oct 2011 09:59:17 -0500
From: "Kevin P. Fleming" <kpfleming@digium.com>
Organization: Digium, Inc.
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15
MIME-Version: 1.0
CC: rtcweb@ietf.org
References: <CALiegfmoPWfhtBRiOfgLHG1uhJK_kK2t11xMoop-fT6qW4DUJQ@mail.gmail.com> <4E8F57EB.8030504@digium.com> <CABw3bnOD5APidfbqNscXdPURyY-AMQZqoyYPm6v2xWo5VWKOLA@mail.gmail.com> <4E905B7F.7010505@digium.com> <CABw3bnN2O6zgREBoWEdW2jj6-A4df05KJ_Y49LT3tsUXaXewwA@mail.gmail.com>
In-Reply-To: <CABw3bnN2O6zgREBoWEdW2jj6-A4df05KJ_Y49LT3tsUXaXewwA@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: quoted-printable
Subject: Re: [rtcweb] Another consideration about signaling
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: Mon, 10 Oct 2011 14:59:22 -0000

On 10/08/2011 04:51 PM, José Luis Millán wrote:
> 2011/10/8 Kevin P. Fleming<kpfleming@digium.com>:
>> On 10/08/2011 04:02 AM, José Luis Millán wrote:
>>>
>>> Kevin,
>>>
>>> 2011/10/7 Kevin P. Fleming<kpfleming@digium.com>:
>>>>
>>>> On 09/16/2011 10:42 AM, Iñaki Baz Castillo wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> Let's imagine that rtcweb defines a specific signaling protocol (i.e.
>>>>> SIP) so browsers MUST use it natively for signaling the media streams.
>>>>> Of course this would require a SIP proxy/server in server side (think
>>>>> about NAT) which IMHO seems a showstopper (how to deploy such a SIP
>>>>> proxy in shared web hostings? a "mod_sip" for Apache? should I make a
>>>>> XMPP<->SIP protocol gateway in order to intercommunicate web-browsers
>>>>> with pure XMPP clients?)
>>>>>
>>>>> But there is another important drawback with this assumption:
>>>>>
>>>>> A web site could be interested in drawing in the web the status of the
>>>>> different audio/video streams between users connected to the web. This
>>>>> could mean displaying in the web the active streams (audio/video),
>>>>> when a session is on hold, when it's resumed again, when a new stream
>>>>> is added to a multimedia session (i.e. offering video within an
>>>>> already established audio session).

> Sorry if I'm not underdstanding you well. I understand from the
> paragraph above that the client may use these APIs to consult the
> server about it's own state (client's state).
>
> The web application does not need to monitor the signalling, but will
> be aware of its own state (sessions..) by simply relying on the
> signalling API. ie: Client executes the 'call' method of the API 'X',
> this method executes the corresponding callbacks according to the
> state of the running call: 'trying', 'ringing', 'ok'. This way the
> client is aware of its own state.
>
> If this is not what you meant, could you please clarify?

I interpreted the paragraph above from Inaki's post very differently, so 
I'll try to describe it more concretely.

Imagine we have users Alice, Bob and Charlie, all of who are using a web 
application called XYZ that utilizes RTCWEB functionality to allow 
communication between its users. The XYZ application has two major 
components: a set of Javascript/HTML that it pushes out to the browsers, 
and a set of code (language/platform is irrelevant) that runs on the 
server that pushed the code out, and communicates with that JavaScript code.

When the XYZ application's Javascript wants to setup sessions to other 
users of the application it uses the local WebRTC APIs to access the 
browser's interfaces for media, and uses *some* sort of signaling 
protocol over HTTP/WebSocket to establish the sessions through the XYZ 
application server. This could be SIP, Jingle, or something else entirely.

In order for XYZ's Javascript running in Alice's browser to display the 
state of *her* sessions with the XYZ application, the Javascript doesn't 
need any help; it already knows what sessions it has established and 
their states. The signaling protocol is irrelevant here. If the XYZ 
application server implements the chosen signaling protocol itself, then 
it *also* knows the states of these sessions, and by extension it knows 
the states of all the other sessions that XYZ application users are 
involved in.

If the XYZ application wants to display in Alice's browser the states of 
other sessions that Alice is not involved in (this is what I believe 
Inaki was referring to above), then it can use this information that it 
has (by virtue of implementing the signaling protocol itself) in order 
to push information out to her browser for it to display.

The situation changes quite a lot if the XYZ application server does 
*not* implement the signaling protocol itself, though. If it just acts 
as a conduit for that signaling to be sent between the browser and a 
'communications server' of some type (I suspect this will be a very 
common deployment model, as web application developers aren't going to 
want to shoehorn an entire communications server into their web 
application containers if they can avoid it), then it doesn't know the 
state of any of these sessions at all; it just knows that it has seen 
session signaling messages going back and forth.

In this situation, if the XYZ application wants to display the states of 
other sessions, it will have to have some API between itself and the 
communications server (the browser is not involved here) in order to 
monitor (and potentially control) those sessions. This allows the web 
application developer to be completely insulated from the signaling 
protocol that is used, and instead just use an API provided by the 
communications server in order to track and control communications 
sessions. Thus, the choice of signaling protocol is irrelevant, as long 
as a hypothetical web application developer can find and use a suitable 
communications server that implements the chosen protocol *and* provides 
adequate APIs for the web application to fulfill its requirements.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming@digium.com | SIP: kpfleming@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org