Gateway Messages Pushed to Open Clients

I was thinking it would be nice to be able to push notification messages to open clients, like if a gateway restart was scheduled or was needed for updating or something you could push a message down to the clients letting them know that the gateway will be restarted, perhaps with a configurable message and countdown timer or something that will sit in the lower right hand corner. Kind of like windows notification messages from the task bar or like the current project update banner that appears at the top when a new version is available.

Hi Doug,

We have implemented this functionality ourselves as follows:

A client timer script runs every minute. This runs a script which finds out when a user last viewed messages (saved in a new field in the user table), then searches for any current messages they have not seen yet in a new messages table. If there are any, the script automatically pops a modal message dialog on-screen. This allows the user to page through any outstanding messages. When they close the dialog, the time they last viewed messages is updated in the database.

By checking when the user last viewed messages, you can be sure every user will see any outstanding messages when they next log in. Messages also have an expiry time, so users are not warned of events that have already occurred.

An administrator interface allows admins to enter messages, when they want them to start displaying and when they should expire. If they wish, a user can also review current system messages they have already seen with a menu option.

Hmmm… interesting… I would have to change from internal authentication to database authentication but that sounds like it could work.

You don’t happen to have an example message window I could look at do you? :wink:

I’ve posted all the code you should need to implement system messages on the forum here, in the User Submitted Content section.

Hopefully this will be helpful in letting you set up something that works for you.

After some modification I was able to implement your message system and it works great! Much appreciated, cheers! :thumb_right: