After such a great response to my last post, I thought I would try here
again for some useful advice on the best design for a program I am about to
write.
I have a mainline program that reads an input file and will then pass a
record to a subtask to process.
The subtask has a work cycle
MQPUT messsage
MQGET message (with wait option, by corellid, gets the response message)
write message to preopened output file.
When the mainline program wishes to send another message, it must choose a
non-busy subtask, or attach another. The whole point is to drive a certain
message rate, so I do not wish to queue more than 1 piece of work to any
subtask at a time
The subtask cycle will take about 150ms. I would like to be able to process
up to 300 messages per second, although normal rates would be much lower.
So questions;
Use pause/release or wait/post?
For the output file write, what would be the best way of serialising the
file writes?
each subtask wraps an enq/deq around the put?
Another subtask has a work queue of records to be written which is added to
by the other tasks? In this case what is the best scheme for dispatch of
this task, when many others may wish to give him work?
Any other comments or suggestions would be appreciated too.

Thanks, Joe

Reply via email to