简体   繁体   中英

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

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?

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:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM