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


About Cullen

My photo
Christian, Father, Software Developer/Architect who enjoys technology and using it to make people's lives easier!

Followers