0

Im trying to develop a simple web based chat program in java. Im using spring, tomcat, hibernate, javascript, ajax, and jquery. Im new to all of these technologies. I asked a question here on SO. I got alot of answers / suggestions. One suggestion is to use WebServerSocket but the problem is I think tomcat6 does not support it. For some reasons I have to stick to tomcat6. I got suggestion to learn about ajax polling. Im reading it right now and as I understand it has some intervals to fetch another query. Is there a way that I can have my program fetch query if the server notices that a client uploaded / posted data to the server? Another question is, does skype uses polling? If polling has interval in fetching of data will it cause traffic to my server? Please be patient in explaining to me because I believe there are alot of concepts that I misunderstood about polling. Please enlighten me. Im reading alot about polling, comet, jms and my brain is already very confused. I spent almost 8 hours and I can barely grasp the concepts. Please help and suggest where will I begin. Im such a novice. Thanks in advance.

4

1 に答える 1

1

I think the closest solution is to use a tecnique called COMET. In short you call the server that hang your call until an event happen, so when the call returns you start again a new call and so on. On each request you can receive back the event detail. You have to carefully implement it on the server, maybe you need to investigate something about how to do COMET with tomcat, since this technique could harm the scalability.

于 2012-11-06T06:03:33.773 に答える