Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stable scripts - need a quick reply please

Status
Not open for further replies.

c4n

Programmer
Mar 12, 2002
110
SI
Hi!

I've just been asked to write a script for a web site that must handle over 1000 members and over 5000 unique visitors per day. This might not look much but till now I've been doing scripting for smaller sites (1000 uniqe per day tops).

Now I'm wondering will my scripts be stable with such traffic?
What are the things that make scripts unstable?
How to avoid it?

Thanks for your prompt reply!
 
Perl is just about as stable as it gets. What makes a script or program unstable is almost always caused by poor programming techniques or data from unknown (and thus, uncontrollable ) sources (garbage in, garbage out). Of course, faulty hardware will drive you to drink but if your scripts follow good programming techniques it will be easy to pin point these errors.

A couple of tips...
1. If you're using online data files, make sure to lock the files when they're being written to. I prefer exclusive locks over shared locks. Locks are not near as much a concern if you're scripts read from a data file only, and the file isn't written to at the same time as you are reading from it.
2. If your scripts rely on data entered by an online user(s), take whatever time is necessary to build the proper data validation scripts. I've been designing databases and database applications for more than 15 years and I always verify the data at TIME OF INPUT. Some may differ with me but until you've had to spend a thousand hours cleaning up other peoples garbage from your databases, you can't truly appreciate the need to do it this way.


Good luck!
There's always a better way...
 
Thanks for the tips!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top