简体   繁体   中英

How can I handle many (more than 100) parallel HTTP-Requests with Silverlight running in a Browser?

I have to do 100 parallel HTTP Requests with my Silverlight application. Unfortunately the parallel connections are limited by the Browser.

If I start the Prozess I start all Requests parallel. The Browser seems to handle only about 10 connection parallel (sth. like max-connections). So all others are waiting. If the Browser receives a response, it handles the next WAITING request and so on.

My problem is that the last WAITING requests are never handled. Is there a timeout? If yes - can I control the timeout?

If I implement my own timeout timer, how can I start it (there seems to be a gap between Silverlight starts the request and the Browser handles the request).

Can I detect the "max-connections" of the Browser to partitionize the 100 requests in smaller chunks?

Now I DO NOT recommend this, but if you create multiple subdomain names for the same server/website and distribute load evenly, you can increase by 10 extra calls per server. IE. www1.domain.com, www2.domain.com etc. You often see this approach used on Bing and Google maps to load many tiles quickly. But as other people commented your approach is wrong from the get-go. Perhaps consider only calculating a row on demand (IE when,a user requests a specific row to get calculated). With the TPL async/await extension it would also be fairly easy to chunk it up in n/10 queues and process them one by one.

You can find info of max connections on this page : http://www.browserscope.org/?category=network

Check BrowserInformation to adapte chunk.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM