Forums Register Login

multi threaded chat using http

+Pie Number of slices to send: Send
I am trying to develop a chat which is one to one. The problem is it should be get/post based i.e.HTTP based and not socket based. Now, the concept is there are two users. Both have an applet running on their browsers and there is a servlet at the server end. I want to know is there a way through which when one user types a message for another user, the other user who is connected to the servlet using an http protocol comes to know instantly. If any one has attempted this kind of an implementation I would like some inputs regarding how were the thread programmed, how was the identification done etc.
+Pie Number of slices to send: Send
Hi amit,
Servlet is inherently Multithreaded. That each request to it will generate a new Thread. So you need not worry about server side threding. But server should maintain a list of users already logged in.
Using that list it can distribute a msg from one user among others.
Hope this will give you some guidelines
Cheeers!
+Pie Number of slices to send: Send
I am aware of the servlet being multi threaded. I am just wondering about the design of my application. Either I have to do a poll wherein one applet connects to the servlet every 5-10 seconds and gets the information or I have to use some other technique ...I need to know if some other technique exists for an HTTP connection and if so, how can the same be processed.
+Pie Number of slices to send: Send
hi,
I tried somewhat similar application in which i used the client pull technique.But i think u can do it by custom events also.
prashant

Originally posted by amit tantia:
I am aware of the servlet being multi threaded. I am just wondering about the design of my application. Either I have to do a poll wherein one applet connects to the servlet every 5-10 seconds and gets the information or I have to use some other technique ...I need to know if some other technique exists for an HTTP connection and if so, how can the same be processed.


I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 834 times.
Similar Threads
Query regarding Tomcat 6.x AIO
How To implement chat application
Private Chat
chat room, where should i start?
communication problem in chat application.....Please help!!
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:59:46.