We've just published a new article, HTML5 Server-Push Technologies, Part 1 by Gregor Roth. This is the first installment in a two-article series. Part 1 provides the historical background behind the evolution that led to the server-push technologies that are implemented in HTML5, and goes into the details of Server-Sent Events; Part 2 will cover the new WebSockets API in detail, and provide concluding remarks.
If you're old enough to have watched the evolution of the web -- or perhaps you participted in it -- you are familiar with the growth from static pages to today's rich internet applications (RIAs). But, you may not know the details of how an interactive web was foisted onto the strict request/response structure of HTTP.
In Part 1, Gregor goes into the details of this evolution, describing the HTTP request/response mechanism, then AJAX and Comet:
While Ajax is a popular solution for dynamically pulling data requests from the server, it does nothing to help to push data to the client. Sure, a server push channel could be emulated by an AJAX polling approach as described above, but this would waste resources. Comet, also known as reverse Ajax, enhances the Ajax communication pattern by defining architecture for pushing data from the server to the client. For instance, the Comet pattern would allow pushing a 'new mail available' event from the mail server to the WebMail client immediately.
Then Gregor introduces HTML5 Server-Side Events.
HTML5 also applies the Comet communication pattern by defining Server-Sent Events (SSE), in effect standardizing Comet for all standards-compliant web browsers. The Server-Sent Events specification "defines an API for opening an HTTP connection for receiving push notifications from a server."
HTML5 offers developers a new route for developing rich internet applications, alongside Adobe Flash and Microsoft Silverlight. Gregor also compares Server-Side Events with the Bayeux and BOSH Comet protocols:
Although Server-Sent Events do have less functionality than Bayeux or BOSH, Server-Sent Events have the potential to be become the dominant protocol for use cases where a unidirectional server push channel is required only (which is the case in many instances). The Sever-Sent Events protocol is much simpler than Bayeux or BOSH. For instance, you are able to test the event stream by using telnet. No handshake protocols have to be implemented. Just send the HTTP
GETrequest and get the event stream. Furthermore Server-Sent Events will be supported natively by all HTML5-compatible browsers
If you'd like to learn some of the details about the evolution of the web into an RIA platform, and where we're headed with HTML5, read Gregor Roth's HTML5 Server-Push Technologies, Part 1. Part 2 will be coming up within the next couple weeks.
Java Champion Yakov Fain is a Managing Director at Farata Systems where he's responsible for Enterprise Architecture and emerging technologies. He has authored several Java books, dozens of technical articles, and has a popular blog. He holds a BS and MS in Applied Mathematics, leads the Princeton Java Users Group, and is an Adobe Certified Flex Instructor. In addition, he hosts podcasts in English and Russian in which he explores issues of interest to IT professionals...
gnu_andrew announces IcedTea6 1.7.3 Released!:
We are pleased to announce the release of IcedTea6 1.7.3 (2010/03/31)! The IcedTea project provides a harness to build the source code from OpenJDK6 using Free Software build tools. It also includes the only Free Java plugin and Web Start implementation, and support for additional architectures over and above x86, x86_64 and SPARC via the Zero assembler port...
The Oracle Technology Network recently published Daniel Amadei's article, Joining Oracle Complex Event Processing and J2ME to React to Location and Positioning Events:
Real-time processing of data is becoming more important every day. The speed of changes in all kinds of market segments is increasing more than ever. Conversely, the time for reaction is getting shorter. This article shows how the concept of complex event processing (CEP) can help us address these challenges