1.15.2 Sockets Spigot Bungee

Discussion in 'Spigot Plugin Development' started by MrAxeTv, Mar 4, 2020.

  1. Hello there I am working on socket connection thing between bungee and spigot,
    so I can send signal to other server to sync some data.
    Now question is should I make one socket per server
    and keep it open and use it for communication between BC and SPIGOT
    or should I closed and reopen new socket on every new communication.
    Thanks :)
     
  2. Keep the connection open.
     
  3. Slightly off topic, but make use of a message broker / pub-sub system (redis is fine) if you can - it'll make life so much easier
     
  4. It would takes too much resources to close, reopen, close, reopen... depending on what information you are sending over and how often you do it. As mentioned, keeping the connection open is a better idea.
     
    • Like Like x 1