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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|