Unfortunately pre-generating the PDF is not an option. The whole system is essentially a web2print solution, users login to the system, build how they want the pdf to look using an html/js interface, and then when they are happy with how it looks, they hit 'build'. At the moment with only a few users it is relativly uncommon for more than 2 requests to happen at any one time, however due to new clients I am having to make the system ready for a much larger scale. Depending on how much the system needs to be scaled I am thinking of a system whereby when a user wants to build a pdf, it puts an entry into a database, this will be their 'ticket'. I will then run the script as a daemon, which will check for an entry in the database, process it, create the pdf, then remove the entry, and wait until another 'ticket' is collected.

In reply to Re^4: Perl concurrent access by TienLung
in thread Perl concurrent access by TienLung

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.