views:

271

answers:

1

I am building an application in Java (with a jQuery frontend) that needs to talk to a third party application. it needs to update the interface every two seconds at the most.

Would it be a good idea to use comets? If so, how do they fit into the picture?

What other means/technologies can I use to make the application better?

A: 

Have you looked at DWR (http://directwebremoting.org/dwr/index.html)? It provides a fairly nice interface between Java and Javascript and supports Comet. I believe it even lets you target data pushes based on a number of criteria, e.g. this user or these users on this page. It can also automatically adjust pooling times (if you go this route).

I would also recommend checking out ExtJS http://extjs.com/deploy/dev/examples/samples.html if you intend on making this more of an application then a webpage (like a blog or whatever). I am uncertain if they have any kind of Comet support built in (I don't think so), but you could easily make an adapter that kept one of their data sources up-to-date with push data. Their components, especially the grids, are top notch.

Ambience