473,320 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MSKB article on scalability of ADO/ASP

An MSKB article on the scalability of ADO/ASP
(http://support.microsoft.com/kb/176056/EN-US/) says in a discussion of
why connection objects shouldn't be stored in session variables, "If
you do not pool there will be idle connections wasting server and
network resources. You also have some threading issues that can occur
if multiple concurrent threads end up hitting on the same connection
(though the session ID might save you here, but it is conceivable that
a browser could submit two concurrent requests using the same session
ID and you could get into situation with transactions or with SQL
Server's inability to process more than one command at a time on a
given connection)."

What are the potential threading issues here? (Are there threading
issues even when connection objects are created on each page?) I
thought that even with connection pooling, each connection is only
being used by one user at a time. (And what does this have to do with
Session ID?)

Brian

Sep 28 '06 #1
3 1567

"Brian" <br**********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
An MSKB article on the scalability of ADO/ASP
(http://support.microsoft.com/kb/176056/EN-US/) says in a discussion of
why connection objects shouldn't be stored in session variables, "If
you do not pool there will be idle connections wasting server and
network resources. You also have some threading issues that can occur
if multiple concurrent threads end up hitting on the same connection
(though the session ID might save you here, but it is conceivable that
a browser could submit two concurrent requests using the same session
ID and you could get into situation with transactions or with SQL
Server's inability to process more than one command at a time on a
given connection)."
First off I need to point out that the article is wrong in suggesting that
two concurrent requests may be in progress for the same session ID. Since
the ASP session object is single threaded two ASP requests for the same
session can not be processed at the same time.
What are the potential threading issues here?
The main issue when you store a reference to any object in the session is
that you affiliate the session with the current thread. From that point on
only this thread can service requests for the session. If you have for
example 500 clients each having a session to thread affiliation you can
start to see requests queuing up whilst worker threads are free. This will
be because the requests waiting for execution can only be serviced by a
specific thread rather than by just any currently idle one. Therefore
scalabiltiy and throughput can be seriously hampered.
>(Are there threading
issues even when connection objects are created on each page?)
No ADO connection objects as you see them in the ASP code are not pooled
internaly there are other structures which are pooled and these can cross
threads to there are no threading issues here.
I thought that even with connection pooling, each connection is only
being used by one user at a time.
In this scenario a connection is removed from the pool and given to a single
thread ADO connection object for it's exclusive use when the ADO connection
is opened. When the ADO connection object is closed the actual connection
is returned to the pool.
(And what does this have to do with Session ID?)
See above, that article seems a little confused about the role of session in
all of this.

Anthony.
Sep 28 '06 #2
Thanks for your help, Anthony. More generally, what sorts of threading
issues do I have to be concerned about when coding in ASP? Could
threading issues ever cause the page to execute incorrectly, or are the
issues always related to the performance of the page?

Brian

Anthony Jones wrote:
"Brian" <br**********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
An MSKB article on the scalability of ADO/ASP
(http://support.microsoft.com/kb/176056/EN-US/) says in a discussion of
why connection objects shouldn't be stored in session variables, "If
you do not pool there will be idle connections wasting server and
network resources. You also have some threading issues that can occur
if multiple concurrent threads end up hitting on the same connection
(though the session ID might save you here, but it is conceivable that
a browser could submit two concurrent requests using the same session
ID and you could get into situation with transactions or with SQL
Server's inability to process more than one command at a time on a
given connection)."

First off I need to point out that the article is wrong in suggesting that
two concurrent requests may be in progress for the same session ID. Since
the ASP session object is single threaded two ASP requests for the same
session can not be processed at the same time.
What are the potential threading issues here?

The main issue when you store a reference to any object in the session is
that you affiliate the session with the current thread. From that point on
only this thread can service requests for the session. If you have for
example 500 clients each having a session to thread affiliation you can
start to see requests queuing up whilst worker threads are free. This will
be because the requests waiting for execution can only be serviced by a
specific thread rather than by just any currently idle one. Therefore
scalabiltiy and throughput can be seriously hampered.
(Are there threading
issues even when connection objects are created on each page?)

No ADO connection objects as you see them in the ASP code are not pooled
internaly there are other structures which are pooled and these can cross
threads to there are no threading issues here.
I thought that even with connection pooling, each connection is only
being used by one user at a time.

In this scenario a connection is removed from the pool and given to a single
thread ADO connection object for it's exclusive use when the ADO connection
is opened. When the ADO connection object is closed the actual connection
is returned to the pool.
(And what does this have to do with Session ID?)

See above, that article seems a little confused about the role of session in
all of this.

Anthony.
Sep 29 '06 #3

"Brian" <br**********@gmail.comwrote in message
news:11*********************@c28g2000cwb.googlegro ups.com...
Thanks for your help, Anthony. More generally, what sorts of threading
issues do I have to be concerned about when coding in ASP?
That's a broad question. If we limit the scope to general ASP script and
common components such as ADO and XML then there are no issues to speak of.
This presumes you already know not to assign references STA objects
(anything that doesn't explicitly state it is FreeThreaded) in the Session
object or the Application object.
>Could
threading issues ever cause the page to execute incorrectly, or are the
issues always related to the performance of the page?
Not unless you are writing your own COM components that do unusual things
with threads or are using badly written third party components.

>
Brian

Anthony Jones wrote:
"Brian" <br**********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
An MSKB article on the scalability of ADO/ASP
(http://support.microsoft.com/kb/176056/EN-US/) says in a discussion
of
why connection objects shouldn't be stored in session variables, "If
you do not pool there will be idle connections wasting server and
network resources. You also have some threading issues that can occur
if multiple concurrent threads end up hitting on the same connection
(though the session ID might save you here, but it is conceivable that
a browser could submit two concurrent requests using the same session
ID and you could get into situation with transactions or with SQL
Server's inability to process more than one command at a time on a
given connection)."
>
First off I need to point out that the article is wrong in suggesting
that
two concurrent requests may be in progress for the same session ID.
Since
the ASP session object is single threaded two ASP requests for the same
session can not be processed at the same time.
What are the potential threading issues here?
The main issue when you store a reference to any object in the session
is
that you affiliate the session with the current thread. From that point
on
only this thread can service requests for the session. If you have for
example 500 clients each having a session to thread affiliation you can
start to see requests queuing up whilst worker threads are free. This
will
be because the requests waiting for execution can only be serviced by a
specific thread rather than by just any currently idle one. Therefore
scalabiltiy and throughput can be seriously hampered.
>(Are there threading
issues even when connection objects are created on each page?)
No ADO connection objects as you see them in the ASP code are not pooled
internaly there are other structures which are pooled and these can
cross
threads to there are no threading issues here.
I thought that even with connection pooling, each connection is only
being used by one user at a time.
In this scenario a connection is removed from the pool and given to a
single
thread ADO connection object for it's exclusive use when the ADO
connection
is opened. When the ADO connection object is closed the actual
connection
is returned to the pool.
(And what does this have to do with Session ID?)
See above, that article seems a little confused about the role of
session in
all of this.

Anthony.

Sep 29 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Wenning Qiu | last post by:
I am researching issues related to emdedding Python in C++ for a project. My project will be running on an SMP box and requires scalability. However, my test shows that Python threading has very...
3
by: Arpan | last post by:
What does the term "scalability of an application" mean? Thanks, Arpan
5
by: Brian M | last post by:
Windows 2000 Server running IIS. I followed the instructions in this article, building the COM+ component and registering it, and creating the two asp files - Upload.asp and Postfile.asp. The...
0
by: Khaled D Elmeleegy | last post by:
--=_alternative 004FC1E080256D75_= Content-Type: text/plain; charset="us-ascii" I am studying the scalability of MYSQL on SMPs on Linux. I am wondering if any one has performed scalability...
2
by: rlm | last post by:
I know, solely as a matter of fact, that a web based application written in (100%) VBScript/JavaScript & embedded SQL will not scale. However, I can only conjecture as to the reasons why. We have...
0
by: tharma | last post by:
I was wondering if some one provides some information about scalability and performance of ASP vs JSP. Scalability of JSP vs. ASP (which one is better?) Performance of JSP vs. ASP (which has...
3
by: David | last post by:
I found and interesting article, "Experiences of Using PHP in Large Websites" (http://www.ukuug.org/events/linux2002/papers/html/php/) , which lists some issues with scaling PHP for larger...
8
by: Duffey, Kevin | last post by:
We are looking for information regarding any capabilities of PostgreSQL in regards to scalability. Ideally we want to be able to scale in both directions. What sort of solutions are out there for...
9
by: Tim Mitchell | last post by:
Hi All, I work on a desktop application that has been developed using python and GTK (see www.leapfrog3d.com). We have around 150k lines of python code (and 200k+ lines of C). We also have a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.