John Merlino
2011-Oct-16 00:13 UTC
Juggernaut plugin - push data to client without use of publish method?
Hey all,
Juggernaut is a plugin that provides realtime connection between your
servers and client browsers. You can literally push data to clients
using your web application.
The instructions say to instantiate the Juggernaut object and
subscribe to the channel:
jug = new Juggernaut({ "host": "dev.abcdef.com",
"port": 1740 });
jug.subscribe(get_info(report_id), function(data) {
});
function get_info(report_id){
return ''/reports/'' + report_id + ''/new'';
}
Now the instructions say in order to send the data to the client, use
Juggernaut.publish on the ruby end.
However, I currently look at application and the publish method is not
being used anywhere on the rails side. Yet it apparently is sending
data to the client. Is there another way to send data to the client
that I am overlooking?
thanks for response
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Nicolas Buduroi
2011-Oct-16 17:02 UTC
Re: Juggernaut plugin - push data to client without use of publish method?
Not sure which application you''re talking about, but if it''s the Holla sample application you must look at the JuggernautObserver class: https://github.com/maccman/holla/blob/original/app/observers/juggernaut_observer.rb I''ve been working on a project using Juggernaut for some time and although it''s not yet in production, Juggernaut have been really great. I highly recommend it! On Oct 15, 8:13 pm, John Merlino <stoici...-YDxpq3io04c@public.gmane.org> wrote:> Hey all, > > Juggernaut is a plugin that provides realtime connection between your > servers and client browsers. You can literally push data to clients > using your web application. > > The instructions say to instantiate the Juggernaut object and > subscribe to the channel: > > jug = new Juggernaut({ "host": "dev.abcdef.com", "port": 1740 }); > > jug.subscribe(get_info(report_id), function(data) { > > }); > > function get_info(report_id){ > return ''/reports/'' + report_id + ''/new''; > > } > > Now the instructions say in order to send the data to the client, use > Juggernaut.publish on the ruby end. > > However, I currently look at application and the publish method is not > being used anywhere on the rails side. Yet it apparently is sending > data to the client. Is there another way to send data to the client > that I am overlooking? > > thanks for response-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.