tags:

views:

77

answers:

2

i am working on a web based chat. I need to implement gtalk like popups for private chat.for this i need to open a popup on the screen of destination user . is it possible to send some notification or open popup in diffrent sessions using session id.

A: 

use session with polling

+1  A: 

If you have less traffic a server sided chat with a polling mechanism should be sufficient. But as far as I know the easiest way for different sessions to communicate is probably to save all chat messages in a database. jQuery polls (e.g. every 5 seconds) that database with the current users session id and retrieves the new messages (btw. Facebook implemented their chat in Erlang because it needs to be highly scalable and distributed).

Daff