Archive

Archive for the ‘Comet’ Category

WebSocket Radar: Ted Godard on WebSockets

October 28th, 2008
No comments

 

Ted Godard of Ice Faces fame recently posted some interesting commentary on WebSockets, which can be found on his blog “Ted’s Ajax Adventure.” Ted’s post does a nice job of breaking down the standard and answers many of the questions often asked about the communications section of the HTML 5 specification. Its definitely worth reading.

AJAX, Comet, WebSocket, WebSockets

Future of Web Standards: HTML5, AJAX, Reverse AJAX, Comet, TCP Connection

October 27th, 2008
No comments

 

The Chronicles of Web Standards: the HTML 5, the Comet and the WebSocket will be an exciting event covering Comet, HTML 5, the latest, and future enhancements to the web. AJAX’s popularity is largely due to the ease with, which it allows browsers to request additional information from the server. However, one major limitation of AJAX is that the browser must initiate the request for data from the server. Technologies such as HTML 5 WebSockets and Comet solve this problem by allowing the server to push data to the browser at any time. HTML 5 WebSockets take this a step farther than Comet by facilitating full-duplex communications between the browser and server over a single connection. This event will start with a general introduction to Comet, followed by an in depth panel discussion moderated by Kevin Nilson with panelist: John Fallows, Alex Russell, Ted Godard, Dion Almaer, and Michael Carter. After the panel Kevin Nilson will give a Technical Comet Presentation which outlines: Overview of Polling, Long Polling, and Streaming, followed by Details Bayuex using Cometd.

Date/Time: 10/29/2008 Wed 7:00-9:30pm

Event: The Chronicles of Web Standards: the HTML 5, the Comet and the WebSocket

Moderator & Presenter: Kevin Nilson, Principal Software Architect at E*Trade Financial

Speakers:

  • John Fallows, CTO and co-founder at Kaazing, Co-author of JSF and Ajax (Apress)
  • Alex Rusell, President of the Dojo Foundation & Project Lead for The Dojo Toolkit
  • Dion Almaer, Open Web Advocate at Google and co-founder of Ajaxian.com and “Audible Ajax” podcast.
  • Michael Carter, Founder at Orbited Project
  • Ted Goddard,Senior Software Architect at ICEsoft Technologies and ICEfaces.org

Location: Google, Mountain View Campus

Address: Tunis Tech Talk Room Building 43, 1600 Amphitheatre Parkway,Mountain View, CA 94043

Registration URL: http://webstandard.eventbrite.com

AJAX, Comet, Events, WebSocket, WebSockets

WebSocket Radar: Mike Galpin of eBay on WebSockets and AJAXWorld

October 23rd, 2008
No comments

There was also a lot of interest around WebSockets, especially the work by the folks at Kaazing. A duplexed socket connection to the server sounds great on paper. I think there will be some very interesting technologies that grow around that.

Read more…

AJAX, AjaxWorld, Comet, Kaazing, Kaazing Enterprise Gateway, WebSocket, WebSockets

WebSocket Radar: Kaazing Gateway: An Open Source HTML 5 Websocket Server

October 1st, 2008
No comments

 

Jonas Jacobi gave a presentation, Kaazing Gateway: An Open Source HTML 5 Websocket Server, at JAOO this past Monday and received the vote for the conference’s most popular talk. Congratulations Jonas!

Comet, WebSocket, WebSockets

WebSocket Radar: Comet and Highly Interactive Websites - Joe Walker

September 17th, 2008
No comments

 

In a recent Ajaxian.com post entitled Comet and Highly Interactive Websites - Joe Walker, Joe Walker of Site Pen elaborates on some of the technical and performance aspects of developing and deploying highly interactive Comet-enabled sites. Joe also declares WebSockets is a “cleaner solution” for solving the Comet problem.

Comet, WebSocket, WebSockets

WebSocket Radar: “Expanding Cross-Site Comet Options”

September 10th, 2008
2 comments

