I want to broadcast a message to all clients instantly. For example, I will send an urgent message and all clients will see this message on their screens instanly. I don't want to use a timer to do that. I think I need a method to invoke a procedure at the client side on demand of the server or another client.
You are either going to have to solve this one outside of ABL or accept that the client needs to be blocked for input for you to do anything to it. Even then, you aren't actually going to be able to "push" the action onto the client, but rather will have to have the client poll for the action. Sorry, but that's just the way it works with a single threaded session. See http://www.oehive.org/MultiThread
SonicMQ is the way to go. But that's another product and another runtime license.
Even if Sonic were free, the session still has to be ready to accept the message. The only way he is going to get a message to pop up without waiting for the ABL processing to cycle through to a point where it is ready to receive ... potentially a long time if the client is processing a long report ... is via an external application or a second session. Yeah, Sonic is the way to send messages around reliably ... now if they would only price it so that it was usable for small installations.
thx for your quick answers. I'm new to progress and it is hard for me to believe that it does not have server to client messaging without client's demand. It seemed so right since it has client and server.
Anyway, it seems I will implement a vb client-server model by making an ocx. I hope that works.
There are lots of ways to get the job done, just not quite the way you described it. Mike is right that Sonic is a great solution here, but if one of the clients is busy running a long report, the message won't get acted upon until the client finishes the report and goes to look for messages again. Sonic will provide reliable messaging that you won't get with a lesser solution. Many of us for years have also built in messaging using the database and simply polling periodically to see if there is something new.
Be careful with that Active X Control (I guess that's what you mean with an ocx).
1.) As Thomas mentioned earlier, the prowin32.exe is single threaded. So once the client is busy, the Active X Control will not be able to receive that message (from where ever) and it won't be able to throw an event or display the message.
2.) Progress has a Timer Active X Control, that can throw an event every x seconds. They had problems for a long time with crashing client sessions when the timer "ticket" during a DB query. You might run into the same issues with your own control as well.
But all the hassle depends on how often and how long your clients are actually busy. I know many applications where that is only very rarely the case.