Juggernaut/Faye vs. Pusher for a Heroku hosted web service?
Asked Answered
F

2

12

If I understand correctly, Juggernaut is built on top of socket.io, and Faye competes with Juggernaut layer and socket.io layer combined. Recently Ryan Bates came up with a Faye wrapper called PrivatePub which makes it very easy to run Faye.

But I already have a rails app that runs on Heroku, and all I want to do is build a simple chat feature on top of it.

While researching I found lots of people use Pusher. It seems like pusher is well supported on Heroku so I'm thinking about using Pusher.

Before I jump on, I just wanted to make sure I understand things correctly. Is Pusher like a Heroku for push requests? My option is to either host everything on Heroku (including Juggernaut or Faye module), or just host the static part of the site on Heroku and delegate push notification handling to pusher.

From what I know, this feels like a more efficient approach since: 1. If I use pusher, I don't have to jump through all the hoops in order to run juggernaut/faye modules on Heroku. 2. The realtime traffic will be delegated to Pusher, which means I won't waste my Heroku server's resource.

Now I'm just a beginner and may be wrong about lots of things, but please enlighten me. Are the two factors above correct? And is my understanding of Juggernaut/Faye/Pusher correct?

Forlini answered 4/2, 2012 at 10:0 Comment(0)
C
11

Thank you for asking about Faye/Socket.IO/Juggernaut/Pusher on Heroku. I will do my best to answer your questions. So you already have an App on Rails running on Heroku. And you need to learn more about which path to take for adding real-time updates via an always-on connection. All options you listed will work for this. Faye/Juggernaut will take a bit time to setup, yet provide same end-results. And Pusher is like it's own Heroku, separate from Heroku, and is readily simple to add to your app.

Your questions & answers:

  1. Is Pusher like a Heroku for push requests?: Yes. Pusher is a separate service which has a separate pricing model, decoupled from your main Heroku bill. (though Heroku + Pusher are combined into a single monthly statement)
  2. The real-time traffic will delegate to Pusher and not waste your Heroku Resources: Yes.
  3. Are the two factors above correct?: Yes.
  4. And is my understanding of Juggernaut/Faye/Pusher correct?: Yes.

If you want to learn more about Faye, Ryan Bates and Real-time here are some links:

Cruel answered 4/2, 2012 at 20:33 Comment(0)
P
0

You can run juggernaut node.js server on heroku. You might need to share a redis database between your original heroku application, and the juggernaut application, if you are using the juggernaut gem.

Profundity answered 13/7, 2012 at 2:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.