Sharing data between multiple servers?

Discussion in 'Plugin Development' started by Rockslide, Apr 13, 2013.

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


    I host a pvp server based on my own pvp plugin. Among other things, it stores playerdata like kills/deaths, ranks, votes, options etc... in a file.

    Now I would like to expand and run 2 servers (or more later). I need this data to be shared between my 2 servers, so that when a player gets a kill or ranks up, it registers on both servers.

    Is there an API available to let my 2 servers communicate and share data through my own plugin?

    Advice would be appreciated :)

    EDIT: Forget to mention, the 2 servers will be separate machines on the same network.
    Wizehh likes this.
  2. Offline


    Store data on your website and access it from your plugin. Don't ask me how to do this because I don't know how, but I'm sure you could find something on Google about saving and getting data from a website.
  3. Offline


    You can link the folders?
  4. Offline


    From two seperate machines? And I imagine that would cause conflicts when both servers are trying to access the same file at the same time.
  5. Offline


    Can't you use a MySQL database for this?
  6. Offline


    A MySQL would work great for this.

    I think that this would work too.
  7. Offline


    And what if I wanted to have one server send a notification to the other? For example, tell the other server that playerX just got a killstreak.

    Would I need to code my own connection/packet system, or is there a ready made API for this?
  8. Offline


    you can use mysql for this. the way i do it is have a table in mysql that handles player data and another table which has server events in it (messages in chat) the table has an id number, the date and time, the information and then a column for each server you want the data to be shared across.

    the server checks the database for any new lines added (in the past 5 seconds) and then posts the new messages in chat and under the column for the server it ticks the row its posted so it never appears twice.

    it may not be the best way but its what i have working on my servers. (database is hosted in same network as the servers).

    is that the sort of thing your after?
  9. Offline


    Do you want to try my API? I just planning (and still waiting for actual testing to make sure it's worked) this system and it's worked perfectly on my local system (send/receive data within plugin itself). If you want I'll PM you as soon as I get my internet back to work (currently my internet is very poor).

    Want more details: See this link on BukkitDev (Plugin page)
  10. Offline



    Hmm. The description seems perfect, but I'm not sure it's a good idea to build my servers around an experimental API. I noticed that it was last updated in January, which concerns me.

    I've been looking at Bungeecord, which looks promising too, and is a little more established.
  11. Offline


    The reason that it's updated in January because I still wait for testing (my server is not ready to test) and I did not say that I want you to make plugin with my experimental API. What I mean is do you want to try my API? If it's work great for you then you can build it for your server. Which also help me to improve my API too! :D
Thread Status:
Not open for further replies.

Share This Page