Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do I need COM+ if more users will access my ASP.NET app?

Status
Not open for further replies.

mb22

Programmer
Sep 4, 2002
258
US
I have my up in production running fine for about 2 weeks now. I have about 30 concurrent users now. That will increase to about 500 soon at first... and perhaps up to a limit of about 5000 - 10000 concurrent users.

In my app I have several classes ... about 3 business logic classes and about 10 other data access classes within the APP itself.

I have not used COM+ before though I read on it a few times. I know I could have compiled my classes separately into a .NET assembly or DLL (or component) and referenced it from ASP.NET but I chose not to for speed of development!
(did that in VB6 previously)

Now I made sure that I close all my connections religiously each time I open one ..... and actually I only used datareaders and stored procedures for speed .. which has worked great so far.

I have a huge 70Gig server with 4Gig memory. I read ADO.NET automatically uses database connection pooling ..which was one of my biggest reasons for thinking about COM+. Also I run transactions on my ADO.NET connection object a few cases in this app.

So I start to wonder if I need to take out my 13 business and data access classes and compile them separately and host it as a COM+ application. Is it necessary? Thus far the app is running great and I'm wondering if my concern is necessary at all!

The back-end is SQL Server 2000. Does COM+ bring its own problems or complexity too? Or I'm I thinking in the right direction for scalablility?

Will appreciate your comments.
 
automatically uses database connection pooling". Remember, a connection will be reused only for a new connection whose connection string matches EXACTLY, including whatever userid and password is used. So you must use predefined "roles" userid rather than the actual userid and password.
As far as COM+, would that not be a "step backwards" from .Net. I thought it was only helpful for VB6 where there were Single Thread Apartment issues.
I can not see where separate DLLs (components) would provide better performance. The "overhead" is in the classes and method calls, not the fact that the classes are in a separate, or the same, DLL.

Forms/Controls Resizing/Tabbing
Compare Code
Generate Sort Class in VB
Check To MS)
 
1. OK I use EXACTLY the same connection string for ALL the data access classes including the userid and password so shouldn't database connection pooling be automatic then? Can you define predefined "roles" userid.

The default ASPNet userid is what is used for the app ...i'm not sure if that is what you reference as "role".

2. Are you saying COM+ will rather degrade the performamce of my app? Is this because .NET uses apartment threading i suppose.... so that the issues that made COM+ necessary previously are no longer applicable here?

I will be glad if that is the case .... I did not use MTS or COM+ previously but I thought most web app developers had to use that for better overall web performance. I know there are bottlenecks with COM+ also ...but if using .NET ovecomes the issues COM+ was generally created for then that is good news!
 
COM+ may slow things down for you -- it's primary advantage is that it provides a way to have transactions that include multiple resource types (a transaction that spans a database and a MSMQ, for example). To do this, it used DTC (Distributed Transaction Coordinator) with it's two-phase commit mechanism. If you don't need it, it will only make things slower.

For scalability to 10,000 users, you'll want to design your application so that you can use a hardware load balancer. This will spread incoming requests over several web/app servers. This means you may need to review how you're using the ASP Session object (as in: you probably shouldn't be using it).

While I'm not a front-end guru, the company I work at has between 4 and 5 million hits each day, and that's how we do it.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Connection pooling is automatic in ADO.Net. Look for "Connection Pooling" in the Help index.

Yes, ASP_NET userid is a "role" or "surrogate" userId, a userID that represents a group rather than an individual. Some users define a "surrogate" for each application.
The idea is that if you can not, or do not want, to have the userid flow through to SQL, you can still have some granularity by using "surrogate" userids for SQL operations. It is a security consideration.



Forms/Controls Resizing/Tabbing
Compare Code
Generate Sort Class in VB
Check To MS)
 
OK I am blown away by chiph stating that COM+ will most likley slow things down!!!

IF that was the case why would it be used when benchmarking Database performance in single server and clustered server tests (reference TPC.org) see snip below... or go to their website...

