Wednesday 15 May 2013

c# - Synchronous and parallel web requests, both receives B bytes per second -


Given the bunch of synchronous web requests, executed sequentially - N It will take seconds to request web request, and receive B bytes per second, although exact, but using asynchronous web requests, which makes it possible to execute all web requests in parallel - it is now N will not take seconds, although it will still receive B Bytes Per Second

Runs a simple test along with 12 web requests - using both synchronous and parallel methods, confirm that they are both B bytes per second ( using the Resource Monitor / code>).

So my question is .... The approach that executes web requests in parallel should not get more than B bytes per second, so that it can be faster for synchronous approaches From? Otherwise the synchronous approach will last for a long time, and will receive more bytes than the parallel approach (fully).

These requests are not processed on your machine (unless connected to a local host) . This means that in order to fully process each request, your machine will have to wait for the response.

Consider sending invitation for your birthday party to friend # 1, and after receiving a response, send one to friend # 2, etc. It is fast to send invitations to all friends And then wait for them to answer, especially if the friend # 1 is on vacation.

I do not know why the number of bytes per second is the same, probably limits some node speeds in the network, but the parallel approach can be minimized by sending each request and total wait time "parallel ".

I can not understand how the synchronicity can affect the total number of received bytes. You are talking about bytes / second, but not the number of seconds spent at that transfer speed.

No comments:

Post a Comment