Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Bad Idea? Questions of performance issues, file locking, and GPGby eric256 (Parson) |
on Apr 12, 2006 at 16:55 UTC ( [id://542890]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|