ado.net2.0 async execution

  • Thread starter Thread starter arnold park
  • Start date Start date
A

arnold park

Hi I have a question about ado.net 2.0 beta framework.
I heard async command execution very powerful.
But in my case, most of DataAccess Logics are in com+
Layer. And async execution causes some kind of thread
switching.
When it comes to COM+, i think That can be a problem.
what do you think?
Thanks
 
The push is away from COM+ and using web services for SOA. Your distribution
is no longer through MTS/COM+ under this system. Overall, I am not fond of
COM+ for .NET, although there are some scenarios where it is necessary.

Async is accomplish by spawning a new thread, the only real "switch" in this
process is the consumation of data, as the data has to be transfered from
the async thread to a sync thread, when it is ready. Having said that, yes
it is possible the Async ADO .NET would cause problems under COM+, but not
inevitable. I would have to delve deeper to see if it is an issue, however.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 
The async implementation itself will interact properly with COM+. It does
get tricky from the caller perspective though; for example, if you have a
method marked as [AutoComplete], you should not exit the method before the
operation finishes, which means blocking until the async operation is done.
You can still use async in that scenario to execute multiple parallel
queries against multiple databases. The other option is to remove the
[AutoComplete] attribute from that method and complete the transaction
manually; however, I would probably not recommend adding all that extra
complexity to the app.

Async, as any other advanced API, is designed to address specific needs.
Unless you really need async, you should probably stay away from it, as it
adds complexity to the app.

You can read a little more about async in ADO.NET 2.0 here:
http://msdn.microsoft.com/data/default.aspx?pull=/library/en-us/dnvs05/html/async2.asp.?_r=1

--
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top