To add to what the others have said. Try first, then if there are bottlenecks deal with them. It sounds like your probably worried that locking, decrypting, appending, encrypting, unlocking is going to take to long. If it turns out that it does, then you could always just encrypt the portion you are adding and append that. At the end of the day a script processes the file decrypting each section to build the final CSV which is then encrypted all at once. There are lots and lots of options available to you but its usualy best to try it before deciding its a bottle neck ;)

BTW The point of locking the file is that you wont loose data no matter how many people submit. Just if you have a surge some of those people will have to wait for early processes to finish with the file. If your process took a full second that would mean that if 30 people all hit submit at once then the last one waits 30 seconds. Sounds bad except your process probably wont take a full second and even if it does you will probably never have 30 people hit submit in the same second. Some quick ( and probably wrong math) indicates that you receive .03 submissions per second or about 1 submission every 30 seconds, so I think you'll be okay ;)


___________
Eric Hodges

In reply to Re: Bad Idea? Questions of performance issues, file locking, and GPG by eric256
in thread Bad Idea? Questions of performance issues, file locking, and GPG by hmbscully

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.