How To Use Multiple Concurrent HTTP Request

How To Use Multiple Concurrent HTTP Request

  

We are using outsystems which is  based on the .NET and  deployed on the Windows Server.


we have a dashboard to view all the information about a car information in a web page. the data  comes from 10 different places; when the page is loading , we will send 10 https requests to the IIS Server.

But we found that these 10 requests will be queued in the IIS Server,  which is caused by the outsystems http request queue. 

if we have a request, which will execute around 10s in the server, then, a bad thing happens,  those 10 reqeusts will be delay to wait the slowness request.

in that case, our web page will not be loaded completely untile all the requests are loaded.


Does any one know how to avoid this issue or how to resolve this issue?


 

This is one of the reasons I created my timer component (available in the forge, or just create your own javascriot timer event). By creating a timer to kick off each load after the initial page load and make a webblock visible via an ajax refresh you can get the browser to effectively initiate multiple concurrent connections and bypass the Outsystems Synchronous loading. Takes a little fiddling to get right but works.

I think there is also some lazy load forge components but I had trouble getting them working correctly.

John Williams wrote:

This is one of the reasons I created my timer component (available in the forge, or just create your own javascriot timer event). By creating a timer to kick off each load after the initial page load and make a webblock visible via an ajax refresh you can get the browser to effectively initiate multiple concurrent connections and bypass the Outsystems Synchronous loading. Takes a little fiddling to get right but works.

Hi John,

thanks for your suggestion, but we have to display all the information in limited seconds. if we use a delay trick to load around 10 or more different data, it will be very slow. 


actually, we discussed with our users, they can only view 3-4 blocks data in the first glance, if they want to see more just click the display button to load different data, but, they did not agree that.


we also tried to use the ajax request, avoid to use outsystems session or some other tricks.

but they also do not work correctly.



I just use a delay of about 100ms. Basically just enough for the main page to load without the extra content. 

You could also use javascript in to launch the requests for the additional pages on page load complete, I just found the timer to be simpler.

John Williams wrote:

You could also use javascript in to launch the requests for the additional pages on page load complete, I just found the timer to be simpler.

saw your timer tool,  pity, we use the outsystems 8,  : (

initially, we use this way to load our page. some APIs give a slow reponse. still not work well.

The tool is just a simple wrapper around the javascript timer and using the evens component to make callback into an action easier. You could still do it simple by putting a number of blank iframes on your page and then just do a javascript timer to set the source of the frames after 100ms. That should work on OS 8

We did it this way originally before I decided to wrap it all up in a component for easier reuse.