Using the right tool for the job.

Discussion in 'Plugin Development' started by flash110, Sep 9, 2016.

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

    flash110

    A couple days ago I was looking for solutions to my problem and came across a very good way to put it; "When the only tool you have is a hammer, every problem looks like a nail." Now this was of course a webpage on misusing SQL and I know that is what I am doing with part of my program. In my network I have all of the minigame servers update a database every 5 seconds with info on their gamestate, map, max players, and online players. Then in my hub plugin it pulls the info from the database every 5 seconds. Obviously this is not what a SQL database is used for and I am looking for other options of getting and displaying the info in the hub menu from the minigame servers. If you suggest pinging the server, it would help if you left an example because I have tried that and failed to get it working because I do not understand how to work with packets.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @flash110 Sockets might be a better solution for this.
    But it depends on how your hub menu is build and how much access you have in terms of open ports.
     
  3. Offline

    flash110

    I will send in a message to the hosting company about using sockets and I will update on that later. Can you think of any problems I would encounter with pinging the servers from the hub? @timtower
     
    Last edited: Sep 9, 2016
  4. Offline

    timtower Administrator Administrator Moderator

    @flash110 You don't ping those servers, you let the servers write to the hub when something changes.
     
  5. Offline

    flash110

    @timtower If I wrote to the hub server from the minigame servers I would need to open a port on each minigame server and 1 on the hub server to receive all of the data, right?
     
  6. Offline

    timtower Administrator Administrator Moderator

    @flash110 Ports for sending are always open.
     
  7. Offline

    AL_1

    Not always, but ushaly they are. It depends on the host computer/network.
     
Thread Status:
Not open for further replies.

Share This Page