kigster / simple-feed

This gem implements a flexible time-ordered activity feeds commonly used within social networking applications. As events occur, they are pushed into the Feed and distributed to all users that need to see the event. Upon the user visiting their "feed page", a pre-populated ordered list of events is returned by the library.
MIT License
331 stars 30 forks source link

Receive Feed Updates in real time #25

Open nikhilrayaprolu opened 4 years ago

nikhilrayaprolu commented 4 years ago

Is there a way, I can build subscriptions to the feeds and receive them in real-time over sockets? Something like http://getstream.io does?

kigster commented 4 years ago

Right now that's not possible, but you could use AJAX to frequently query for the total and new counts of any feed items (it's a cheap operation). Once you determine that there are new items available, you can fire-off another request to get the new items.

I suppose theoretically one could build an extension to SimpleFeed that uses Redis' PUB/SUB functionality to implement real-time notifications, but this is likely a non-trivial amount of work. If you really need this functionality and are willing to collaborate on it, I might be persuaded to work on it.

nikhilrayaprolu commented 4 years ago

That's good to know! I am super excited to collaborate but since I am fully occupied with an other project now, I have added this into my tasklist and will contribute whenever I start working on it!!

kigster commented 4 years ago

Great, I’ll keep it open for now.