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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MTS and .Net

Status
Not open for further replies.

AlessandroR

Programmer
Apr 30, 2002
8
IT
We are starting a very big project (something like 1000 tables in the DB) with .Net. (C#)
We are not interested in distributed transactions (i.d. a transaction that involves two different DBMS) but we
will certanly use clusters. We do not have previusly made COM Objects to recycle.
The question is very simple (or very difficult): why should we use MTS (COM+)?
Or why should not use it?
Thanks for your comments.
 
dear alexender
interesting q though something u shoud look into it ,,u said
"We are not interested in distributed transactions (i.d. a transaction that involves two different DBMS) but we
will certanly use clusters. We do not have previusly made COM Objects to recycle."
okay now let me tell u what MTS or COM+ can do for u
the main purpose of MTS or COM+ is not to handle the distributed transaction well yes one of its function is as DISTRIBUTED COORDINATOR but still its not the alone functions MTS based component cand do for u there are so many others like
a) Object Pooling
b) Transaction handling
c) Load balancing
d) JIT (Just In-time Activation)
and more...u see if u r plannig to go for a big project which involves several clients and server then u should plan ur poject to be a DISTRIBUTED APPLICATION,i knwo the old days when i usually went for the TRADITIONAL CLIENT-SERVER APP,which often give me the below from expectation results..although i know MTS based application are also sometime gives u not the desired results but still its the way the Components are designed ,if u have experienced in designing these kinds of componets then u know what to watch out for making a very robust compoent for distributed environment
good look for ur project
Regards
Nouman
(Senior Software Eng )
 
We have a large site (2 million+ hits a day), and we've had some problems with COM+ and our VB6 components. Given that .NET Enterprise Services run through the COM interoperability layer (aka penalty layer), we plan to write our own object pooling when we rewrite in C#.

How? A combination of the singleton and the factory design patterns.

Chip H.
 
well yes i agreed with Cliph if somoen could design a very good object right from scratch with not just object pooling but also marshalling handler and other stuff then he should go for it but it need a real effor to make a perfecto one though :)
Regards
Nouman
 
Even if you plan to stay with COM+ for it's object pooling and marshalling abilities, there *are* some things you can do when designing your .NET objects to minimize the performance impact of going through the COM Interop layer.

Biggest bang for your buck would be to not use properties. Every time you access a property that's another trip through the Interop layer. What you should do instead is design method calls that accept everything through their parameters (i.e. "thick" methods). That way you limit the extent of the performance hit. Example:

Five property accesses plus a method call: 6 Interop trips
Thick method call: 1 Interop trip.

There's a book out from M&T (purple/red-ish cover) called "C# COM+ Programming" ( It's got a lot of good stuff in it.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top