O'Reilly logo

Comet and Reverse Ajax: The Next-Generation Ajax 2.0 by Dave Crane, Phil McCarthy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Scaling Comet in Java

You've now seen how DWR integrates with Java applications to implement server push using Comet. But we haven't yet addressed scaling. In this chapter, we'll begin by examining why traditional web servers scale poorly to the demands of a Comet application. We'll then look at the Jetty server, which offers an alternative approach to serving Comet requests, and demonstrate how to write scalable Comet applications using this proprietary approach.

Thread Management for the Web

As you saw earlier in this book, traditional servers allocate a thread to each incoming HTTP request. The idea is that the thread should perform any necessary work to service the request and send a response as quickly as possible, after which it ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required