One of the most basic laws of a web application is that the client, not the server, must initiate any communication between the two. There are a number of common-use cases where, ideally, the server would like to talk to the client−dashboards and monitoring apps, chat rooms and other collaborations, and progress reports on long-running processes. Comet (a.k.a. Reverse Ajax) provides a mechanism for enabling this. Comet is moderately complex to implement. But this practical, hands-on book gets you going.
In Part 1 of this book, we start by examining the use cases, and look at the simple alternatives to Comet and how far they can satisfy your needs. In some situations, though, only Comet will do.
In Part 2, we demonstrate how to set up and run a Comet-based application.
With this book, be a part of the next generation, Ajax 2.0.
Table of Contents
- Comet and Reverse Ajax: The Next-Generation Ajax 2.0
- 1. What Are Comet and Reverse Ajax?
- 2. Simple Ways to Achieve Push
- 3. Introducing Comet
4. Comet the Easy Way
- 4.1. The Emergence of Comet Tools
- 4.2. Direct Web Remoting
- 4.3. DWR and Comet
- 4.4. Summary
5. Scaling Comet in Java
- 5.1. Thread Management for the Web
- 5.2. Jetty 6
- 5.3. Jetty Continuations and DWR
- 5.4. Future Comet Support in Java
- 5.5. Summary
- 6. Introducing Bayeux
7. Combining Comet with CRUD
- 7.1. Revisiting Magnetic Poetry
- 7.2. Client-Side Initialization Code
- 7.3. Server-Side Initialization Code
- 7.4. Creating Domain Objects
- 7.5. Updating Domain Objects
- 7.6. Deleting Domain Objects
- 7.7. Using Cometd for Progress Reports
- 7.8. Additional Resources
- 7.9. Summary
- Title: Comet and Reverse Ajax: The Next-Generation Ajax 2.0
- Release date: October 2008
- Publisher(s): Apress
- ISBN: 9781590599983