I want to create a push notification system like Facebook. Whenever Facebook wants to tell you something (like that someone commented on a post, tagged you, etc), you'll see a small notification show up in the bottom left corner of the screen. It fades in and fades out.
How do I build a system like this with jQuery and Rails? How does it even work? Does JS constantly ask the server, "is there a new notification?" or does the server somehow push to this service.
Right now, if a user sends another user a message (for example), I can add a notification to the user's queue saying "you have a new message", but it won't appear until a page reload...