Safety of Bungee Scale SQL Database?

Discussion in 'BungeeCord Plugin Development' started by CrypticStorm, Feb 24, 2013.

  1. Greetings from CrypticStorm, I have been working a long time on a bukkit project that uses an SQL database to hold stats for players. Currently, however, I am using a sql database that holds a lot of information on our website, and thus I am using web scripts to update the stats as a safety precaution to the websites other SQL data. This has not resulted in any errors so far, but I have a few questions if I were to switch to direct SQL access.

    First, can multiple servers be accessing the same SQL database simultaneously?

    Second, does SQL handle near simultaneous edits and retrievals well or not?

    As per the schematics of current setup, I send a request to a script to retrieve me a unique game id, and after the match, send a formatted string of information to be parsed and modifies into the database.

    If I were to switch to direct access, I would most likely run the information live in case of force endings in game, or server stops. This would hopefully allow for near faster updates of players rank and skill for use in chat and some permission settings.
     
  2. md_5

    Administrator Developer

    SQL has per row locking, and yes servers can access the same SQL db concurrently. However I would not make any existing Bukkit plugins do this as they will probably nuke themselves. If you are making a custom plugin then go ahead.
     
  3. this is a custom plugin, but what is the problem with changing existing plugins to updating to an SQL database. I am most likely going to be accessing one player at a time for reading and up to 4 players at once for writing (end of game will be a 16 players update possibly), so I should be fine. Now to learn SQL bc my friend was making all the scripts.