Running a short-lived background task from MVC

I am coding an ASP.NET MVC 3 app. When a user logs in I need to check a remote system and get the latest data for that user from the system. This task will take approx 15 seconds.

The user should be able to enter my app straight after their login (not have to wait for 15s for the remote call!). When the remote call completes the users local information will be updated.

I was thinking of using a thread to do this, creating it after they have logged in and letting it run its course. However, after reading around, I am concerned about recycling etc when working with threads in MVC. I would use an async controller, but I dont need to feedback to the user the state of this background process. Am I right to be concerned about threads, even if they are short-lived?

Answers


"...concerned about recycling..."

"...don't need to feedback to the user the state..."

"...short-lived..."

3 reasons why you should be using ThreadPool.QueueUserWorkItem.


Need Your Help

Is there a way to name proc rank groups based on values within the group?

sas rank proc

So I have multiple continuous variables that I have used proc rank to divide into 10 groups, ie for each observation there is now a "GPA" and a "GRP_GPA" value, ditto for Hmwrk_Hrs and GRP_Hmwrk_Hr...

JQuery in AngularJS directives

angularjs angularjs-directive

Is it a good idea to use jquery in angularjs directive to interact with dom elements?Thanks.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.