Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 8th, 2006, 9:51 AM   #1
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
Async Callbacks and long running queries

I am working on an asp.net web application made up of a lot of statistical tools. Most of these tools involve executing queries that take 20 - 30 seconds, some maybe more, to finish. I found this microsoft site that suggests async calls and a polling mechanism. This seems like the way to go. Im curious about what you guys think. Basically I would like to let the user know whats going on and not block the request thread, but I'm not sure if this is the best way to approach it. A couple hundred thousand rows can be returned at any given time, which seems to be a lot of data to be storing in the data store like that. Let me know how you handle situations like this or your opinions on async call backs.
hoffmandirt is offline   Reply With Quote
Old Feb 8th, 2006, 10:46 AM   #2
MBirchmeier
Hobbyist Programmer
 
Join Date: Oct 2005
Posts: 211
Rep Power: 3 MBirchmeier is on a distinguished road
Quote:
Originally Posted by hoffmandirt
I am working on an asp.net web application made up of a lot of statistical tools. Most of these tools involve executing queries that take 20 - 30 seconds, some maybe more, to finish. I found this microsoft site that suggests async calls and a polling mechanism. This seems like the way to go. Im curious about what you guys think. Basically I would like to let the user know whats going on and not block the request thread, but I'm not sure if this is the best way to approach it. A couple hundred thousand rows can be returned at any given time, which seems to be a lot of data to be storing in the data store like that. Let me know how you handle situations like this or your opinions on async call backs.
It's how we're handling things on our embedded environment with C#.NET. The big thing to watch out for is that .NET controls aren't threadsafe, so if you look into anything asynchronous read up the Control.Invoke() method. Often thread safe issues with controls are a bit hard to find and dignose.

In an ASP environment using the controls in a threaded manner probablly isn't as crucial, because the majority of your work goes on in a single serverside thread, while the client has the polling mechanism to check on the status.

If I was unclear and rambling my recommendation is yes to implement something such as that. If something takes much more than 10 or 15 seconds without an update your users will get antsy and hit refresh, or leave. A message will hopefully minimize that.

-MBirchmeier
MBirchmeier is offline   Reply With Quote
Old Feb 8th, 2006, 10:52 AM   #3
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
That's clear, thanks. Also here is the website I was referring to if anyone is interested.

http://msdn.microsoft.com/library/de...nethowto08.asp

Im interested in hear what more people think so keep them commin.

Thanks
hoffmandirt is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:30 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC