Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Flesh out protocol descriptions

The W3C's Web Apps working group has recently produced a couple of candidate recommendations for APIs that allow server to client messaging, Server-Sent Events and WebSockets.

Server-Sent Events

(aka Event Source API)EventSource API)

Server-Sent Events (SSE) provide a one-way channel for text messages from server to client over an HTTP connection. SSE provides reliability by automatically reconnecting, after a defined backoff period, in the event of a broken connection. The protocol provides identifie message types (channels).

 

WebSockets

The WebSocket (RFC 6455) protocol provides full-duplex (two-way), message-based communications over a single TCP socket. Messages may be text or binary. It is designed for a web application, but also may be used independentlyincluding initialization via an HTTP Upgrade header so the protocol may coexist on the HTTP port.  At the same time, as a messaging tool, it allows other two-way messaging protocols to run on top of it. See the Messaging and Queueing topic below. Due to its close relationship to HTTP and web communicationsits flexibility, we expect it to become widely adopted. It already is supported in the latest versions of the well known browsers.

Concerns

  • Incompatibility with firewalls and proxies. We suspect these issues eventually will be ironed out, but that may take a long time.
  • Session maintenance – how to reestablish a connection if necessary?

Messaging and Queueing

Can messaging and queueing be integrated with WebSocket use? The links below show significant work being done with well known protocols and products.

...