Asynchronous Programming with ASP.NET - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Monday, June 20, 2011

Asynchronous Programming with ASP.NET

ave you ever tried using Async pages in asp.net? Did you ever explore it in respect of ASP.NET?

If No. This is the article for you. In this, I will be discussing, what is Async programming? what are the benefits? Async in respect of ASP.NET and its uses and lots more.

Async programming:

In a literal meaning, Asynchronous operation means that a process operates independently of other processes. If there are multiple operations, All that can be handled different processes/thread without waiting to complete the other ones. So here in coming sections, we will be discussing, how Asynchronous programming comes into the picture in ASP.NET.

Async Programming in ASP.NET:

Normally the kind of websites that we make are not scalable enough that could have been. These websites are very limited and confined. ASP.NET provides us a way to develop our websites more scalable.

Now lets discuss Async programming in respect of ASP.NET. We need to understand how ASP.NET processes the request. When ASP.NET receives a request from a Client, a thread is assigned to request from Thread pool that takes care all the request processing for the request. In normal cases, the thread is kept engaged till the request completes like this instantiates the page, runs the event handling code and returns the rendered HTML. If this request requires some long running process or wait for some I/O process then it takes. In the mean time if another request comes, the other free thread is assigned to the request. But thread pool has a limited number of threads and if requests continues pouring when all the thread were exhasted.ASP.NET is forced to deny further requests and User will start getting Server unavailable errors. Which you seriously does not want. Let's have a pictorial view.


Read More....

No comments:

Post a Comment