Best communication method between servers

Discussion in 'BungeeCord Plugin Development' started by xel, May 20, 2015.

  1. xel

    xel

    Hi,

    What is the best communication method between bungee -> bukkit?

    If you should make a syncronized inventory list between all bukkit servers, what is the optimal?
    - Store data in MySQL and query every 10-15 sec
    - PluginChannel ( When the server is empty, then it is not working )
    - TCP Server - client

    Can I send inventory update to all servers every 1-2 sec on TCP server - client or this is too lots of to cpu?
     
  2. I would store the data in mysql when the player leaves or the plugin disables
     
  3. xel

    xel

    These are not important data: e.g. online players count, server online or offline, etc.
     
  4. Store in MySQL then. You can then use it elsewhere such as on your website.
     
    • Useful Useful x 1
  5. xel

    xel

    I need only on the bukkit servers. I search a fast, but cpu and io sparing solution.
     
    #5 xel, May 20, 2015
    Last edited: May 20, 2015
  6. Really, it depends on what you're using it for... They all have their pros and cons..

    A method you haven't looked at is existing libraries like @geNAZt's resource communicator or whatever it's called.
     
  7. What about using a NoSQL Database instead of MySQl like MongoDB. It lets you store real objects and is faster than a sql server in this case.
     
  8. NoSQL Database is one of the best variants. I recommend using Redis as it have internal Publisher->Subcriber service.
     
    • Agree Agree x 1
  9. xel

    xel

    Thanks the NoSQL variant. I would like create Chest GUI about server informations. ( e.g players counter, server online - offline ) I will have 6-8-10 servers. Can you type some pro / cons about TCP server <-> client and NoSQL solution?
     
  10. Well an advantage of MySQL or some sort of database approach is each server can put its information in it, without having to contact each other for it. That way less work has to be done by the servers.
     
  11. xel

    xel

    Is MySQL query easier than a tcp packet? I think no
     
  12. Well you can either have with TCP:

    [​IMG]

    or:

    [​IMG]
     
    • Agree Agree x 2
    • Funny Funny x 2
    • Creative Creative x 2
  13. xel

    xel

    No, I can build my TCP server into BungeeCord plugin and TCP client into bukkit plugins, then this will be a centralized star topology.
     
  14. I would make all the servers write data to the MYSQL so then you can easily grab that data on any of the connect servers.
     
  15. This would work with inventory's if you saved them onjoin and onquit