Kris Zyp of Site Pen recently posted an interesting article on Comet Daily, which covers the topic of cross-site Comet options. He calls out a few notable solutions, and also notes WebSocket as:

WebSocket is almost certainly the most comprehensive solution for Comet.

One fault with the article is the statement “I would expect to see this in the generation of browsers after next (FF4 or FF3.2, IE9, Safari.next)”, which implies there is a long wait for WebSocket support. Fortunately, this could not be farther from the truth. Starting Sept. 29th, Kaazing with its Kaazing Enterprise Gateway offering will provide native support for WebSockets, as well as a JavaScript emulation layer for more antiquated browsers such as IE 5.5. This means that any modern browser can take advantage of WebSockets with in a few weeks time.

Comet, Kaazing, Kaazing Enterprise Gateway, WebSocket

WebSocket Radar: Kaazing isn’t the only one loving WebSockets

September 5th, 2008
No comments

 

In a recent interview with Tech Republic, Ian Hickson of Google and the HTML 5 spec lead, stated:

My own personal favorite feature is probably the Web Sockets API, which allows two-way communication with a server so that you can implement games, chatting, remote controls, and so forth.

Ah.. its good to be loved. ;-)

AJAX, Comet, HTML 5, Kaazing, Kaazing Enterprise Gateway, WebSocket, WebSockets

Comet Evolved: HTML 5 Web Sockets & Server-Sent Events

September 5th, 2008
No comments

 

Jonas Jacobi, Kaazing’s CEO, will be delivering a three day course through Kaazing’s partnership with SkillsMatter in London on October 6th, 2008. The course is entitled “Comet Evolved: HTML 5 Web Sockts & Server-Sent Events.” Below is an exert from the course description, for more information you can visit the course web site here.

This highly practical 3-day class on Comet and HTML 5 Web Sockets and Server-Sent Events (SSE) for Real-time We applications was designed by Kaazing’s Jonas Jacoi, CEO and co-founder of Kaazing corporation. This course will teach you how to create next generation real-time Web 2.0 solutions, using HTML 5 Web Sockets and SSE that work today.

Come and learn about Comet architecture, HTML 5 Web Sockets and SSE. With these new standards, the browser can now enjoy the first-class citizenry of network communications that has long been enjoyed by desktop applications. You will learn how to use the emerging standards to build scalable, mission critical rela-time Web 2.0 applications such as:

* Trading System Clients
* Online Betting Applications
* Social Chat Solutions
* Performance Monitoring Applications
* RFID and GPS Tracking Applications
* Sports and News Broadcasting Applications

Upon completion of this course you will know how to create your own scalable, real-time Web applications with the latest HTML 5 standards-based technologies.

Learn How to:

* Decide when, why and what Comet-style technology to use and its implications on your architecture
* Setup and configure an enterprise Websocket server and development environment
* Use client-side API’s to communicate directly with back-end systems such as JMS, XMPP, STOMP and SMTP
* Master the fundamental technologies used to push information to Web clients using standard technologies
* Design, develop, debug and deploy scalable real-time Web applications
* Address server-side scalability issues with Asynchronous Request Processing (ARP)

LEARN HOW TO:

* Decide when and why to use Comet and its implications on your architecture
* Setup and configure an Enterprise Comet development environment and use Comet APIs
* Master the fundamental technologies used to push information to Web clients
* Design, develop, debug and deploy testable and scalable real-time Java EE applications with Comet
* Address server-side scalability with Asynchronous Request Processing (ARP)

AJAX, Comet, HTML 5, Kaazing, WebSocket, WebSockets

HTML 5 WebSockets: A better pipe, for a better expierence

September 5th, 2008
No comments

Introduction

AJAX, with its asynchronous updates, enabled a richer user experience on the Web. It accomplished this primarily by obscuring the latency issues that brought a “clunk-ish” feel to traditional Web applications. More recently, Comet reintroduced HTTP-based “push” communications to enable Web applications with real-time events through a medium, namely JavaScript and a variety of transports (e.g. long-polling, forever frames, XHR Streaming, etc.), that is far more accessible than “push” technologies of the late 90's, and which further lessens latency concerns felt by end-users, creating a more dramatic, and interactive Web experience. Both AJAX and Comet can attribute their respective successes to addressing various shorting comings of HTTP communications, whether that be with the introduction of asynchronous requests/responses or server initiated events, but it is the resolution of these trouble areas that have enabled the user experience of the document-driven Web to rapidly evolve.

