Network Working Group | I.B.C. Baz Castillo |
Internet-Draft | XtraTelecom S.A. |
Intended status: Informational | S.I.C. Ibarra Corretge |
Expires: April 27, 2012 | AG Projects |
J.L.M.V. Millan Villegas | |
XtraTelecom S.A. | |
October 25, 2011 |
Open In-The-Wire Protocol for RTC-Web
draft-sipdoc-rtcweb-open-wire-protocol-00
RTC-Web clients communicate with a server in order to request or manage realtime communications with other users. This document exposes four hypothetical and different RTC-Web scenarios and analyzes the requirements of the in-the-wire protocol in each of them.
The aim of this document is to make RTC-Web properly fit in the nature of the Web.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 27, 2012.
Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
In contrast to protocols such as SIP [RFC3261] or XMPP [RFC6120], RTC-Web [RTC-Web] does not define a protocol for establishing media sessions between peers. Instead RTC-Web defines the media protocols (RTP/SRTP/ICE) to be used by web browsers. It also states how the web browser natively handles media streams (including media security and validation concerns), defines the requirements for the communication between the RTC-Web stack in the browser and the web application (via a JavaScript API to be defined by W3C) and MAY suggest some kind of media negotiation protocol to be carried in-the-wire between RTC-Web clients and servers.
That said, RTC-Web does not mandate any user identifier syntax (in the way SIP defines the SIP URI), nor an authentication mechanism, in-the-wire messages format or the way messages are exchanged between RTC-Web clients and servers. There are many different ways by which those targets can be achieved nowadays on the Web.
All this flexibility makes the whole picture of an RTC-Web scenario and the scope in which RTC-Web is involved hard to understand. This document tries to identify each component in the RTC-Web architecture and clarify which components can be left up to web developers and which others should be mandated by RTC-Web specifications.
The following terms have special significance in the context of RTC-Web.
{ "request": { "call-id": "0skilqwp", "transaction-id": 1001, "request-type": "call", "source-user": "Bob", "destination-user": "Alice", "subject": null, "cookie": "kj87kjsdhf", "media": _ROAP_OFFER_OBJECT_ } }
{ "response": { "call-id": "0skilqwp", "transaction-id": 1001, "status": "accepted", "source-user": "Alice", "destination-user": "Bob", "cookie": "t112mnkszz", "media": _ROAP_ANSWER_OBJECT_ } }
{ "request": { "call-id": "0skilqwp", "transaction-id": 1001, "request-type": "ack", "source-user": "Bob", "destination-user": "Alice", "cookie": "kj87kjsdhf", "media": _ROAP_OK_MESSAGE_ } }
{ "request": { "call-id": "0skilqwp", "transaction-id": 1002, "request-type": "hangup", "source-user": "Alice", "destination-user": "Bob", "cookie": "t112mnkszz" } }
Here a hypothetical and very simple RTC-Web scenario is described:
Lets inspect the RTC-Web components as defined by this document in the given scenario:
POST /ajax/chat/send.php?__a=1 HTTP/1.1 Host: www.facebook.com Connection: keep-alive X-SVN-Rev: 460802 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Referer: http://www.facebook.com/?sfrm=1 Content-Length: XXX Cookie: datr=ZjyfTjurvmsqvYVBDcXF8u; c_user=104442654509775; L=2; lu=RgQytVtJJBoSvWUNOYzs0oQg; sct=1319153603; xs=60%3A1c179a7dfb7f08278477b20e778bd391; p=112; presence=631L212REp_5f1B08654409875F4EriF0CEstateFDutF131910363 \ 96EvisF1HsndF1ODiFA21B02609687525A2C_5dEfFA21B02602687525A2Euct \ 319103618FD55F1G318103604PEuoFD1B02602687525FDexpF1319103680370 \ lF_5b1_5dEolF0CCEalFD1B02602687525FDiF0umF0CCCC; wd=1366x675 Pragma: no-cache Cache-Control: no-cache msg_id=1319103647568%3A3629978310&client_time=1319103646048& to=100002772687525&num_tabs=1&pvs_time&msg_text=hello& to_offline=false&to_idle=false&window_id=2877189837& sidebar_launched=true&sidebar_enabled=true&sidebar_capable=true& sidebar_should_show=false&sidebar_visible=false& post_form_id=449eb730c851e127f21d8a88b6a00667&fb_dtsg=AQC3StlW&lsd& post_form_id_source=AsyncRequest&__user=100002624409995
Facebook integrates IM (instant messaging) into its web application. For that the JavaScript code performs HTTP long polling for retrieving incoming IM messages in realtime, and sends an HTTP POST request when a user sends a message to another user. Such HTTP POST requests look as follows:
The above request contains some parameters in both the Cookie header and the body. The Cookie header seems to contain information about the identity of the user sending the IM message. The Cookie value is probably also used for authentication in the server. The "msg_text" parameter in the body contains the IM text message itself while the "to" parameter in the body seems to contain the destination user (a long integer probably representing the user ID). The meaning of other parameters in both the Cookie and the body are up to Facebook, this is, they are specific to the application. It seems obvious that it's not possible to standarize all these parameters.
POST /ajax/call/call.php?__a=1 HTTP/1.1 Host: www.facebook.com Connection: keep-alive X-SVN-Rev: 460802 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Referer: http://www.facebook.com/?sfrm=1 Content-Length: XXX Cookie: datr=ZjyfTjurvmsqvYVBDcXF8u; c_user=104442654509775; L=2; lu=RgQytVtJJBoSvWUNOYzs0oQg; sct=1319153603; xs=60%3A1c179a7dfb7f08278477b20e778bd391; p=112; presence=631L212REp_5f1B08654409875F4EriF0CEstateFDutF131910363 \ 96EvisF1HsndF1ODiFA21B02609687525A2C_5dEfFA21B02602687525A2Euct \ 319103618FD55F1G318103604PEuoFD1B02602687525FDexpF1319103680370 \ lF_5b1_5dEolF0CCEalFD1B02602687525FDiF0umF0CCCC; wd=1366x675 Pragma: no-cache Cache-Control: no-cache call_id=1319103647568%3A3629978310&client_time=1319103646048& to=100002772687525&num_tabs=1&pvs_time&to_offline=false& to_idle=false&window_id=2877189837&sidebar_launched=true& sidebar_enabled=true&sidebar_capable=true& sidebar_should_show=false&sidebar_visible=false& post_form_id=449eb730c851e127f21d8a88b6a00667&fb_dtsg=AQC3StlW& lsd&post_form_id_source=AsyncRequest&__user=100002624409995& media=_ROAP_OFFER_OBJECT_
Assuming that Facebook is willing to integrate RTC-Web within the web application, it makes sense that Facebook would be interested in reusing the same protocol and message format it's already using for IM (which is also realtime communication). So when a user clicks some "Call" button within his Facebook contact list, it is expected that the JavaScript code could generate an HTTP POST as follows:
The new HTTP POST request differs in the request URI (which now points to "/ajax/call/call.php"). The body includes a "media" parameter whose value is a ROAP Offer JSON object (properly encoded if necessary).
Given this HTTP POST request, lets inspect the RTC-Web components as defined by this document:
If Facebook would desire to interoperate (federate) with a SIP network it is clear that it would need a signaling protocol gateway which converts the HTTP POST information into a SIP request, and the ROAP Offer into a SDP body.
This is an optimal solution for interoperating with SIP without requiring a protocol gateway. In this scenario the web user downloads a JavaScript code from the website and the JavaScript code establishes a WebSocket connection with a SIP proxy (the RTC-Web server) implementing the WebSocket transport [I-D.ibc-rtcweb-sip-websocket] (along with other common SIP transports as UDP and TCP). The messages exchanged between the RTC-Web client and server over the WebSocket connection are pure SIP requests and responses, with no modifications (others than the new "WS" transport identificator in the Via header).
INVITE sip:bob@example.org SIP/2.0 Via: SIP/2.0/WS invalid.domain;branch=z9hG4bK56sdasks From: sip:alice@example.org;tag=asdyka899 To: sip:bob@example.org Call-ID: asidkj3ss CSeq: 1 INVITE Max-Forwards: 70 Contact: <sip:alice@invalid.domain;transport=ws> Supported: path, outbound Content-Type: application/sdp _SDP_
When the user makes a call from the web it generates a SIP INVITE to be sent over the WebSocket connection, which looks as follows:
For this to work, the JavaScript code must map the ROAP Offer retrieved via the JavaScript WebRTC API into a normal SDP (it's not the aim of this documment to discuss about the complexity such mapping could involve).
When the INVITE arrives to the RTC-Web Server (which behaves as a pure SIP proxy) it just performs standard SIP routing procedures (the same as if the request would have arrived via UDP or TCP transports), so there is no need for a protocol gateway when interoperating with a pure SIP network out there.
Given this INVITE request, lets inspect the RTC-Web components as defined by this document:
A website "www.poker-game.info" makes use of HTTP Comet technology for carrying realtime information about the game to each participant. The messages exchanged via HTTP Comet between participants and the web server are XML documents conveying updates and actions happening during the game.
Now that website wants to integrate RTC-Web capabilities and enter each participant into an audio multiconference in which every user listens to all the participants and can speak to them.
<?xml version="1.0" encoding="ISO-8859-1"?> <game-multiconf> <action>call</action> <media>_ROAP_OFFER_XML_</media> </game-multiconf>
To accomplish this architecture and still reuse the existing design, once the user logs-in the web his browser receives an incoming audio call from the conference server. Such call request is carried over the HTTP connection (HTTP Comet) as a new XML document which looks as follows:
The ROAP Offer is generated by the conference server, which satisfies all the media requirements of RTC-Web (ICE, SRTP).
The JavaScript code in the client side answers the call (once the user accepted it) and sends a similar XML containing a ROAP Answer via the existing HTTP connection.
Given the above XML document, lets inspect the RTC-Web components as defined by this document:
This document has shown four hypothetical scenarios of RTC-Web. Each scenario uses its own In-The-Wire Protocol (JSON over WebSocket, HTTP POST, SIP over WebSocket and XML over HTTP Comet) and it's hard to expect that all these scenarios could be constrained to use the same protocol and message format in-the-wire. The needs of each scenario are not the same, neither the custom fields carried in-the-wire (see for example the ammount of custom parameters Facebook includes within the HTTP POST request).
In the Web each website decides how to accomplish the features and capabilities it wants to provide to its users. Mandating the message format in-the-wire seems not to be an option given the nature of the Web. Mandating it would also make RTC-Web integration very hard into existing websites which already implement their custom signaling protocol and message format for realtime communications (as instant messaging), their authentication mechanisms, etc.
RTC-Web will bridge the gap between realtime communication services such as VoIP and the Web, so it must play by the rules present on the Web. These rules include the freedom by which the web developer chooses his preferred option to innovate and offer new services to users. That is the key to success of the Web and should be respected.
Given the conclusions in the previous section, this document states some new requirements for RTC-Web:
Not applicable.
Not applicable.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC3261] | Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002. |
[RFC2616] | Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. |
[RFC6120] | Saint-Andre, P., "Extensible Messaging and Presence Protocol (XMPP): Core", RFC 6120, March 2011. |
[I-D.jennings-rtcweb-signaling] | Jennings, C and J Rosenberg, "RTCWeb Offer/Answer Protocol (ROAP)", Internet-Draft draft-jennings-rtcweb-signaling-00, October 2011. |
[I-D.ietf-hybi-thewebsocketprotocol] | Fette, I and A Melnikov, "The WebSocket protocol", Internet-Draft draft-ietf-hybi-thewebsocketprotocol-17, September 2011. |
[I-D.ibc-rtcweb-sip-websocket] | Castillo, I, Millan, J and V Pascual, "WebSocket Transport for Session Initiation Protocol (SIP)", Internet-Draft draft-ibc-rtcweb-sip-websocket-00, September 2011. |
[I-D.moffitt-xmpp-over-websocket] | Moffitt, J and E Cestari, "An XMPP Sub-protocol for WebSocket", Internet-Draft draft-moffitt-xmpp-over-websocket-00, December 2010. |
[RTC-Web] | IETFW3C, "Real Time Collaboration on the World Wide Web", October 2010. |