I’m developing a kind of a chat for a website and I can’t imagine how to start it, for instance, when I use the facebook chat I can see that even if I use two different browsers, the commands work on both. If I go offline using one browser, I can see that the other one goes offline as well.
One more thing how does the guy on the other side is gonna know when I send the message?
P.S.: I know the programing languages mentioned, I just need to know how the chat works in real-time (not the codes, but the idea).
In order have a real-time chat like facebook, your server needs to ‘push’ data to the browser, while ajax is a ‘polling’ technique.
I use APE Push Engine, but you can also use Socket.IO client side, and Node.js server-side or Comet. Honestly, I would go the Socket.IO or Comet route if I could go back because it has a bigger community / better documentation.