I am interested in a really good way of instant messaging like meebo and facebook and myspace, and for notifications on the page. An example on my site now that a user receives a new email message, comment on a photo, profile comment, friend request, some other things, they will receive a notification and a link on the page on which they work using jQuery and AJAX.
I believe this is not the best way to do this, though, since my jquery code will basically run a PHP script to query the mysql table every 30 seconds or so for every user who has a page with this script run. I would like to, in the end, add some kind of instant messaging, for example facebook has in the chat panel at the bottom of the screen if I can find an effective way to do this.
I have heard the terms Comet and HTML5 WebSockets, but I'm not sure if these solutions are the ones over which I should look for such a function? I would like to keep bandwidth at a minimum, and running a request every few seconds seems not very efficient on a site with high traffic.
If you know some good solutions, explain how they work a little.
source
share