I am trying to implement a Facebook-like live notifications system to notify users whenever someone adds them as friend, like their post or posts replies to their comments.
The only way to do it is to have some sort of mechanism (e.g. Javascript) to repeatedly poll the server for updates. Doing server pushes to web browsers isn't possible.