Search code examples
javasocketsminecraftbungeecord

How to let a java program comunicate with a different java program


I am trying to build a system that loadbalances minecraft players across multiple servers and creates new minecraft servers. I made a plugin to loadbalance players and it works like a charm. But now I want to make a system that creates new servers based on the data it receives from the plugin.

This system is completely seperate from the plugin. But how do I make it so the plugin sends some sort of command to the server system so it knows to create a new server. I have looked into Sockets but was wondering if this is the best solution. Maybe a Rest api will work aswell?


Solution

  • In my opinion the best solution is sockets based on your own protocol, it will be much more productive, than http or something else. I can suggest using this lightweight socket library written by me - Sonder. It's working directly on sockets using nio.