Multiple thread WebServices Request's

Multiple thread WebServices Request's

  

Hi,

anyone know if it is possible to build a web page with multiple web block's making their own requests but all at the same time and not in sequence... something like calling a tread's but the result should go to page when it respond's... So the thread should notify the webblock...

I want to optimize a page showing information as quikly as possible.


Thanks.


Hi Ricardo,

I'm not sure of a perfect answer but if it was me I'd start by looking into using the AJAX functionality provided by the platform.

If you make the web block so that it loads a loading page as part of the Preperation you could then trigger an AJAX call on page load which actually does the web service requests behind the scenes and populates the data as it comes available?

I'm sure someone else might have a neat solution but personally that's where I'd start looking.

Cheers,
Richard
Ricardo -

If you *absolutely* need that, put a hidden button/link to the action to do the loading, and call it with jQuery on load.

J.Ja
Are you positive the delay lies in the the webblocks itself?

there are multiple issues which can slow the page rendering.
- html complexity
- javascript
- css/images (because you are using webblocks chances are you have multiple css-links)

Statler & Waldorf wrote:
Are you positive the delay lies in the the webblocks itself?

there are multiple issues which can slow the page rendering.
- html complexity
- javascript
- css/images (because you are using webblocks chances are you have multiple css-links)
 
 It's not a problem of page rendering.
 I have 4/5 webservices i need to call in a single page, because some of the request are so slow i don't want call them in sequence....  imagine this:

WebService 1 -> 5 seconds
WebService 2 -> 10 seconds
WebService 3 -> 3 seconds
WebService 4 -> 7 seconds

If i call them in sequence, my page load in 25 second's.  5+10+3+7
if i call them at the same time, my page load in 10 second's.

Ricardo -

I see what you are saying. I cannot think of a really good way to handle this off hand.

J.Ja
10seconds, wow.

anyhow, I don;t think you can solve it by standard OutSystems.
perhaps with jquery or old skool c#
http://stackoverflow.com/questions/1976073/recommendations-for-executing-net-httpwebrequests-in-parallel-in-asp-net