Building Websocket Applications with GlassFish and Grizzly
<ul>Building WebSocket Applications with GlassFish and Grizzly </ul><ul><li>Justin Lee – Principal Member of Technical Staff at Oracle </li></ul>
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.
What are WebSockets? From the abstract: The WebSocket protocol enables two-way communication between a user agent running untrusted code running in a controlled environment to a remote host that has opted-in to communications from that code. The security model used for this is the Origin-based security model commonly used by Web browsers. The protocol consists of an initial handshake followed by basic message framing, layered over TCP. The goal of this technology is to provide a mechanism for browser-based applications that need two-way communication with servers that does not rely on opening multiple HTTP connections (e.g. using XMLHttpRequest or <iframe>s and long polling). http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-06
What are they? <ul><li>Look a lot like HTTP but really aren't </li><ul><li>HTTP-like handshake negotiation </li></ul><li>Available via clear or SSL transports
Bidirectional, asynchronous communication thereafter
Introduce a formal, standard object through which client code can talk to the server </li><ul><li>WebSocket vs XHR </li></ul><li>Basically a TCP connection tunneled through an HTTP server </li><ul><li>potentially