Flatfile Data Storage Dilemma

Discussion in 'Plugin Development' started by skyrimfan1, Apr 5, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    skyrimfan1

    Hello,

    Recently, I decided to give my server a major overhaul in the way it stores player data (flatfile not SQL) due to the upcoming Minecraft update that will allow changeable usernames. Previously, I had stored data in specific yml files with separate nodes pertaining to each player. The only problem I have with this is that the size of the yml file might make it hard to locate certain nodes. To remedy this, I was thinking about switching the way the main plugin stores the data. The new way would entail creating an individual yml file for every player (using their UUID) that logs on to the server and a wrapper class for accessing nodes within the yml files. I considered following Wizehh's tutorial on how to do this, but as I was reading the comments, I heard some say that creating new yml files is too costly/memory-intensitive.

    So basically the main gist is this ... What should I use: individual player yaml files or 1-6 large yaml files that store all player data?

    BTW: I plan to acquire a fairly hefty player base before I scrap this system (400+ players) and switch to a more formal DB like MongoDB or a SQL server.
     
  2. Offline

    St3venAU

    Individual files would likely use less resources than 1 large one since it would only need to load the configuration for the players that are currently online and it wouldn't have to search through a large config file for the players that are online.

    However, I would strongly recommend going with something like SQL from the beginning. It's not too difficult to set up and it passes off all of the cpu/ram intensive tasks to the SQL server as opposed to your minecraft server.
     
Thread Status:
Not open for further replies.

Share This Page