RTCWeb | J.M. Marcon |
Internet-Draft | Alcatel-Lucent |
Intended status: Informational | April 11, 2013 |
Expires: October 13, 2013 |
RTCWeb data channel management
draft-marcon-rtcweb-data-channel-management-00
The Real-Time Communication in WEB-browsers (RTCWeb) working group is charged to provide protocols to support direct interactive rich communication using audio, video, and data between two peers' web-browsers. For the support of data communication, the RTCWeb working group has in particular defined the concept of bi-directional data channels over SCTP. How to transport application messages on these data channels seems straightforward (i.e. they can be carried as SCTP user messages), however it is yet to be decided how to establish and manage these data channels. This document specifies a method for this, which relies first on a lightweight and scalable out-of-band negotiation of data channel configurations (within the SDP offer/answer exchange) and second on the signaling of the configuration in use in the SCTP user message itself. Once these configurations are negotiated, further creations of data channels can occur purely in-band by simply sending user messages, which avoids to define a new in-band data channel protocol.
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 October 13, 2013.
Copyright (c) 2013 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.
[I-D.ietf-rtcweb-data-channel] provides use cases and requirements for the definition of RTCWeb data channels, and outlines how the Stream Control Transmission Protocol (SCTP) [RFC4960] encapsulated within Datagram Transport Layer Security (DTLS) [RFC6347] can be used for this purpose. While some of these requirements easily map to existing capabilities of the SCTP protocol and extensions (e.g. application messages can be carried as SCTP user messages), SCTP and existing SCTP extensions do not natively support the following requirements:
For setting up the SCTP association, the in-band SCTP association initialization is assisted out-of-band by JSEP [I-D.ietf-rtcweb-jsep] and the SDP Offer/Answer model [RFC3264]. For setting up each data channel, several approaches can be considered:
This document describes the latter approach, preferred by the author for the following reasons:
As a result, the proposal can easily cope with strenuous data transmission scenarios, like:
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].
This document uses the following terms:
This section provides an overview of the approach detailed in this document.
A data channel configuration is an identified fixed set of data channel parameters potentially applicable to some or all of the data channels created during the session. These parameters include: order of delivery, reliability of delivery, subprotocol.
Configurations are uniquely identified throughout the session, and negotatied out-of-band between the endpoints. The configuration concept is transparent to the application, which sets up and handles each data channel individually. Whenever the application creates a new data channel, the browser internally checks if the passed set of parameters strictly matches an existing configuration, and if not generates a new configuration identifier for this set. In the latter case only does the browser trigger the application for an SDP renegotiation.
In the SDP offer, the offerer associates to the m=application SDP line that defines the SCTP association one attribute line per data channel configuration.
For each data channel configuration in the offer that is accepted by the answerer, the answerer echoes in the answer the configurations supported and accepted. Once the offerer receives the answer and (in case of an initial offer) the SCTP initialization is complete, each data channel locally created using one of the accepted configurations is signaled to the application as open for transmission.
Each created data channel is bound to to one negotiated configuration.
By convention, the inbound and outbound streams of a data channel have the same SCTP stream number. This stream number is selected by the first endpoint sending a user message on this channel. Till this happens, an open data channel has no assigned stream number.
Data channel messages are sent as SCTP user messages, preceded in the DATA chunk User Data field by two bytes specifying data channel configuration identifier as well as the message data framing type (textual or binary).
A user message received on a stream number not assigned to any data channel automatically opens a data channel, set up according to the configuration signaled in the user message.
Closing a data channel is done in-band by resetting the Stream Sequence Number (SSN) of the related SCTP inbound and outbound streams, as defined in [RFC6525].
This proposal requires the registration of one SCTP Payload Protocol Identifier.
For the proposal in this document, a data channel configuration is characterized by the following properties:
For the proposal in this document, a data channel is characterized from an endpoint viewpoint by the following properties:
A message sent over a data channel inherits from the transmission properties configured to this data channel: reliability and order of delivery. In addition, the message is characterized by the following message-specific property:
Note that for API simplification purpose, reliability, order of delivery and payload protocol identifier are not configurable per user message, but per data channel only.
The payload protocol identifier (PPID) field present in SCTP DATA chunks is used to signal the data framing described in this document. This value is to be obtained from the SCTP Payload Protocol Identifiers registry managed by IANA.
The PeerConnection and underlying SCTP association are initialized with N data channels, all in Closed state, and with respective outbound and inbound stream numbers ranging from 0 to N-1. The number N can be specified by the application or else defaults to 16.
An application creating a data channel providing some data channel parameters to the agent's browser. If the subset of these parameters composing a data channel configuration does not strictly match an existing configuration, the browser assigns a new configuration identifier to this subset, and binds it to the data channel. The configuration identifier is generated incrementally, starting from zero for each SCTP association. Identifiers of configurations rejected by the answerer must never be used again.
In addition, if the application requests the creation:
The created data channel has no assigned SCTP stream number yet. At this stage though the user agent can anticipate a shortage of available SCTP streams and send in-band the request to increase the number of SCTP streams.
The new offer (if any) contains one 'm-line' for the SCTP assocation, and one attribute line per data channel configuration. This list of configurations must include the new configurations as well as all the configurations successfully negotiated in previous offer/answer exchanges for this SCTP association.
The peer's browser receiving the offer does the following:
The agent's browser receiving the answer does the following:
Each user message sent in a data channel includes the identifier of the configuration which this data channel is bound to. This signaling allows to enable or speed up the opening of new data channels in-band:
When the application requests to close a data channel, the agent's browser initiates an in-band Stream Sequence Number (SSN) reset of the related SCTP inbound and outbound streams. These streams are then available for further reuse.
To expose to upper layers an API similar to the Web Socket API [WSAPI], the agent's browser needs to specify to the peer's browser the framing type of each data channel message, amongst binary or text (UTF-8).
In addition, each user message needs to carry the identifier of the configuration which the data channel is bound to.
For the sending of a user message over an opened data channel, the agent's browser:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +------------------------+------+-------------------------------+ | Config ID | Type | Payload Data | +------------------------+------+ - - - - - - - - - - - - - - - + : Payload Data continued ... : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | Payload Data continued ... | +---------------------------------------------------------------+
RTCWeb data framing
Config ID : 12 bits
Type : 4 bits
An agent's browser receiving a user message on a data channel behaves as follows:
To signal the data channel configurations intended for use during the lifetime of an SCTP association, the agent completes the SDP <fmt> section of the m=application SDP line defined for the SCTP association. For each data channel configuration previously negotiated or newly added at the time of offer generation, the agent's browser:
As an example in the offer (line split for readability):
m=application 54111 DTLS/SCTP 5000 a=sctpmap:5000 webrtc-DataChannel 16 a=sctp-protocol:5000 config=1;label="channel 1";subprotocol="chat"; a=sctp-protocol:5000 config=2;label="channel 2"; subprotocol="file transfer";max_retr=3
data channel configuration setup in SDP offer
An in the returned answer (line split for readability):
m=application 54111 DTLS/SCTP 5000 a=sctpmap:5000 webrtc-DataChannel 16 a=sctp-protocol:5000 config=2;label="channel 2"; subprotocol="file transfer";max_retr=3
data channel configuration setup in SDP answer
In reply to this offer, the peer constructs in the answer the data channel configuration list of the SCTP association as follows:
This may need to be specified via MMUSIC.
To be completed.
To be completed.
The authors wish to thank Richard Ejzak, ... for their invaluable comments.
[I-D.ietf-rtcweb-jsep] | Uberti, J. and C. Jennings, "Javascript Session Establishment Protocol", Internet-Draft draft-ietf-rtcweb-jsep-02, October 2012. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC3758] | Stewart, R., Ramalho, M., Xie, Q., Tuexen, M. and P. Conrad, "Stream Control Transmission Protocol (SCTP) Partial Reliability Extension", RFC 3758, May 2004. |
[RFC4960] | Stewart, R., "Stream Control Transmission Protocol", RFC 4960, September 2007. |
[RFC6347] | Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, January 2012. |
[RFC6525] | Stewart, R., Tuexen, M. and P. Lei, "Stream Control Transmission Protocol (SCTP) Stream Reconfiguration", RFC 6525, February 2012. |
[RFC3264] | Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with Session Description Protocol (SDP)", RFC 3264, June 2002. |
[I-D.jesup-rtcweb-data-protocol] | Jesup, R., Loreto, S. and M. Tuexen, "WebRTC Data Channel Protocol", Internet-Draft draft-jesup-rtcweb-data-protocol-03, September 2012. |
[I-D.ietf-rtcweb-data-channel] | Jesup, R., Loreto, S. and M. Tuexen, "RTCWeb Data Channels", Internet-Draft draft-ietf-rtcweb-data-channel-04, February 2013. |
[WebRtcAPI] | Bergkvist, A., Burnett, D., Narayanan, A. and C. Jennings, "WebRTC 1.0: Real-time Communication Between Browsers", World Wide Web Consortium WD WD-webrtc-20120821, August 2012. |
[WebSocketAPI] | Hickson, I., "The WebSocket API", World Wide Web Consortium LastCall WD-websockets-20120809, August 2012. |
[ITU.T140.1998] | Protocol for Multimedia Application Text Conversation", ITU-T Recommendation T.140, February 1998. | , "