473,795 Members | 3,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1586

"Brian" <br**********@g mail.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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**********@g mail.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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**********@g mail.comwrote in message
news:11******** *************@c 28g2000cwb.goog legroups.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**********@g mail.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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
4499
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 poor performance in terms of scaling. In fact it doesn't scale at all. I wrote a simple test program to complete given number of iterations of a simple loop. The total number of iterations can be divided evenly among a number of threads. My...
3
1916
by: Arpan | last post by:
What does the term "scalability of an application" mean? Thanks, Arpan
5
1503
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 problem is that as soon as I submit the Upload form on the Postfile.asp page, I immediately get an "Out of Memory" error from the server. Amazingly though, the file gets uploaded intact. Does anyone have experience using this method or have any ideas as...
0
1582
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 studies. If so, I would be interested in a pointer to the results; if not, I am curious if there is interest in MYSQL's scalability. Pointers to benchmarks used to study MYSQL would also
2
1614
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 been tasked with writing a report about the limitations of an application. What is a good resource for describing the technical details regarding the "un-scalability" of a VBScript/Javascript application. The environment is IIS 5.0 on a Win 2K...
0
1162
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 better performance?) I have been looking for graphs, and charts that compare JSP vs. ASP (scalability and performance) but I couldn't find any. If anyone knows any link which has scalability of performance graph of ASP vs. JSP,
3
1509
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 projects. Worth a read although it appears to be three years old. The major issue I have had with PHP is a conflict in class names for modules created by two project teams. We resolved this by prefixing all class names with a module ID, ex....
8
4376
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 either or both directions of scalability? Specifically, open-source solutions would be most in need, but commercial applications are fine as well. Thank you. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system...
9
1927
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 new project manager with a C# background who has deep concerns about the scalability of python as our code base continues to grow and we are looking at introducing more products. I am looking for examples of other people like us (who write...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10437
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.