all groups > sql server programming > november 2004 >
You're in the

sql server programming

group:

Asynch Batch Processing Architecture



Asynch Batch Processing Architecture Randy
11/30/2004 8:08:08 PM
sql server programming: What is the Microsoft recommended architecture for implementing a .Net
windows service that needs to do processing based on a stack of data.

e.g. I've used a Task table in sql server in the past with a IsProcessed
column. Then the windows service polls that table looking for new records
to process. The problem is that this causes cpu cycles to be wasted while
there are no tasks to be processed.

I've also implmented the same sort of application using msmq. Applications
push messages on a queue that the service is listening on. This seemed to
work better than the polling sql implementation. More real time, no
polling, less cpu.

My questions is, Is MSMQ the best, recommended architecture for this type
of application. I see the Caching application block has a
AsynchInvocation namespace and I haven't found anything on the best
practices site for doing asynch batch processing.

Any feedback/website links would be greatly appreciated. Thanks in
advance.

-Randy

Re: Asynch Batch Processing Architecture Andrew J. Kelly
11/30/2004 9:41:32 PM
Randy,

I have found the MSMQ works very well for that type of task and can take
some of the load off of the DB as well. If this is a new app you may want
to take a look at the new Service Broker service that will be available with
SQL2005. It's pretty feature rich and powerful to boot.

--
Andrew J. Kelly SQL MVP


[quoted text, click to view]

AddThis Social Bookmark Button