Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can i make interactive chat like gmail, Facebook  RSS feed

 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i make interactive chat like GMAIL, FACEBOOK.

Can it possible .. using ajax that frequently updating a portion/part/ chat box.

If we do in this way, I am sure our server will be overloaded.

Please provide your suggestions.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start by searching for "chat" in the servlet and JSP forums right here; this topic has been discussed many times before.
 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of those solutions are based on socket programming. I just want to use http protocol and javascript and jsp/java.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66208
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then it won't be interactive chat like gmail or Facebook.
 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Then it won't be interactive chat like gmail or Facebook.


So you are saying that browser can open TCP socket connection.

its true then please suggest me. this will helpful to me.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really, unless you want to (and can) use WebSockets. But I don't agree with Bear's statement that sockets are needed - FB and Gmail manage to do it using nothing but HTTP and JavaScript, too.
 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Not really, unless you want to (and can) use WebSockets. But I don't agree with Bear's statement that sockets are needed - FB and Gmail manage to do it using nothing but HTTP and JavaScript, too.

Yes, WebSocket is new Protocol, GMAIL providing chat service long before the websocket as I recall.
I think javascript check server-cache in loop and updates chat content. Am I right?
 
vikas byn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript provide a function - setInterval(callBackFunction, sleepDuration). should i use this?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before thinking about implementation details like that I advise to think about the features of the chat and its overall design.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!