Greetings.

I have an application that accesses some relatively static database tables to create drop-down <select> lists. As an example, one of these tables is a list of common commercial aircraft.

At the moment (and not in a production environment), every time the drop-down list is generated for a web page, the script queries the database to retrieve the entire list of aircraft. I would prefer to retrieve the list of aircraft when each Perl interpreter starts and then not retrieve it again until the administrator sends a signal. For this particular table, the signal would only occur when new aircraft hit the market, like the Boeing 787 will (hopefully) in December of this year.

The most UNIX-ish way to do this, I guess, would be to send SIGHUP to each running perl process, causing it to reload its configuration, update its stored lists, and so forth. I'd rather do this in a more Perl-ish or Apache-ish way, though, and I'd also rather be specific about which list it should update.

At the moment, there are about 10 such lists, and I can see that number growing to about 20 before the site goes live. At a guess, the lists average about 300 elements each (with the list of aircraft being one of the shorter and less-frequently-updated lists).

My ideal solution would be to have an external application (the administrator app or whatever it ends up being) update some flag inside each mod_perl process every time they need to update a list, and then each mod_perl application would see the flag and perform the update. I could do this relatively easily with a combination of threads and file hooks or "update sockets" or something, but I don't plan on adding threads or sockets to the application, and I think adding that much complexity and overhead for this "simple" feature would be overkill.

Any thoughts?

Thanks.

Colin

Reply via email to