Batch queing hosted in IIS

Batch queing hosted in IIS

Old forum URL: forums.lhotka.net/forums/t/1063.aspx


lewischris posted on Tuesday, August 29, 2006

Hi,

It would seem that, to be contactable, the Batch Server client component 'BatchQueue' requires that the Windows service host for the server-side components is running (i.e. started). This is because the host environment is a windows service and not IIS.

I need to be able to queue BatchJobRequests at any time - whether or not the windows service is running - so I need to be able to host the 'queue processor' components in a windows service, but the 'BatchQueue' server side components in IIS.

Does this make sense, and can it be done?

Thanks for any advice.

Chris

figuerres replied on Tuesday, August 29, 2006

?  are you saying that some process or user needs to submit a request to a server that will take time to be done and you want to know how to do that ?

 

if so you may want to look at MSMQ -- Microsoft Message Queuing

you create a q and put requests in one end and have another program pull requests out and process them.

many options on how you handle each part of the pipeline

lewischris replied on Wednesday, August 30, 2006

Yes, this is what I want to do and we are already using a different batch queue engine in conjunction with MSMQ to do this. The CSLA batch job processor has some nice features that we would like to exploit.

The BatchQueueServer, as implemented in the CSLA 1.x book, can be contacted through remoting by the BatchQueue 'client side' proxy object - but only if the Windows service is running, which is not ideal.

What I want to do is to be able to submit BatchJobRequests to the batch queue processor even if (for some reason) the BatchQueueServer Windows service has been stopped. So I would guess that the BatchJobRequest submission side needs to be hosted in IIS, but the MSMQ processing side would continue to be hosted as a Windows service.

Chris

figuerres replied on Wednesday, August 30, 2006

Hmm... I am using 2.xx and have not seen this "BatchQueue" class so I can't comment directly on it.

it sounds like the service impliments the logic that recives the requests from the client.

if that is true then I think you have 2 things to look at:

 

1) separate them and let the reciver store them

2) have a procedure for activating the processing logic when needed.

 

as I have not found the code in 2.0 I do not think I can help much with what it does etc...

but I'd think that you could just accept requests and push them into MQ and let it store and fwd the request.

then activate the service to pull the jobs off the MQ and complete them.

or I am missing something...

lewischris replied on Wednesday, August 30, 2006

You're exactly right in what you say - and this is what I have now done.

I have implemented the client-side BatchQueue class in the same way as the client-side DataPortal class, and I'm hosting the BatchQueueServer server-side components (the component that receives the BatchJobRequests and sticks them on the queue) in IIS.

What this means is that the BatchQueueServer is always available to accept incoming BatchJobRequests - even when the Windows service is not running.

I was really asking the questions here because my remoting skills are a bit rusty!

Thanks,

Chris

 

RockfordLhotka replied on Wednesday, August 30, 2006

Your idea seems totally realistic to me. Since MSMQ is the intermediary that stores inbound requests until the service can process them, you can certainly split the "queue a request" part of the process from the "handle a request" part.

Copyright (c) Marimer LLC