Today, with the advances brought about by AJAX and Comet, we enjoy the rich Web experience delivered by applications such as Meboo, Gmail with GChat, Google Docs, and Mint.com, but these applications, however impressive, simply represent a tipping point in user experience and, more importantly, still demonstrate a continued lag in the resolution of HTTP's limitations. Such applications approximate the experience afforded by the desktop, but do not deliver an experience that is as equally compelling. Granted, better “eye candy”, as provided by the canvas tag or plugin-based technologies such as Adobe Flex and MS Silverlight, helps to close the gap, but even with better visual effects, latency remains the beast of burden that drags down much of the user-experience delivered over the Internet, and as a result costs the industry money.

Yes, there is something to be said about the old adage “time is money.” Amazon.com, as reported by highscalability.com in a post "Latency everywhere and it cost sales - How to crush it", recently stated that 100 ms of latency costs Amazon 1% of every sale. In the same post, Todd Hoff reported that Google VP Marissa Mayer, at the 2006 Web 2.0 Expo, stated that a half a second delay content delivery is correlated with a 20% drop in traffic at Google. Hoff also references a 2008 report by the TABB Group estimated that a 5 millisecond lag behind competing trading platforms could be as costly as $4 million in losses per millisecond. In short, users respond well to speed, as do our wallets.

Therefore, to further address latency concerns, and bridge the gap between desktop and Web applications, we must look to a new communications paradigm. Fortunately, HTML 5 WebSockets, as defined in the communications section of the HTML 5 specification, represent the next evolution of Web communications. WebSockets provide not only a standard against which Comet- and AJAX-style, or any other RIA application, can be built, but also a socket, native to the browser, that facilitates network programing from the browser with efficient bi-directional (or full-duplex) communication over a single connection, eliminating many of the connection limitations that surround Comet and AJAX. The result is the promotion of the browser and its associated applications to the same citizenship on the network as that of rich desktop applications.

HTML 5 WebSockets: A Better Mouse Trap

The HTML 5 specification introduced the WebSocket interface, which defines a full-duplex communications channel that operates over a single socket and is exposed via a JavaScript interface in HTML 5 complaint browsers. The full-duplex capabilities of Comet and AJAX, unlike WebSockets, are not native to the browser, and rely on maintaining two connections –one for up stream and one for downstream-- in order to stream data to and from the browser. With the introduction of one succinct interface (see Listing 1), we can now divorce ourselves from the mind bending hacks all to often associated with Comet and focus on the task at hand. Furthermore, by moving to a single, streaming channel of communications, we can overcome the insufficiencies of techniques such as long-polling and “forever frames”, and as a result further reduce latency.

JAVASCRIPT:
  1. [Constructor(in DOMString url)]
  2. interface WebSocket {
  3.   readonly attribute DOMString URL;
  4.   // ready state
  5.   const unsigned short CONNECTING = 0;
  6.   const unsigned short OPEN = 1;
  7.   const unsigned short CLOSED = 2;
  8.   readonly attribute int readyState;
  9.   // networking
  10.   attribute EventListener onopen;
  11.   attribute EventListener onmessage;
  12.   attribute EventListener onclosed;
  13.   void postMessage(in DOMString data);
  14.   void disconnect();
  15. };

Utilizing the WebSocket interface couldn't be simpler. To connect to an end-point, just create a new WebSocket instance, providing the new object with a url that represents the end-point to which you wish to connect (See listing 2). Note that a ws:// and ws:// prefix indicate a WebSocket and a secure WebSocket connection, respectively. A WebSocket connection is established by upgrading from the HTTP protocol to the WebSocket protocol during the initial handshake between the client and the server. Once established, WebSocket data frames can be sent back and forth between the client and the server in full-duplex mode. The connection itself is exposed via the onmessage and postMessage methods defined by the WebSocket interface.

