You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has anybody ever added polling for latest topics using Rails 4's new live streaming to Forem and could share some info on how they did it?
StackOverflow, Quora, Disqus etc. all do it so I thought it'd be nice if Forem could too. I've begun working on some pseudo code here and would really appreciate some feedback:
Not that I am aware of. If you'd like this feature in Forem then a PR would be the best way to get it there. Please submit one when you're done and I'll take a look.
Thanks, but I'm not so sure I want to proceed with live streaming after all. Got this feedback from this friend just now:
I got slightly farther than Aaron Patterson's article, but I was so annoyed by the multithreading and how it worked and didn't that I mostly stopped there.
I had to turn on Rails thread-safe mode to get it to work, but in Rails 4 that requires turning on class caching, which is a pain.
I then moved on to trying to do similar things using websockets or Faye -- both are also annoying, and require multithreading or EventMachine or Celluloid :-(
jQuery polling is massively easier. I was just emailing a guy yesterday that had a worst-case situation -- doing every-5-second AJAX polling on his Rails server with big HTML tables that bogged down and took forever to render.
And you know what? All he has to do is semi-sane caching and it'll be pretty reasonable. ETags or last-modified headers plus Rails view caching and he's fine. The 304-unmodified responses are small enough that they're not a big deal at any reasonable number of users. There's a variation on that where you write cache files and tell NGinX to respond according to its last-modified date that's even faster.
Hi!
Has anybody ever added polling for latest topics using Rails 4's new live streaming to Forem and could share some info on how they did it?
StackOverflow, Quora, Disqus etc. all do it so I thought it'd be nice if Forem could too. I've begun working on some pseudo code here and would really appreciate some feedback:
https://gist.github.com/richwhiteguy/94eb5139d3319a8a5c62
The text was updated successfully, but these errors were encountered: