Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 933
Vlad Avatar asked Feb 04 '12 10:02

Vlad


1 Answers

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:

  • Run Faye directly on Heroku: https://github.com/ntenisOT/Faye-Heroku-Cedar-RedisToGo
  • VIDEO: Faye Private Pub by Ryan Bates: http://railscasts.com/episodes/316-private-pub
  • GITHUB: https://github.com/ryanb/private_pub
like image 93
Stephen Blum Avatar answered Nov 01 '22 16:11

Stephen Blum