JAVASCRIPT:
  1. var myWebSocket = new WebSocket(ws://www.websocket.org);

Before connecting to the end-point and sending a message, you can associate a series of event listeners to handle each phase of the connection life-cycle.

JAVASCRIPT:
  1. myWebSocket.onopen = function(evt) { alert(“Connection open ...”); };
  2. myWebSocket.onmessage = function(evt) { alert( “Received Message:  ”  +  evt.data); };
  3. myWebSocket.onclose = function(evt) { alert(“Connection closed.”); };

To send a message to the server, simply call postMessage and provide the content you wish to deliver. After sending the message, call disconnect to terminate the connection. It really couldn't be much easier.

JAVASCRIPT:
  1. myWebSocket.postMessage(“Hello WebSocket! Goodbye Comet!”);
  2. myWebSocket.disconnect();

One of the more unique features WebSockets provides is its ability to traverse firewalls and routers, a problem area for many Comet-enabled applications. Comet applications typically employ long-polling as a rudimentary line of defense against firewalls and proxies. The technique is effective, but is not well suited for applications that have sub 500 millisecond latency or high throughput requirements. Plugin-based technologies such as Adobe Flash, also provide some level of socket support, but have long been burdened with the very proxy and firewall traversal problems that WebSockets now resolves.

A WebSocket detects the presence of a proxy server and automatically sets up a tunnel to pass through the proxy. The tunnel is established by issuing an HTTP CONNECT statement to the proxy server, which requests for the proxy server to open a TCP/IP connection to a specific host and port. Once the tunnel is set up, communication can flow unimpeded through the proxy. Since HTTP/S works in a similar fashion, support for SSL is inherent. Note that Web sockets are not natively supported by modern browsers, however there are a few vendors that provide implementations that enable today's browsers to take advantage of this emerging technology. Two vendors are Kaazing and its Kaazing Enterprise Gateway offering, due for release in early Fall 2008, and an early stage open source initiative, the Orbited projected, which provides its own Python-based server.

In addition, the WebSocket protocol supports a diverse set of clients (e.g. JavaScript, Adobe Flex, JavaFX, Microsoft Silverlight, etc.). However, in the case of JavaScript, WebSockets cannot deliver raw binary data, because at present JavaScript does not provide support for a raw binary type. Therefore, binary data is ignored if the client is written in Javascript, which in turn limits JavaScript clients to the usage of text-based protocols. Fortunately, other client types such as Adobe Flex and Microsoft Silverlight do provide support for binary types, enabling more than text-based services to reach the browser. As an additional note, some vendors, such as Kaazing, provide libraries to support binary types in JavaScript via base 64 encoding.

Summary

Latency is the mother of interactivity, and in no place is this more apparent than on the Web. Every slip of a millisecond equates to a slower end-user experience which in turn translates into elevated risk that a user's eyes will avert elsewhere. Both AJAX and Comet attempt to obscure latency problems, and certainly address the issue of user-perceived latency. However, WebSockets removes the need to obscure such problems and introduces a solution, one that does not play tricks on the perception of our end-users, but delivers content in real-time with real results.

AJAX, Comet, HTML 5, Kaazing, Kaazing Enterprise Gateway, RIA, Web 2.0, WebSocket, WebSockets

Google Chrome and Kaazing Enterprise Gateway

September 5th, 2008
No comments

Google announced on Tuesday the release of the company's much anticipated . The new browser brings with it a high-performance JIT-based JavaScript engine, V8. After the announcement, Kaazing's development team ran the browser through a battery of our browser certification tests. A expected the browser passed with flying colors, and we are therefore happy to announce the compatiability of Kaazing Enterprise Gateway's JavaScript libraries with Google's Chrome browser.

Comet, JavaScript, Kaazing, Kaazing Enterprise Gateway Google, Kaazing Enterprise Gateway