Also

In my limited experience with COM+ it's reuse of connections is much better than .Net. If you use a .Net class and keep destroying it, you can run out of connections even when you explicitly close them.. I have seen this in datareaders where the aspx page destroyed the class without necessarly letting go of the connection and ending up maxing out the pool. Using COM+ the object/class would never have been destroyed - new creation is faster, objects get cleaned up better, cross object and datasource transactional control is finer and better.. a

and again.. If it wasn't so fast, why is it still being used? (not just with SQL Server but DB2 and Oracle (although non are showing now) benchmarks)

the figure of 1,184,893 is the current winner in TRANSACTIONS PER MINUTE!!! all platforms etc...

<snip>
[blue]
Rank Company System tpmC Price/tpmC System Availability Database Operating System TP Monitor Date Submitted Cluster
1 HP Integrity rx5670 Cluster 64P 1,184,893 5.52 US $ 04/30/04 Oracle Database 10g Enterprise Edition Red Hat Enterprise Linux AS 3 BEA Tuxedo 8.1 12/08/03 Y
2 IBM eServer pSeries 690 Model 7040-681 1,025,486 5.43 US $ 08/16/04 IBM DB2 UDB 8.1 IBM AIX 5L V5.2 Microsoft COM+ 02/17/04 N
3 HP Integrity Superdome 1,008,144 8.33 US $ 04/14/04 Oracle Database 10g Enterprise Edition HP UX 11.iv2 64-Bit Base OS BEA Tuxedo 8.0 11/04/03 N
4 IBM eServer p5 570 16P 809,144 4.95 US $ 09/30/04 IBM DB2 UDB 8.1 IBM AIX 5L V5.3 Microsoft COM+ 07/12/04 N
5 HP Integrity Superdome 786,646 6.49 US $ 10/23/03 Microsoft SQL Server 2000 Enterprise Ed. 64-bit Microsoft Windows Server 2003 Datacenter Edition 64-bit Microsoft COM+ 08/27/03 N
6 IBM eServer pSeries 690 Turbo 7040-681 768,839 8.55 US $ 02/29/04 Oracle Database 10g Enterprise Edition IBM AIX 5L V5.2 TXSeries Developers for AIX V5 09/12/03 N
7 IBM eServer pSeries 690 Turbo 7040-681 763,898 8.25 US $ 11/08/03 IBM DB2 UDB 8.1 IBM AIX 5L V5.2 BEA Tuxedo 8.0 06/30/03 N
8 HP Integrity Superdome 707,102 7.16 US $ 10/23/03 Microsoft SQL Server 2000 Enterprise Ed. 64-bit Microsoft Windows Server 2003 Datacenter Edition Microsoft COM+ 05/20/03 N
9 NEC Express5800/1320Xd C/S w/ Express5800/120Rf-2 683,575 5.99 US $ 09/01/04 Oracle Database 10g Enterprise Edition SUSE LINUX Enterprise Server 9 BEA Tuxedo 8.1 06/28/04 N
10 IBM eServer pSeries 690 Turbo 7040-681 680,613 11.13 US $ 11/08/03 IBM DB2 UDB 8.1 IBM AIX 5L V5.2 BEA Tuxedo 8.0 05/09/03 N
[/blue]
 
NoCoolHandle -

Why not create a test?

Create a class that inherits from ServicedComponent, and all it does is insert a row into a table. Let COM+ handle the transactions.

Create another class that uses ADO.NET transactions, and all it does is insert a row into a table.

Run each 500,000 times and see which is faster. Repeat, using Updates instead of inserts.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
If I manage to find the time or need, I will.. (right now i don't have the time to chase this one down)

Have you? if so what were your results?
Also was that concurrent 500,000 or loadballenced from multi clients?

Again, if COM+ was slow, why use it when benchmarking?

Looking for clarification


Rob

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top