Focal Point
How to limit the number of simultaneous connections to a specific data source

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2411009331

September 23, 2005, 08:57 PM
jodye
How to limit the number of simultaneous connections to a specific data source
Hi Guys

I am trying to figure out a way to limit the number of simultaneous connections to a specific data source. Does anyone know if this is possible? For example, say that it is OK for hundreds of reports to run against Tables X and Y but Table Z can only have 5 at any one time.

Currently I am creating a record every time someone runs against table Z. Before the report runs, the number of records is checked and if it is greater than 5 then the user gets a message to try again later. The record is deleted when a running report finishes.

But I want the user to be able to run the report, either immediately or as deferred, and for WebFocus to not move it in to the run queue unless there is a free slot in the available 5. That way the user does not have to resubmit the report.

Can this be done? Off the top of my head I can think that one way would be to trap all of the user's params and then have some kind of cron job that runs every 5 minutes and checks for a free space in the queue. But is there an easier way?

Thanks and have a great weekend everyone.

Jodye
September 24, 2005, 09:25 AM
Håkan
Jodye, I don't think so. You could write all the user parms into a file. Have the cron job to retrieve all the parms and then delete the request info after the report. You could make this into a generic tool, with the name of the data source and the number of allowable users for each data source. As id for the user's request you could use the PID (since you're talking about cron I take it you're on some kind of unix box).

Best of luck
H�kan