Friday, July 27th, 2007

Write scalable Comet applications with Jetty and DWR

Category: Articles, Comet, DWR

Philip McCarthy wrote a nice piece on how to Write scalable Comet applications with Jetty and Direct Web Remoting.

He delves into the details of Comet, Jetty, Continuations, and DWR “Reverse Ajax”:

You’ve now seen how Jetty Continuations combined with Comet can provide an efficient, scalable solution for event-driven Ajax applications. I haven’t given any figures for the scalability of Continuations because performance in a real-world application depends on so many variables. Server hardware, choice of operating system, JVM implementation, Jetty configuration, and indeed your Web application’s design and traffic profile all affect the performance of Jetty’s Continuations under load. However, Greg Wilkins of Webtide (the main Jetty developers) has published a white paper on Jetty 6 that compares the performance of a Comet application with and without Continuations, handling 10,000 concurrent requests. In Greg’s tests, using Continuations cuts thread consumption, and concomitantly stack memory consumption, by a factor of more than 10.

You’ve also seen how easy it is to implement an event-driven Ajax application using DWR’s Reverse Ajax technology. Not only does DWR save you much client- and server-side coding, but Reverse Ajax also abstracts the whole server-push mechanism away from your code. You can switch freely among the Comet, polling, or even piggyback methods, simply by altering DWR’s configuration. You’re free to experiment and find the best-performing strategy for your application, without any impact on your code.

If you’d like to experiment with your own Reverse Ajax applications, a great way to learn more is to download and examine the code of the DWR demos .

Posted by Dion Almaer at 2:47 am
Comment here

2 rating from 106 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.