
Signature
--------------------------------------------------------------------------------
John Saunders | MVP – Windows Server System – Connected System Developer
Interface queueing is another option for long-running processes.
> >> If I have a COM+ method that returns results from a long-running database
> >> query, is there a way to create a version of the method that uses one of
[quoted text clipped - 19 lines]
> "There must be something wrong with them", because they're too good to be
> true!
John Saunders [MVP] - 07 Mar 2008 15:16 GMT
> Interface queueing is another option for long-running processes.
Thanks for the answer (though I had almost forgotten the question).
But, what is interface queuing? Can you provide some links?

Signature
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Another memory sparked:
I can't locate the source, but a reputable source noted that the .NET thread
pool is quickly exhausted by high volume blocking COM+calls, resulting in a
severe scalability issue.
A recommended solution was to access COM+ components via async web service
proxy, thereby returning the threads to the pool while the COM+ calls execute
over SOAP.
This results in a very clean, scalable solution. There is more call overhead
resulting in slightly longer call times and increased network traffic, so
this might be used for long-running processes only.
> >> If I have a COM+ method that returns results from a long-running database
> >> query, is there a way to create a version of the method that uses one of
[quoted text clipped - 19 lines]
> "There must be something wrong with them", because they're too good to be
> true!
John Saunders [MVP] - 07 Mar 2008 15:59 GMT
> Another memory sparked:
>
[quoted text clipped - 3 lines]
> a
> severe scalability issue.
This is true, and widely known. In fact, the general issue is that ASP.NET
uses the thread pool to process incoming requests. If you then tie up those
threads, for any reason (not just COM+), then you are reducing the number of
threads available to process incoming requests. This can easily lead to a
situation where all thread pool threads are busy doing nothing - just
waiting for something to happen. When this happens, requests will be queued.
After a while, they may even start being rejected with a "server busy" error
code.
> A recommended solution was to access COM+ components via async web service
> proxy, thereby returning the threads to the pool while the COM+ calls
[quoted text clipped - 5 lines]
> resulting in slightly longer call times and increased network traffic, so
> this might be used for long-running processes only.
This should work, though I'd recommend being careful to only expose your
COM+ operations locally. I'd also suggest that this may be helpful for more
than just long-running calls, if you get into the thread-pool starvation
problem I discussed above.
One question I have is whether there is one ASP.NET thread pool per Web
Application or per worker process (aspnet_wp or w3wp). If only one per
process, then you'll need to ensure that the COM+ "web services" are served
on another worker process (different application pool).
I'll also note that I've seen it mentioned that WCF can also expose COM+
components. See the "COM+ Service Model Configuration Tool".

Signature
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer