BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Presentation: Interactive Websites with Comet and DWR

Presentation: Interactive Websites with Comet and DWR

Bookmarks

In this session filmed during QCon London 2008, Joe Walker presents Comet, a long polling AJAX method used for updating the browser’s page, and DWR, a Java library for writing web sites using AJAX.

Watch: Interactive Websites with Comet and DWR (1 hour)

Comet opens a network connection and keeps it open indefinitely to allow the server to respond when it needs to. The server seems to be pushing data to the browser, but in fact it’s a long polled connection. This approach allows web servers to update pages when new information is available, and avoids the process of creating a new connection every time the browser wants to. Comet changes the HTTP request-response communication model into a server push one being useful for interactive pages. There are major web sites and applications using Comet: GMail, GDocs, Meebo, Yahoo! Mail, Jot and others.

Walker presents the benefits of using Comet and the difficulties they encountered in creating it. He also talks about DWR using code snippets. DWR allows “web browsers to securely call into Java code almost as if it was running locally.” DWR can also “marshal virtually any data including collections, POJOs, XML and binary data like images and PDF files.”

Rate this Article

Adoption
Style

BT