Asynchronous Versus Synchronous

Web Services can be designed to be synchronous or asynchronous:

■ A synchronous design allows the ASP.NET thread of execution to run until it's complete. If an action within the code has the potential to block, such as network I/O or an extensive database lookup, this can stall the ASP.NET worker thread. Since a thread is a resource, and there are only a limited number of resources available on the system, this can force other requests to be queued. This all translates to an impact on the performance and scalability of the system.

■ An asynchronous design, on the other hand, allows the ASP.NET thread of execution to start up another thread, which can call back onto an ASP.NET thread when the work is complete. That way, the ASP.NET application is not stalled because of resource constraints on available threads.

0 0

Post a comment