-
Notifications
You must be signed in to change notification settings - Fork 11
Use cases
There are many use cases for using transfer packets but to understand them you first need to understand how transfer packets work.
Transfer packets can be sent to clients (player) to ask them to connect to another server without needing to disconnect. The most important information to remember is that it is possible to pass information between servers and that resource packs are retained until disconnected.
Transfer packets can therefore replace basic proxies like BungeeCord or Velocity. This can be useful for international server networks because it is possible to have servers in several countries without having a connection hosted by a basic proxy and therefore not supporting the additional proxy latency.
Also, when there is a lot of traffic on a server network, it can have a significant resource cost. Heavy activity on BungeeCord consumes a lot of CPU. Using transfer packets can allow unlimited activity provided that the servers and server network infrastructure allow it.
A notable advantage is that it is possible to restart the proxy at any time without disturbing the players.
Firstly, transfer packets are only available from 1.20.5 which makes the technology unusable on servers that want to keep support for old versions.
Second, the infrastructure to enable this functionality is very different from a standard proxy like BungeeCord. Most systems that used BungeeCord as a medium to propagate information between servers will need to be rewritten. For example, a chat plugin synchronized between servers can use BungeeCord to send a message to all servers. There, it no longer works and we will have to rethink the propagation of information using external tools like Redis for example.
This part was written for developers, it is not necessarily easy to set up for your server.
Despite the disadvantages that there may be from a standard proxy, TransferProxy can prove to be an excellent synchronization tool.
Typically if you have player data to sync between two servers. Let's take as an example a Factions server and a Mining server. You want the player inventory to be synced when the player moves from the Factions server to the Mining server. By using a standard proxy you will have to send the inventory data to the Mining server when the player leaves the Factions but the data must be entirely written when the player is connected to the Mining server to avoid the player being connected BEFORE that the data has been completely written. So you're going to have to set up a complicated system to prevent this from happening.
Now with transfer packets it is possible to use TransferProxy as a bridge. Using our previous example, the Factions server sends the player to a TransferProxy server and tells them to wait for a signal. When the data is completely written, the signal is given and the player is transferred. While waiting for the signal, the player is simply in a waiting state on TransferProxy.