NetTalk Central

Author Topic: Broadcast message to all users  (Read 5304 times)

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Broadcast message to all users
« on: April 20, 2015, 12:53:59 AM »
Hi,

Is there a way to broadcast a message to all users that are logged in?
For instance a message that now i will kick you all out and update the program and restart.

:: rainer




Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Broadcast message to all users
« Reply #1 on: April 20, 2015, 07:35:13 AM »
Hi Ranier,

In a WebServer app?
No, you can't broadcast to all users because there are no connections to the users.

And they can't really "get out" because they're not really "in" the app to begin with.

cheers
Bruce

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: Broadcast message to all users
« Reply #2 on: April 20, 2015, 09:22:36 AM »
Hi Bruce,

Sorry, I was unclear.

I have people logged into the webserver app. (They are "in")
Sometimes I would like to tell them that soon I will close the application and replace the binary and restart the server app. A few seconds break but this will close their session and they will need to log in again. (They are "out")

It is not good user experience if you are for instance in browse and trying to update a record and suddenly you are "kicked out" with no explanation. The menu exist, some links seem to work but since you don't have a session nothing good happens because you should be logged in.

Does this make any sense?

:: rainer

lanmicro

  • Full Member
  • ***
  • Posts: 112
    • View Profile
    • Email
Re: Broadcast message to all users
« Reply #3 on: April 20, 2015, 01:30:19 PM »
Hi Rainer,

A web app is not like an app on your internal network.  People are not "in".  They connect to the server and are served a page which they look at.  While they are looking at the page the server doesn't know anything about them.  They can turn their machines off or navigate to a new page anywhere on the web and the server wouldn't know.

When you replace the binary people are going to lose their place.  Do it at a time that might affect the least number of people.
Gregory C. Bailey

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: Broadcast message to all users
« Reply #4 on: April 21, 2015, 02:50:28 AM »
Hi and thanks for your efforts to help me.

Yes, I am aware of the consept of being logged in or not. "When you replace the binary people are going to lose their place.  Do it at a time that might affect the least number of people"

That is my point. Sometimes i I want to replace the binary even if some users are logged in. They lose their their place, yes, their session is over, yes. But I want to make them aware that this will shortly happen (or that this has happened if they havent done anything during the time - my session timeout is thirty minutes).

So my question still is: is there a way to communicate with user that their session will be (brutally) aborted soon.
I remember there was discussion of a session timeout counter but can't find it anymore.

My plan is to set a global variable (time of shutdown) and let webhandler generate an alert or message when users make new requests. New logins can of course be blocked.

I usually make announcments a few days ahead that there will be an upcoming update at say ten o'clock in the evening but It would be nice to sometimes make a fixupdate ex tempore.

Any ideas are appreciated
Thanks

:: rainer

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Broadcast message to all users
« Reply #5 on: April 21, 2015, 03:05:52 AM »
>> A few seconds break but this will close their session and they will need to log in again. (They are "out")

If you dumped the session queue and sessiondata queue to disk (using say xFiles) on close, and re-loaded them on startup, then the users would not notice the exe restart. The whole process might mean the server is only offline for a few seconds.

Remind me on Thursday at the User Group and I'll walk through this process for you.

Cheers
Bruce

update. See Webinar #62, startig around the 0:02 mark.
http://www.capesoft.com/accessories/NetTalkUserGroup.htm
« Last Edit: April 24, 2015, 05:00:59 AM by Bruce »

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: Broadcast message to all users
« Reply #6 on: April 21, 2015, 03:33:46 AM »
Bruce, that would be soooo coool!

urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: Broadcast message to all users
« Reply #7 on: April 21, 2015, 05:19:48 AM »
That sounds great