Implementing a Live View Forum with Ajax and JSP

I am starting a personal project so at the moment I have full architectural / design control. I am just planning the structure at this stage. My goal is some kind of web forum, chat. The difference is that it needs to be updated in real time, new messages growing on client views shortly after they hit the server.

I am thinking of using ajax and jquery to load the watched streams of new messages (from tomcat server), the messages will be a little XML structure that is compiled into a nice client side post. This hopefully lowers my bandwidth costs. Bandwidth is my main concern. I'm worried that if multiple users with a javascript stream polling the server every ten seconds will cause a storm of http requests to my server even though the content is small.

Is there a better way each user completes a survey? I can write a backend in any framework, in this case. I want to stay away from Flash and Silverlight. As a public web page, it can be seen by a large number of viewers (every web device). All polls at 30 second intervals will have an incredible number of support calls, and 30 seconds is probably too slow for "live viewing" anyway! My preferred language is JSP.

0


source to share


1 answer


Client side pooling is not the only option for implementing live presentation. You should consider something called "Reverse AJAX ".



Alternatively, you can use some of the well-established frameworks that provide you with this functionality out of the box: DWR or even JSF (ice edges) .

+1


source







All Articles