Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8500677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:00:38+00:00 2026-06-11T01:00:38+00:00

I am developing a rails app that allows users to post, much like facebook

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:00:40+00:00Added an answer on June 11, 2026 at 1:00 am

    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?)

    By using a service like Heroku it means you are offloading the pain of the web hosting environment. It means that as your service gets popular it will handle the scaling for you. If you use any form of polling you will need to scale the Heroku part of your service sooner as more resources are used up by the polling requests.

    Polling can be much less efficient but it really depends on how frequently your users will see updates. If updates are reasonably frequent, so the polling request do actually return data, and realtime doesn’t really matter, then polling might be an acceptable solution. But it does mean notifications won’t be instant.

    Whether you should use a hosted service for the realtime infrastructure part of your app really depends on:

    1. If the realtime nature of the notifications matters, and you want to use WebSockets, then your best solution is to use a hosted service.
    2. The number of users you’ll have and the frequency of the updates need to be taken into account when looking at the costs you’ll incur. As I said earlier, this will impact how soon you need to add Heroku Dynos to your app. If you do some sums based on your app’s likely resource usage you may be able to get a rough idea if it would be more cost efficient to go with polling and pay for more Dynos or offload the realtime infrastructure to a hosted service.

    Since I work for Pusher I obviously believe that the benefits of offloading your realtime infrastructure to a WebSocket-focused service are high. The benefits of a strong community, good development tooling and docs should also be taken into account when weighing up pros and cons. If cost is a problem then I know Pusher support is a good place to get in touch and ask about potential discounts/deals.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a rails app that allows users to post, very similar to
I have a rails app that I enjoy developing on a sever much more
I have a DB in a Rails app I'm developing that had a product_type
I am developing a web app (using rails) that I will be launching within
I'm developing a Rails app and I've run into an issue that I can't
I'm developing a Rails app, and I was just talking with my colleague that
I am developing a web app in Rails that needs to perform computationally intensive
I'm currently developing a Rails app with 4 nested models (as per THIS POST
Im developing a Rails app that will contain a web front end as well
I'm developing a Rails 3 app locally on my Mac. I want to test

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.