I'm using yahoo messenger to chat with my friends. Every time a friend of mine comes online (almost intermediately) YM will notify me. How did Yahoo! (and other companies) do to implement this? As far as I guess, there are some techniques to solve this issue:
Pulling: client constantly (500ms duration, maybe) asks server about which users (in the user's list) has just come online and then notify user.
Pushing: server determines which users come online and then send a notify to client.
The second approach is much more acceptable. The data of user may contain a list of his friend (who added him to their lists), and the login event raises, server app will send a notify message to all users in this list.
OK, this is only my guess. How was it implemented in reality? Can you tell me?
Thank you.