Hi again,
First off, I'm thinking of starting a site of some sort which may end up having hundreds of thousands of users to keep track of, and store information about. I'm thinking of learning SQL and using ASP/VBScript to do the databases, but I think that I could make my own database system from scratch using PERL if I just knew a few more things.. I've built plain old pipe-delimited databases with PERL before, but they were very small (400 users), and I didn't need to worry about using system resources, and disk space.. but if I want many users, and if I need to allow for rapid expansion (optimistic), I'll definitely have to worry about this. So here are some things that I'm concerned about, and any advice or links to good sites would be awesome:
1) Is there any disadvantage to giving each user their own text file with information in it, as opposed to one huge file containing many users' information, each user on one, delimited line? Then, when [user] wanted to look up info, the cgi program would simply open [user].txt (for example) instead of searching through the large file. Would this technique use up more disk space due to extra file info, such as the actual file names, and attributes? But wouldn't it be faster as well?
2) Does the flock function truely stop one user from writing to a file if another user is reading it? i've read varying descriptions of this, and this could quickly become a problem with many users.
3) It seems like there is little overhead with PERL, as opposed to using SQL, ASP, etc.. is that true?
Once again, ANY help would be greatly appreciated.
First off, I'm thinking of starting a site of some sort which may end up having hundreds of thousands of users to keep track of, and store information about. I'm thinking of learning SQL and using ASP/VBScript to do the databases, but I think that I could make my own database system from scratch using PERL if I just knew a few more things.. I've built plain old pipe-delimited databases with PERL before, but they were very small (400 users), and I didn't need to worry about using system resources, and disk space.. but if I want many users, and if I need to allow for rapid expansion (optimistic), I'll definitely have to worry about this. So here are some things that I'm concerned about, and any advice or links to good sites would be awesome:
1) Is there any disadvantage to giving each user their own text file with information in it, as opposed to one huge file containing many users' information, each user on one, delimited line? Then, when [user] wanted to look up info, the cgi program would simply open [user].txt (for example) instead of searching through the large file. Would this technique use up more disk space due to extra file info, such as the actual file names, and attributes? But wouldn't it be faster as well?
2) Does the flock function truely stop one user from writing to a file if another user is reading it? i've read varying descriptions of this, and this could quickly become a problem with many users.
3) It seems like there is little overhead with PERL, as opposed to using SQL, ASP, etc.. is that true?
Once again, ANY help would be greatly appreciated.