profile for Cullen Tsering at Stack Overflow, Q&A for professional and enthusiast programmers

Tuesday, August 31, 2010

When to use and when not use Asynchronous actions

Mvc 2 has a really cool feature: asynchronous actions.  You can implement actions so it can be called asynchronously and your route is the same as synchronous call when making the request.  Just read and article on msdn when to use asynchronous actions and when not to:

  • When to use

    • the operations in the actions are network-bound or I/O bound
    • Parallelism is more important than simplicity of code
    • You want to provide a mechanism to allow users to cancel long-running request

  • When not to use

    • operations a CPU bound
    • operations are simple and short-running


0 comments:

Post a Comment

About Cullen

Cullen has been coding since 1991. He has been a Sr. Software Engineer/Architect for 11 years and counting. He enjoys coding for work as well as for fun. He loves learning from anyone and delights in sharing the little knowledge he possesses.

Followers