# Gem/Plugin for sending system alert message to logged-in users via AJAX?

**URL:** <https://www.ruby-forum.com/t/gem-plugin-for-sending-system-alert-message-to-logged-in-users-via-ajax/184047>\
**Category:** Rails\
**Created:** [February 24, 2010, 9:07am UTC](https://www.ruby-forum.com/t/gem-plugin-for-sending-system-alert-message-to-logged-in-users-via-ajax/184047 "2010-02-24T09:07:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyman404](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/57b2e6/32.png) [@andyman404](https://www.ruby-forum.com/u/andyman404)\
**Post date:** [February 24, 2010, 9:07am UTC](https://www.ruby-forum.com/t/gem-plugin-for-sending-system-alert-message-to-logged-in-users-via-ajax/184047/1 "2010-02-24T09:07:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![andyman404](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/57b2e6/32.png) [@andyman404](https://www.ruby-forum.com/u/andyman404)\
**Post date:** [February 24, 2010, 10:23am UTC](https://www.ruby-forum.com/t/gem-plugin-for-sending-system-alert-message-to-logged-in-users-via-ajax/184047/2 "2010-02-24T10:23:16Z")

</div>

On 23 Feb 2010, at 23:41, andyman404 wrote:

> 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://blog.jcoglan.com/2010/02/02/faye-a-comet-client-and-server-for-node-js-and-rack/)  
[http://juggernaut.rubyforge.org/](http://juggernaut.rubyforge.org/)

Best regards

Peter De Berdt
