|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Signalling between two applications"Scheduler" application looks at the database and finds records that need to be worked on. It creates object for those records and puts them in the message queue. The "Worker" application is monitoring the queue for new messages. The "Scheduler" application will usually move about 1000 jobs into the queue at a time and it does it on a schedule that it owns. I would like to modify the application so that the "Worker" application will notify the "Scheduler" application when it needs more work instead of the "Scheduler" application just pushing out work on a predetermined schedule. One option is to continue to use the MSMQ and have the "Worker" application send a message to the "Scheduler" application via a queue. However that would require the "Scheduler" to have a thread that monitors that queue. I was wondering if anyone could comment on a better way for the "Worker" application to signal the scheduler. Perhaps some kind of RMI or maybe there is a way to use Deligates and Events. Any kind of comments that you have are welcome. Thanks Ryan Pedersen wrote:
Show quote > I have two applications that pass data in one direction via a MSMQ. If you aren't already on SQL Server 2005 you should certainly consider> > "Scheduler" application looks at the database and finds records that > need to be worked on. It creates object for those records and puts > them in the message queue. The "Worker" application is monitoring the > queue for new messages. > > The "Scheduler" application will usually move about 1000 jobs into the > queue at a time and it does it on a schedule that it owns. > > I would like to modify the application so that the "Worker" > application will notify the "Scheduler" application when it needs more > work instead of the "Scheduler" application just pushing out work on a > predetermined schedule. > > One option is to continue to use the MSMQ and have the "Worker" > application send a message to the "Scheduler" application via a queue. > However that would require the "Scheduler" to have a thread that > monitors that queue. > > I was wondering if anyone could comment on a better way for the > "Worker" application to signal the scheduler. Perhaps some kind of RMI > or maybe there is a way to use Deligates and Events. > > Any kind of comments that you have are welcome. > > Thanks it. The new Service Broker architecture is designed for exactly this kind of application. -- David Portas SQL Server MVP -- To add to David's response, one method to address this in the pre-SQL 2005
world is with .Net remoting. You can get more help on that approach from one of the dotnet forums. There are many alternatives to accomplish this and a lot depends on whether you need synchronous or asynchronous processing. -- Show quoteHope this helps. Dan Guzman SQL Server MVP "Ryan Pedersen" <pedersenr***@gmail.com> wrote in message news:585gs19trn5aejivuvasqofeti4qkfjrjq@4ax.com... >I have two applications that pass data in one direction via a MSMQ. > > "Scheduler" application looks at the database and finds records that > need to be worked on. It creates object for those records and puts > them in the message queue. The "Worker" application is monitoring the > queue for new messages. > > The "Scheduler" application will usually move about 1000 jobs into the > queue at a time and it does it on a schedule that it owns. > > I would like to modify the application so that the "Worker" > application will notify the "Scheduler" application when it needs more > work instead of the "Scheduler" application just pushing out work on a > predetermined schedule. > > One option is to continue to use the MSMQ and have the "Worker" > application send a message to the "Scheduler" application via a queue. > However that would require the "Scheduler" to have a thread that > monitors that queue. > > I was wondering if anyone could comment on a better way for the > "Worker" application to signal the scheduler. Perhaps some kind of RMI > or maybe there is a way to use Deligates and Events. > > Any kind of comments that you have are welcome. > > Thanks |
|||||||||||||||||||||||