Sounds like a job for
IPC. Allowing any number of users to create an arbitrary number of files is a security hole. You'll need to come up with a better mechanism since anyone passing through could flood the server with requests and possibly pose a DoS attack on your filesystem. At least put a limit on how many file can be in existence at any point and time and block until this requirement is met (bad news for people waiting on one guy with a 28K modem...) The best solution would be to create some shared memory or use some other form of IPC where you can then alert the next cgi ("imagegenerator.cgi") what is going on. Minimally, you should be able to store the images (if not the relevant data) in the shared memory (or FIFO, if you prefer, though slower) and present a high-speed cache for your users to enjoy. You control over image production and deletion will be optimized and far easier to deal with. I really hope you're using
CGI::Cache, a db level cache, or web server cacheing mechanism. The increase in performance may surprise you. Have fun!
AgentM Systems nor Nasca Enterprises nor
Bone::Easy nor Macperl is responsible for the
comments made by
AgentM. Remember, you can build any logical system with NOR.