Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Need help with an uprising.

Name: Anonymous 2008-09-27 16:32

I started a game in lingo to run via flash 2-3 years ago, it has just started gaining commercial interest and I have funding to help it run smoother and work more efficiently as a whole before i begin marketing it.
I recently found there was a huge strain on the server, so after investigating I found the problem.
The thing is, the thousands of user accounts are all drawn from a single folder on the server e.g '/users' and each account has it's own text file 'examplename.user', each text document around 2-4kb in size with content resembling something like

regdat=000000
regdob=000000
regeml=email@mail.com
accmember=admin
accstatus=0
accwarnings=0
lastlog=000000
listfriends=friend1,friend2,friend3,friend4,friend5
guilook=1
skillnavg=1000
skillfght=1000
skillagil=1000
skillcarp=1000


(just a small idea of an account)
I hugely regret coding it this way.
After a bit of talking with other amateur programmers I know, we talked about us attempting to put them in one big user database.
We have no idea how to do this without any possible errors.
I just backed up the test server and need suggestions what to do.
Help /prog/

Name: Anonymous 2008-09-27 16:45

Use SQLite.

Name: Anonymous 2008-09-27 16:51

Use PostgreSQL.

no,seriously

Name: Anonymous 2008-09-27 16:57

1. take backup,
on testserver:
2. write converter for textfile -> database
3. test converter with backup until it works
4. rewrite application code to work with database
5. test application code until it works
after that:
6. put server into maintenance mode
7. run converter on server
8. update application on server
9. make some more tests
10. open server again for user access

Name: Anonymous 2008-09-27 17:21

while you're converting make room for other future elements.
for example account memberships.

Name: Anonymous 2008-09-27 17:24

Use Oracle Database 10g Enterprise Edition.

Name: Anonymous 2008-09-27 20:03

You need a Squirrel Server.

Name: Anonymous 2008-09-27 21:34

Use Silverlight and MS Access.
I'd recommend doing your development live on the production server, that way you'll save a deployment step, and your users can instantly benefit from improvements.
For transferring the data, hire about ten interns to read the files (lucky you used a plain text format, eh?) and enter into the database. Have them all work in the same room, that way they can talk to each other to find out which files haven't been transferred yet.
There's several good books on this topic, and I'd especially recommend TAoCP and Structure and Interpretation of Computer Programs, both of which helped me greatly with a similar projects some years ago.

Name: Anonymous 2008-09-27 22:10

>>7
You need a SKHWWWIL Server

Name: Anonymous 2008-09-27 23:50

>>8
DON'T HELP HIM!!!

Name: Anonymous 2008-09-28 2:32

Use MySQL. I did and my data has never been more corrupt!

Name: Anonymous 2008-09-28 7:23

>>11
Why do everyone say MySQL corrupts data? I didn't have this happen to me. Which storage engine were you using, and when did things get corrupted?

Name: Anonymous 2008-09-28 9:36

there may be no reason to change to a database, what is causing it to be slow - more specifically?

Name: Anonymous 2008-09-28 10:01

So you have `thousands' of user files, each with gigantic 4kb, and it's slowing down your server? How would this happen, unless those `thousands' of users log in all at once? If the filename is predictable (so that you do not have to search the directory), how should reading a small text file every once in a while impact performance? You could even cache the file if you need content from it more than once, which certainly would be a lesser hassle than switching to all your code to SELECT 'THIS SHIT' FROM 'MY FUCKING DB' code.

Name: Anonymous 2008-09-28 19:29

>>12
Perhaps it is because MySQL does not have transaction support and MyISAM is a terrible storage engine.

Name: Anonymous 2008-09-28 20:44

>>12
'Cos it does: http://dev.mysql.com/tech-resources/articles/mysql-data-integrity.html

Also try altering a foreign key constraint -- it will make you rage.

Name: Anonymous 2008-09-29 5:52

>>14
He probably reads them all on every page load ^__^;;

What I'd do is put a lot of information in the file name.

Name: Anonymous 2008-09-29 8:05

>>17
I won't by trolled by your feeble attempts, Anonymous.

Name: Anonymous 2010-12-27 11:17

Name: Anonymous 2011-02-04 12:32

Name: Anonymous 2011-02-18 13:07

dubzNewer Posts
Don't change these.
Name: Email:
Entire Thread Thread List