TornDotSpace / Torn-Issues

The official issue tracker for torn.space!
0 stars 0 forks source link

Modify player storage method #16

Closed chrisj1 closed 5 years ago

chrisj1 commented 5 years ago

Currently when a player signs up a new file is created on the file system. I propose to instead change to use sqllite. This should have the following benefits:

I would like to hear what other people think about this idea. I have looked at the code and it seems it could be accomplished by changing only the save() andload() functions within app.js.

chrisj1 commented 5 years ago

Looks like the save file format is a mess. I need to talk to @2swap about sorting everything out. Looks like he is storing a lot of information that could be reduced to a simple computation. For instance, storing the amount mined and having a separate bool if it is over a certain amount.

chrisj1 commented 5 years ago

We will be using mongodb instead of sqlite.

DamienVesper commented 5 years ago

Very good, it's honestly not that bad.

chrisj1 commented 5 years ago

Very good, it's honestly not that bad.

I personally prefer sql but at this point, MongoDB is orders of magnitude faster to implement. I know Toontown uses it with 5k connections so it should work for us.

johnnyapol commented 5 years ago

This is currently implemented in the master branch (not production) and fingers crossed it will be apart of the next server deployment (no current ETA)