HYBI                                                           S. Loreto
Internet-Draft                                                  Ericsson
Intended status: Standards Track                       February 23, 2010
Expires: August 27, 2010


                     HyBi Requirements and Features
                   draft-loreto-hybi-requirements-00

Abstract

   This document considers the requirements and resulting features
   needed for the design of the WebSocket Protocol.  The goal of the
   document is to provide a stable base for protocol design and related
   discussion.

Status of this Memo

   This Internet-Draft is submitted to IETF in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   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."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on August 27, 2010.

Copyright Notice

   Copyright (c) 2010 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



Loreto                   Expires August 27, 2010                [Page 1]


Internet-Draft              HyBi Requirements              February 2010


   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 BSD License.


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3
     2.1.  HyBi Terminology  . . . . . . . . . . . . . . . . . . . . . 3
   3.  WebSocket Requirements  . . . . . . . . . . . . . . . . . . . . 4
     3.1.  WebSocket Client Requirements . . . . . . . . . . . . . . . 4
     3.2.  WebSocket Server Requirements . . . . . . . . . . . . . . . 5
     3.3.  WebSocket Proxies Requirements  . . . . . . . . . . . . . . 5
     3.4.  WebSocket Security Requirements . . . . . . . . . . . . . . 5
   4.  Security Considerations . . . . . . . . . . . . . . . . . . . . 5
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
   6.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 6
   7.  Normative References  . . . . . . . . . . . . . . . . . . . . . 6
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . . . 6





























Loreto                   Expires August 27, 2010                [Page 2]


Internet-Draft              HyBi Requirements              February 2010


1.  Introduction

   HTTP [RFC2616] is a client/server protocol, where the HTTP servers
   store the data and provide it when it is requested by clients.  When
   used to used to retrieve data from an HTTP server, the client sends
   HTTP requests to the server, and the server returns the requested
   data in HTTP responses.  So the client has to poll continuously the
   server in order to receive new data.

   Recently techniques that enable bidirectional communication over HTTP
   have become more pervasive.  Those techniques reduce the need to poll
   continuously the server thanks to the usage of HTTP hanging requests
   and multiple connections between the client and the server
   [I-D.loreto-http-bidirectional].

   The goal of HyBi is to provide an efficient and clean two-way
   communication channel between client and server.

   The communication channel will:

   o  allow each side to, independently from the other, send data when
      is willing and ready to do it;

   o  rely on a single TCP connection for traffic in both the
      directions.

   o  reduce the high overhead produced by HTTP headers in each request/
      response.

   In the following sections we list and analyse the requirements from
   the perspective of clients and servers.


2.  Terminology

   In this document, the key words "MUST", "MUST NOT", "REQUIRED",
   "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
   RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as
   described in BCP 14, RFC 2119 [RFC2119] and indicate requirement
   levels for compliant implementations.

2.1.  HyBi Terminology

   This document uses the following HyBi-related terms:







Loreto                   Expires August 27, 2010                [Page 3]


Internet-Draft              HyBi Requirements              February 2010


   connection:  A transport layer virtual circuit established between a
      client and a server for the purpose of communication.

   frame:  The basic unit of Web Socket communication, consisting of a
      structured sequence of octets matching the syntax defined in the
      actual protocol and transmitted on the established communication
      channel.

   origin server:  The server on which a given resource resides or is to
      be created.



3.  WebSocket Requirements

   REQ. 1:  The Web Socket Protocol MUST run directly on top of TCP
      transport protocol.

   REQ. 2:  The Web Socket Protocol MUST layer a minimal framing
      mechanism on top of TCP data stream.

   REQ. 3:  The Web Socket Protocol MUST define the supported frame
      types.

   REQ. 4:  Textual data MUST be encoded as UTF-8.

   REQ. 5:  The protocol MUST be designed to support different frame
      types (e.g. binary).

   REQ. 6:  The Web Socket Protocol MUST be designed in such a way that
      its servers can share a port with HTTP servers, as by default the
      Web Socket Protocol uses port 80 for regular Web Socket
      connections and port 443 for Web Socket connection tunnelled over
      TLS.


3.1.  WebSocket Client Requirements

   REQ. 7:  The Web Socket Client MUST be able to set up a communication
      channel sending to a Web Socket Server a well defined handshake.

   REQ. 8:  The Web Socket Client MUST be able to request the server,
      during the handshake, to use a specific Web Socket sub-protocol.








Loreto                   Expires August 27, 2010                [Page 4]


Internet-Draft              HyBi Requirements              February 2010


   REQ. 9:  The Web Socket Client MUST have the ability to send
      arbitrary text content to the server on the established
      communication channel, in the form of ordered discrete blocks.

   REQ. 10:  The Web Socket Client MUST have the ability to send
      arbitrary binary content to the server on the established
      communication channel, in the form of ordered discrete blocks.


3.2.  WebSocket Server Requirements

   REQ. 11:  The Web Socket Server that accept to set up, with a Web
      Socket Client, a communication channel MUST send back to the Web
      Socket Client a well defined handshake.

   REQ. 12:  The Web Socket Server MUST have the ability to send
      arbitrary text content to the client on the established
      communication channel, in the form of ordered discrete blocks.

   REQ. 13:  The Web Socket Server MUST have the ability to send
      arbitrary binary content to the client on the established
      communication channel, in the form of ordered discrete blocks.


3.3.  WebSocket Proxies Requirements

   Todo

3.4.  WebSocket Security Requirements

   REQ. 14:  The Web Socket Protocol MUST use the Origin-based security
      model commonly used by Web browsers to restrict which Web pages
      can contact a Web Socket sever when the Web Socket protocol is
      used from a Web page.

   REQ. 15:  When used directly (not from a Web page), the WebSocket
      Protocol MUST use an equivalent security model.


4.  Security Considerations


5.  IANA Considerations

   This requirements document does not mandate any immediate IANA
   actions.  However, such IANA considerations may arise from future
   HyBi specification documents which try to meet the requirements given
   here.



Loreto                   Expires August 27, 2010                [Page 5]


Internet-Draft              HyBi Requirements              February 2010


6.  Acknowledgments


7.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [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.

   [I-D.loreto-http-bidirectional]
              Loreto, S., Saint-Andre, P., Wilkins, G., and S. Salsano,
              "Best Practices for the Use of Long Polling and Streaming
              in Bidirectional HTTP", draft-loreto-http-bidirectional-01
              (work in progress), October 2009.


Author's Address

   Salvatore Loreto
   Ericsson
   Hirsalantie 11
   Jorvas  02420
   Finland

   Email: salvatore.loreto@ericsson.com























Loreto                   Expires August 27, 2010                [Page 6]