1. Stuart Macandrew
  2. PowerBuilder
  3. Tuesday, 13 August 2019 01:51 AM UTC

We have an application that is executing web-service functions on an external web-service host. Each invocation of these functions can be slow to respond - they can take 5 to 30 seconds.

What we observe for our calling Powerbuilder application, is that while the application is executing the web-service proxy function stub synchronously then the application's processor (whatever CPU our application is being executed on) runs with 100% utilization. If the invocation runs for more than 5 seconds, then Windows starts marking our window as hung by appending the text "(Not Responding)" to the title - presumably because our application stops processing messages for longer than Window's internal threshold permits.

Once the web-service call completes our application returns back to a normal state.

Our application is Citrix hosted, and while our application has not had applications windows reported as not-responding on Windows-Server 2003 this does occur on Windows-Server 2012. My assumption is the Windows algorithm that detects hung applications has been tweaked over time.

So firstly - is the high CPU utilization that we observe the "normal" expected Powerbuilder behavior when calling a web-service?

And secondly if this is normal behavior, what is the suggested way of re-factoring so that long-running web-service calls can be made without Windows reporting that our application has hung?

Our current Powerbuilder version is 2017R3 Build 1880.

TYIA.

 

René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 13 August 2019 05:26 AM UTC
  2. PowerBuilder
  3. # 1

Hi Stuart,

I use SharedObjects to call such long running requests. They are running in a separate thread so the main tread is still responding. But it needs a little more effort to use SharedObjects.

Be careful with threads! Not all Powerbuilder functionality is thread-safe! And there is no documentation about what is thread-safe and what not. So I don't know if the new HTTPClient object is or is not.

I use MicroSofts XML-ActiveX Controls. Use the "MSXML2.ServerXMLHTTP" object which is thread-safe.

For more information about using SharedObjects you can google for "PowerBuilder multithreading".

 

 

Maybe another and easier way (I not tested it) is Powerbuilders Inet object. It returns the data asynchronously.

 

HTH,

René

Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 13 August 2019 08:23 AM UTC
Please note that Inet object is not supported. HTTPClient object is the replacement.
  1. Helpful
  1. René Ullrich
  2. Tuesday, 13 August 2019 08:28 AM UTC
Hi Armeen,

there is no information about deprecation of Inet object in the documentation!?
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.