Config optimization

Discussion in 'Spigot Plugin Development' started by iSoda, May 30, 2017.

Thread Status:
Not open for further replies.
  1. Whats the best way to optimize configs for large scale servers?
    for example - given that I have to save few integers per player, money, two to four floats/doubles, past names, and strings. what would be the best approach (again - for a large server with many players) to store and load the data?

    for storing:
    1. create a config per player with all of the things inside it (seems messy to have thausands of configs)
    2. create a config for each saved value, ie 4 configs for 4 different integers and store each player data inside it,

    for loading:
    1. loading the whole config on server startup,
    2. load each individual player data when they join in (seems to be the way to go, but want to make sure.)

    should I be dumping the config once the player leave?
     
  2. 3. Use a different data storage system (I'd recommend MySQL)

    This is not what you were asking for, but since you're talking about a server that will be handling a lot of players I gave this answer. You shouldn't use yaml config files in case of a large playerbase. SQL is optimized for doing things like this.
     
  3. If you're expecting to save a lot of data & expand the amount of data points (doubles, names, etc) a database (Sqlite/Mysql) is a really nifty thing to have.
     
  4. Large servers use databases. MySQL, Mongo, etc. Making a file for each player isn't the best method
     
  5. thanks! (Sorry i have to fill this space in cause message too short..)
     
    • Like Like x 1
Thread Status:
Not open for further replies.