I am going to implement something similar to Facebook notification and this website (StackOverflow\'s notification which is notifying us if anyone write a comment/answer etc for
Comet also known as Reverse Ajax, is a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it.
Comet (AKA long lived http, server push) allows the server to start answering the browser's request for information very slowly, and to continue answering on a schedule dictated by the server. For more information about Comet, see the following:
Alex Russell's original post coining the term
The Wikipedia article on Comet
Comet Daily, a blog with regular posts on the subject
DWR is a Java library that enables Java on the server and JavaScript in a browser to interact and call each other as simply as possible. With Reverse Ajax, DWR allows Java code running on a server to use client side APIs to publish updates to arbitrary groups of browsers. This allows interaction 2 ways - browser calling server and server calling browser. DWR supports Comet, Polling and Piggyback (sending data in with normal requests) as ways to publish to browsers.
DWR provides integration with Spring, Struts, Guice, Hibernate and others. You can read more from here.
Other Comet and Reverse AJAX frameworks: