Database or file server

Discussion in 'Bukkit Discussion' started by Jozeth, Sep 16, 2013.

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

    Jozeth

    I am currently developing a plugin for my upcoming server, but I don't know if I should use a database for storing warps, players, reports, etc. or files.

    Advantages and disadvantages would be nice.
     
  2. Online

    timtower Moderator Moderator

    Jozeth First of all: I am just repeating what people told me
    Files are slower then databases when you have large amounts of data, databases however are slower when using small amounts of data
     
  3. Offline

    Jozeth

    Fair enough - If what you said is true then I'll probably got with the database as the 'players' table alone will have many columns (+ 1 row per player) so it should become large.

    Thanks.
     
    timtower likes this.
  4. Offline

    metalhedd


    Databases aren't slower for small amounts of data. There are tons of factors that can contribute to slow databases and slow filesystems, but in general they're both equally capable of performing well if your code is well designed.

    The deciding factor shouldn't be performance, that can be addressed by using your chosen storage backend efficiently. Usually that means doing as much work as possible off of the main thread. Loading frequently used data into memory onEnable and flushing it to disk in small amounts periodically. etc.

    You probably want to support both in the long run, because in the end, it's up to the server admin, some prefer to have their data in a database where they can analyze it and integrate it into their website or other scripts/plugins etc. others prefer the convenience of having EVERYTHING self-contained within the plugin data folder.
     
    timtower and Jozeth like this.
Thread Status:
Not open for further replies.

Share This Page