I am developing a rails app that allows users to post, much like facebook or stackoverflow. I want to implement an alert system that lets a user know when a new post has been added (just like here at stackoverflow).
Now, I am going to be deploying to heroku. This poses some problems, such as the fact that heroku does not support websockets. If I want websocket support, I am going to have to pay for them via Pusher or Pubnub - expensive services. However, I am not so sure that I need that kind of setup. I might be able to get away with long polling (via an ajax request every so often with a self calling setTimeout).
My question is, at what point do I need to use a push service such as Pubnub/Pusher over just an ajax interval call? Or better yet, how can I get away with an ajax interval call (calling every 30 seconds or minute maybe)? (Is it smarter to just use ajax in the begging anyway, then upgrade to a service if I get flooded with traffic?)
My updates do not need to be real time necessarily, but I would like it as soon as possible.