There are gems like Faye that allow an action taken by one user to send a real-time push notification to another user, similar to facebook notifications.
Does anyone know of a way to accomplish this using only jquery and ajax?
There are gems like Faye that allow an action taken by one user to send a real-time push notification to another user, similar to facebook notifications.
Does anyone know of a way to accomplish this using only jquery and ajax?
Following on Joey Chong's answer, you can use SSE (Servent-Sent Events) to push messages to a user (Faye is based on websocket, that may be a problem with some proxies and firewalls, and it looks like you don't really need a bidirectional connection).
For more information on websockets and SSE : here and here.
If you don't want to build your SSE server or just want to test some client-side code, StreamData will allow you to turn any JSON API into SSE pushes (disclaimer: I represent this firm). It's free up to one million messages, so you can try and leave it if SSE is not what you are looking for.