Im starting a new project very soon, and im considering long polling to notify the users that they have a new private message/Notification that they have to check, really similar to how Facebook uses to notify you that someone has posted something about you/Liked a photo of you..
From what I have read, cometd seemed like a really good option to start with.
Then, other ways started emerging, like: Socket.io, and node.js ..
Now, my question is; Which one do you think is the best option for this case and why?
What I need to do exactly is the following;
- User 1 logs into their account
- User 2 sends User 1 a message which gets stored into the database and a flag is generated, (If possible?!)
- The PHP script responsible for User 1 should pick up the flag, and push a notification to User 1
I know how to take care of the javascript side, but I have never done anything similar to long polling. Im using jQuery as javascript library and PHP for the server side.
So recommendations and any good resources to do this?