Concurrency problem

G

Guest

I have a big asp.net app that does many functions, some do alot of database
cross searching, some that does upload/download from database.
When two users use the application, sometimes, if one of these "big"
functions are called, the second user will be able to move around some more
with the smaller functions, but will reach a point when that user has to wait
for the "big" function to finish first. Other times, when one big function
is ran, the other user is automatically put to wait right away.

I need to know what determines when a user is put to wait. Is there a way
to make both user do things without having blocking the other user?
Shouldn't the application be already running on threads when the two user
uses the application? If so, what made them block? I'm using Access as the
database, but I know Access can handle multiple people editing it.
Thanx
 
K

Karl Seguin

first, Access isn't meant for certain types of usage:
http://support.microsoft.com/default.aspx?scid=kb;en-us;299973
"The Access ODBC Driver and Microsoft OLE DB Provider for Microsoft Jet are
not intended to be used with high-stress, high-concurrency, 24x7 server
applications, such as web, commerce, transactional, messaging servers, and
so on."

Nevertheless, I agree with you that under low-stress situations, it should
be able to handle concurrency. However, from your description, it seems as
though some of what you are doing is high-stress, as you describe some
functions as "big".

To answer your question, you'd need to figure out what's blocking. Each
user will be running on their own thread ( a thread per request). Perhaps
you are getting high CPU usage, if some of your process' pin the CPU @ 100%,
it'll lock all other threads.

If the problem is access, and you aren't willing to consider alternatives
(maybe it's a business constraint), check out:
http://www.softcoded.com/web_design/upgrading_access.php

Karl
 
N

neilphan

Jason,

ACCESS is not a real database....For access, only 1 user can
insert/update (database locking) even though several users may want to
insert/update different tables.

User waiting list is based on a FIFO(First In, First Out). If user A
came in first, user B will be put on a wait list until user A finished
his insert/update functions, and his CONNECTION is closed or he has
timed out.

If User A and User B just want to query (read only from the database)
then its fine....they can do it simutaniously....

In otherwords, ACCESS sucks.....its not supposed to be used as a
multi-user database.

My 2 Cents,
neil
 
K

Keith Patrick

You may want to look into Page.Async. Basically, 2.0 builds in better
asynchronous operation support such that at least your request threads can
still respond to other users while the app waits for the DB (although
ditching Access would help a lot);
 
G

Guest

I took a look at the async stuff, pretty neat, but I've search far and wide
and haven't found a simple enough example to start me off.
from the looks of it, it looks like I'm going to use the PageAsyncTask way
to do async.
BUT from all the examples I've looked at, none of them refers to how do you
actually write the "begin" method that returns the IASyncResult, they all
assumed it's made SOMEHOW....
and I'm talking about the ie SqlCommand.BeginExecuteReader(...)
My method that takes a long time to execute isn't a webservice, nor a
SqlCommand method, it's just a custom method that takes a long time to
process.

How do I turn my method that take a long time, into one of those begin
method taht takes the callback and state parameter??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top