EzDevInfo.com

juggernaut

[DEPRECATED] Realtime server push with node.js, WebSockets and Comet

Rails - syncing - Faye, Juggernaut, Cool.io, plain old eventmachine

I have a need for syncing and have choice overload. It seems like the options available include: Faye, Juggernaut, Cool.io, plain old eventmachine

Any suggestions? What are the most popular, especially in the RoR community?

Thanks for any explanation around your suggestion.


Source: (StackOverflow)

How to implement server push in Flask framework?

I am trying to build a small site with the server push functionality on Flask micro-web framework, but I did not know if there is a framework to work with directly.

I used Juggernaut (http://flask.pocoo.org/snippets/80/), but it seems to be not working with redis (https://github.com/andymccurdy/redis-py) in current version and Juggernaut has been deprecated recently.

Does anyone has a suggestion with my case?


Source: (StackOverflow)

Advertisements

Juggernaut environment config

I'm trying to figure out how to run Juggernaut server in production – assuming that I would be able to configure different ports for the server in the development and production environment, because I can't control the port in my production environment. And also assuming that the server would be to start in "detached" mode?

Any advice much appreciated.


Source: (StackOverflow)

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?


Source: (StackOverflow)

I want to build a chat room using Rails, should I use juggernaut 2 or cramp?

Originally I planned to use Juggernaut, however, it is not compatible with Rails 3. And new Juggernaut 2 seems to be completely independent from Rails, which is not what I want. Then I found cramp, it looks quite neat, but is still under development. So I am just wondering which framework should I use? Or is there a better one? Thanks!


Source: (StackOverflow)

node.js and juggernaut pub/sub

I'm using express framework and juggernaut. I looked at many examples about juggernaut, all examples using this method(client side):

  var jug = new Juggernaut;
  jug.subscribe("channel_name", function(data){
    console.log("Got data: " + data);
  });

Is it secure? I don't think so, everybody can subscribe to a channel from javascript console. Is there a way to subscribe a channel from server side?


Source: (StackOverflow)

Server Side Timers with Juggernaut 2

I am writing a rails app with Juggernaut 2 for real-time push notifications and am not sure how to approach this problem. I have a number of users in a chat room and I would like to run a timer so that a push can go out to each browser in the chat room every 30 seconds. Juggernaut 2 is built on node.js, so I'm assuming I need to write this code there. I just have no idea where to start in terms of integrating this with Juggernaut 2.


Source: (StackOverflow)

Getting a chat app running on Heroku

I have a chat app on the heroku cedar stack based on juggernaut2 = https://github.com/maccman/juggernaut and I found out that the Cedar stack is currently built around the assumption that you'll use one language/framework per app. This causes my application to not run properly, since the juggernaut server can not be started as I would do locally (1. Start rails server: rails server thin 2. Start redis server: redis-server 3. Start juggernaut: juggernaut).

The way my app currently works it has juggernaut2 and the javascript chat application all in one heroku app so therefore it doesn't work properly.

I have pushed another app that is solely juggernaut2, and one app with the chat application. I am running Redis To Go on the chat application. But my question is how do I get these two different applications to communicate with each other?

It seems like maccman got this to work with his holla app = https://github.com/maccman/holla.


Source: (StackOverflow)

Juggernaut on a https website

I'm trying to use Juggernaut 2 on a website that uses HTTPS. I don't need Juggernaut itself to use https per se.

So, I'm trying to load the required application.js from Juggernaut's own webserver at port 8080 through http in the layout of my rails app.

That works fine.

Then I notice Juggernaut trying to read socket.io from port 8080 through https, and ofcourse failing since it's own webserver uses http and not https.

So I either need to make Juggernaut's own webserver at 8080 use https or I need to get juggernaut to load everything it needs from port 8080 through http.

I could ofcourse locate its application.js and hardcode http usage in there, but is there a better way to solve this ?


Source: (StackOverflow)

Node.js/NPM and Juggernaut Install on Windows 7

I've edited my original question after discovering perhaps the root of my problem (Juggernaut is not working in my Rails app, regardless of the Juggernaut gem and Redis-server working OK):

After looking at the Chrome's Javascript console, I've discovered that the error may be completely due to the failure to locate Juggernaut. It reports:

Uncaught ReferenceError: Juggernaut is not defined

This leads me to believe there is a problem with Node.js and Juggernaut. I have both, but when I try to install Juggernaut through NPM (npm install juggernaut -g) I get:

npm ERR! cb() never called

npm ERR!

npm not ok

But I noticed it did put Juggernaut into my C:\nodejs\ folder, under the sub-directory C:\nodejs\node_modules

So my main question, I believe is: how do you get NPM, Node.JS and Juggernaut to play nice on Windows?


Source: (StackOverflow)

Using Juggernaut can you subscribe to and publish wildcard Redis events?

In the same way Redis provides a PSUBSCRIBE interface for wildcard events, can you subscribe to wildcards from the client (browser) using Juggernaut? I'm looking for something like this:

From the client:

var jug = new Juggernaut();
jug.subscribe('event:'+event.id+':*', function(res) {
  console.log(res);
});

And then from the server:

Juggernaut.publish("event:#{event.id}:foshiz", data)

Source: (StackOverflow)

What is the alternative for Juggernaut in Rails 3.0.7?

I have learnt that Juggernaut is not supported on Rails 3.0.7.

Are there any other options around ?


Source: (StackOverflow)

Streaming, Daemons, Cronjobs, how do you use them? (in Ruby)

I've finally had a second to look into streaming, daemons, and cron tasks and all the neat gems built around them! But I'm not clear on how/when to use these things.

I have a few questions:

1) If I wanted to have a website that stayed constantly updated, realtime, with my Facebook friends' activity feeds, up-to-the-minute Amazon book reviews on my favorite books, and my Twitter feed, would I just create some custom streaming implementation using the Daemon gem, the ruby-yali gem for streaming the content, and the Whenever gem, which could say, check those sites every 3-10 seconds to see if content I'm looking for has changed? Is that how it would work? Or is it typically/preferably done differently?

2) Is (1) too processor intensive? Is there a better way you do it, a better way for live content streaming, given that the website you want realtime updates on doesn't have a streaming api? I'm thinking about just sending a request every few seconds in a separate small ruby app (with daemons and cronjobs), getting the json/xml result, using nokogiri to remove the stuff I don't need, and then just going through the small list of comments/books/posts/etc., building a feed of what's changed, and using Juggernaut or something to push those changes to some rails app. Would that work?

I guess it all boils down to the question:

How does real-time streaming of the latest content of some website work? How do YOU do it? ...so if someone is on my site, they can see in real time the new message or new book that just came out?

Looking forward to your answers, Lance


Source: (StackOverflow)

How to integrate Juggernaut chat server (Powered by ruby on rails) with iPhone/Android app for real time chat?

Preview:

I am using juggernaut chat server.I am having redis and juggernaut server running on machine. I am able to do chats within my local network on vaious web browsers. Everything is working smoothly. As juggernaut is a server driven chat server so i am quite sure about the scalability thing. Now here is the thing:--

Whats the problem:

I want to have a iphone native app too where user can login and chat with his friends. Now the thing i want to know is how do I push on iphone app, cause for juggernaut client registration a javascript code is needed. Something like this:

          var jug = new Juggernaut;
      jug.subscribe("channel1", function(data){
        alert(data);
      });

Basically how do i push new notifications to Iphone chat window. I don't know much about iphone as I am web developer. Still from google search etc I came to know some possible ( may be) ways:-

  • We can embed a url in iphone window. Is this a good approach?
  • Other thing we can do is using UrbanAirship kind of services we can do push notifications. Will push notification works for chat? I don't know about that even.
  • Third option can be polling. Iphone chat client keeps on hitting my rails app for new notifications. But i think this will be a very bad approach.

What are the other possible solutions?

Can any iPhone/Android developer guide me what should i do. I will eventually hire a Iphone developer to do all the coding part. But I want to have a big picture in my mind so that I can provide a complete docs of all the things, and have a clear picture how I want to discuss things with him before writing down the code.

PS: I am looking for a solution which works for android/nokia devices too. Cause later on I will be developing an application for that too. Basically it will be good to have a same solution. if not then compatibility factor should be there atleast.


Source: (StackOverflow)

Handling latency while synchronizing client-side timers using Juggernaut

I need to implement a draft application for a fantasy sports website. Each users will have 1m30 to choose a player on its team and if that time has elapsed it will be selected automatically. Our planned implementation will use Juggernaut to push the turn changes to each user participating in the draft. But I'm still not sure about how to handle latency.

The main issue here is if a user got a higher latency than the others, he will receive the turn changes a little bit later and his timer won't be synchronized. Say someone receive a turn change after choosing a player himself while on his side he think he still got 2 seconds left, how can we handle that case? Is it better to try to measure each user latency and adjust the client-side timer to minimize that issue? If so, how could we implement that?


Source: (StackOverflow)