Forum OpenACS Development: Re: New Specification for Cron Package

Collapse
Posted by Torben Brosten on
There are a couple of examples I can think of, without going into detail.

Consider a (not too distant future) dotProject package, where  an admin has control over 30 or so subsites, each focused on a manufacturing or construction project.  Each subsite uses a series of cron reports to track project progress. Some might create indexed ratios from data for financial officers, other indexes might be for project managers, functional management (operations), and stakeholders. Other reports might notify resource controls (inventory, HR etc.).

The point  is that most of the reports would be identical across all the subsites, only changing by project name/id (relevant dbs [if named differently] and perhaps report cycles.  If a query was considered new every time a project started to use the report for the first time, the load would become very tedious. The load from mistakes in editing and delayed report generation (as each query is painstakenly put in a que for authorization) could be higher than the security risk involved in adding an optional parameter feature.

Based on your most recent comments of this being a UI issue, are you stating that queries already have this level of flexibility --without editing?

Collapse
Posted by Tom Jackson on

Torben, You could create a UI that added crons that would do the required checks for you. This would create a query per subsite with the parameters filled in as you want. I would have to consider if having a parameterized query shared among different owners/users would be useful, or just confusing. What if someone expected certain features of a report and another subsite wanted or lobbied for a change, the change was made and now one other subsite gets upset at the change. So what I was thinking is that each cron would have separate entries for the script, instead of a shared script and a separate parameters table. Btw, nothing prevents a real add-on package that creates and maintains parameters and as a first step runs a script which creates a new query. Any application should be able to load/unload/modify queries as it wishes. My approval process only applies to the Cron Package UI.

One other thing to consider is what happens when 30 essentially identical queries hit the database to run reports at the same time? One idea is to use the proposed pool field of the scripts table. That pool could have enough handles to take care of the load, without affecting too much the website.