in reply to Re^2: Finding the right PDF module
in thread Finding the right PDF module

I can only speak from my personal experience, but the applications I made stored the unique results of the request in a file (it were spreadsheets, but that is irrelevant for this discussion) and just returned a link to this file to the client requesting it. All the heavy lifting of making the file was done by the Perl script and the sending of the file to the client was done by the Apache server. As far as the webserver was concerned this was just a static file. I found it most efficient. Once every so often a cron job would reap all "old" files to reclaim disk space.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^4: Finding the right PDF module
by ksublondie (Friar) on Aug 17, 2011 at 20:23 UTC
    Honestly, I doubt these unique pdf's will ever be intentionally saved. Saving the files would be a waste of resources even if they were periodically cleaned up. The bulk are one-time disposable transaction reports or stock mass mailings that will be printed, mailed, and never viewed again. Even if they are later needed, the saved report will most likely be obsolete and require a re-generation anyway.

    However, that's not to say that I won't be saving any of them. It's just that THESE won't need to be saved.

      The idea to save these files is not to "keep" them, rather to quickly finish the generating script and save on processing resources.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James