The Fish Server Software

I made a joke about fish and ended up creating a software to honor it
What is Fish?
Fish is a playground, a project in which I could freely experiment with a feature I didn't want to
merge into Aurora, my other Paper fork.
This allowed me to fully experiment with said feature in a completely isolated environment, where I could
identify any issue as related to that specific feature, and not any other Aurora feature.
Fish is not actively maintained, as I no longer have any use for it, the patches in question have already been merged into Aurora, but I still keep updating the upstream sometimes in case anyone might be using it, or at least using the patches as a reference.
Parallel World Ticking
The feature in question was Parallel World Ticking, a feature designed by @MrPowerGamerBR for
their server, SparklyPower.
This feature, at the time, earned some bad reputation due to Leaf implementing it into their software (which gave it its first boost in popularity), but then turning said popularity into bad reputation due to the way it was implemented.
Parallel World Ticking is the first (and probably last) major performance boost to Paper, without braking the game entirely, or without migrating to Folia.
Learning from other's mistakes
Compared to Leaf's implementation, I branched this feature directly from SparklyPaper,
the original fork that implemented the feature but made some adjustments in its design.
First, made it toggleable, so it can be enabled/disabled at any time.
Second, made the code more easily maintainable by extending classes (whenever possible), instead of editing them directly
in the patch.
Parallel World Ticking is based on Folia, but adapted to only world on worlds, and require synchronization of all worlds at the
end of each tick.
As such, it has similar compatibility issues compared to Folia when it comes to handling tasks between worlds.
And, like Folia, it has its own set of rules. I cannot promise 100% plugin compatibility, or to fix any issue that arises
like Leaf tried, because it is simply impossible. YOU HAVE TO FOLLOW THE RULES, OR DON'T USE IT.
Fortunately, compared to Folia, given that the parallelism is limited to worlds, and said worlds are forced to wait until all
are done ticking, plugin compatibility is around 99% with some exceptions, which quite frankly are bad practices and should
not be done, even in Paper.
You can read about the new rules in the Fish repository.
Fish has an additional compatibility layer to SparklyPaper, which allows some functions to be accessed directly, or will schedule them
to the end of the tick.
For example, some plugins like random teleport ones, access the chunk system via World#getHighestBlockYAt asynchronously.
Calling the chunk system asynchronously is not recommended even in Paper, it is limited on Folia for said reason, which Sparkly inherited.
Fish removed this check after carefully reviewing the call tree and determine that its impact will be exactly the same as doing it on Paper.
On the contrary, other operations, specially write ones, are scheduled to be run at the end of the tick.
And others like ticking blocks or fluid are completely blocked from executing, as Fish also removed the flag -Dsparklypaper.disableHardThrow
forcing the server owner to play safe, or not use Fish at all.
Why should I use Fish?
Short answer, you shouldn't
Fish is not free performance, using it for your server and enabling PWT will not give you a performance boost unless you design
your server around that feature specifically.
I'll give you an example: Let's say I have an average SMP server of 60 people, the boundary at which the server usually starts to underperform, even after optimizing via configs. Your typical worlds will be:
- 1 Overworld
- 1 Nether
- 1 End
PWT can easily turn a loaded server of 60 people into the equivalent of just 20 people, if you manage to distribute them evenly
across all worlds, 20 on each one.
Now, let's be honest, how many people you have on the end? If you have a server running, give it a quick test, take a spark report
and see how many players are on the end. Unless there's some sort of event, or the end has just been opened, you will probably have
from 0 to 2 people on the end (again, assuming a 60 players server).
How many are on the nether? Probably less than 10.
Most players only use the nether to get netherite or for transport, and almost everyone stops visiting the end completely after
getting elytras. Even if an end update arrives, the end will be as populated as the nether, only visited to get resources.
You have more than the basic three worlds you say? How many are those actually being used?
You plan on creating a "Survival 1", "Survival 2", "Survival 3", "Resources 1", etc.? If you give your players a menu, they
will pick the first option, specially if all are empty (which is normal for a new server). If one is not empty, most people will
go to that world and fill it up.
You have to come up with a strategy to keep your players as evenly distributed as possible.
Take into consideration that some players produce more lag than others, specially if one of them starts building redstone
machines.
If you have a very technical playerbase, then Fish will not be able to handle them. Redstone is one of the biggest pains for server performance, your only solution will be to migrate to Folia, which will isolate the lag for region.
The only scenario where you can use Fish is if all of these match:
- Your plugins do not support Folia, and there are not any decent replacements that do
- You have a way to distribute your players evenly across most worlds
- You cannot afford another server
Cool project and all, but why is it full of random fish memes?
So people think is a joke, don't take it seriously, and don't use it.