andyman404
2010-Feb-23 22:41 UTC
Gem/Plugin for sending system alert message to logged-in users via AJAX?
Anyone know of a gem/plugin that lets you send alerts to currently logged in users of a Rails app via AJAX? For example, I want to send an alert like "The system will be going down in 5 minutes for a quick upgrade. Please save your work now and log off." I''m working on an AJAX-heavy Rails app in which the user doesn''t reload the entire page much, so just the standard rails flash messages and warnings wouldn''t be too useful. Perhaps the client side would use AJAX to poll the server for these global system alerts. It''s no big task to write my own code for this, but this seems like such a commonly needed feature that I''m wondering if there is already a gem/plugin for it? Or is there another way that is commonly used to send a global system message to users? -- 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.
Peter De Berdt
2010-Feb-24 09:20 UTC
Re: Gem/Plugin for sending system alert message to logged-in users via AJAX?
On 23 Feb 2010, at 23:41, andyman404 wrote:> Anyone know of a gem/plugin that lets you send alerts to currently > logged in users of a Rails app via AJAX? > > For example, I want to send an alert like "The system will be going > down in 5 minutes for a quick upgrade. Please save your work now and > log off." > > I''m working on an AJAX-heavy Rails app in which the user doesn''t > reload the entire page much, so just the standard rails flash messages > and warnings wouldn''t be too useful. Perhaps the client side would use > AJAX to poll the server for these global system alerts. > > It''s no big task to write my own code for this, but this seems like > such a commonly needed feature that I''m wondering if there is already > a gem/plugin for it? Or is there another way that is commonly used to > send a global system message to users?You would be better off running a push server instead if you will be using alerts on a very regular basis. There''s a few options you can consider: http://blog.jcoglan.com/2010/02/02/faye-a-comet-client-and-server-for-node-js-and-rack/ http://juggernaut.rubyforge.org/ Best regards Peter De Berdt -- 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.