Should you use Large Plugins or Multiple Small Plugins?
Posted on July 11, 2020 in minecraft
There is a lot of misinformation around the Minecraft community when it comes to using larger plugins containing numerous independent features. This type of plugin is sometimes referred to as a "monoplugin", with notable examples being Essentials and CraftBook. Many people believe that using a monoplugin is terrible and that it's better to use multiple smaller plugins in place. They usually cite reasons such as "performance" and "overhead". Not only are these not necessarily problems with monoplugins, but it's also generally the exact opposite.
It's worth noting that the functionality of the plugin should be your highest priority. If you need a specific feature and only one plugin provides that, you'd use that plugin over another.
Most server admins are concerned about a few key things when deciding what plugins they should use for their server. In most cases, these monoplugins are actually better than many individual plugins.
As long as the features of the plugin are all tangentially related, they can work a lot better together. While small plugins can't realistically provide perfect support for every other small plugin, a plugin with a broader suite of features (a monoplugin) can ensure that they work together seamlessly. An excellent example of this being the case would be CraftBook's Pipes mechanic. Not only can the pipes pull from and push to the various virtual inventories of other CraftBook mechanics, but they can also utilise more advanced CraftBook features to provide item distribution and sorting. If you were doing this with small individual plugins, you would need to ensure that the plugin adding each of these many features had support for your pipes plugin. And on top of that, you need to make sure they're implemented in a quality way that won't cause issues.
Another often overlooked benefit in functionality that monoplugins have is they are generally consistent in how they work. This allows players and server admins to spend less time learning and memorising various different methods of operating features, as a monoplugin has the advantage of enabling you to do many actions consistently.
A common belief throughout the Minecraft server admin community is that monoplugins perform worse than smaller ones. Not only is this not inherently true, but it's also actually generally the opposite. While this obviously doesn't apply to all plugins, as some can just be written in a less optimised way than others, a well-written monoplugin should perform reasonably better than a well written smaller plugin.
As monoplugins have a shared codebase (the code that makes the plugin work) between the features, they're able to make use of shared systems. For example, if a few various features required a block update tracking system, rather than having one included and working per small plugin, a larger plugin can just have one that works for all of the features. Multiply this out for every single shared system required for plugins, from translation systems, queueing systems, state handlers, etc., and you'll find that the performance difference stacks up quite quickly.
One of the biggest misconceptions surrounding monoplugins is that they have a lot of overhead compared to using multiple single plugins. While this would technically be the case if the monoplugin had a lot of features you don't use, most negate this problem by allowing features to be enabled and disabled by the player. In fact, some plugins such as CraftBook go as far as to make it that the code for features that aren't being used aren't even loaded by the server. This means it's no longer bloated by features that you don't use.
On top of this, every plugin has its own inherent overhead. While it only makes a small impact, this does mean that having a monoplugin that does the exact same thing as 3 plugins with almost identical code will be inherently more lightweight. Therefore, any well-made monoplugin does not have an overhead problem, and in fact, is marginally better than having multiple plugins.
Another complaint I often see is that people use smaller plugins over monoplugins because they feel that small plugins are more stable, or less likely to break. While the size of the plugin doesn't really affect this, monoplugins are generally developed by more established development teams with more experience, as it is a larger undertaking to write these. While not true for all small plugins, many that people use instead of monoplugins are ones written by brand new inexperienced developers. There are many high quality smaller plugins, but for 10 monoplugins compared to 10 smaller plugins, more monoplugins are likely to be of higher quality.
The opposite can also be true in some cases, however. If a monoplugin becomes too complicated for the team to maintain, quality can go down. I've heard this has become the case of a few well-known monoplugins, such as CMI. While not necessarily a problem if it still works, it can be a sign of scope creep by the developers. This problem isn't unique to monoplugins however, as a plugin developer who creates a large number of plugins will face even more issues due to the extra overhead of maintaining many separate plugins.
Many monoplugins include multiple jar files to house all of their features. Essentials does this, and CraftBook did in the past. While it can make sense from a usability perspective, it can become confusing about which features live in which jar files. On top of that, this reintroduces some of the same overhead issues that having multiple plugins causes. Due to these reasons, this is not always the right solution for a monoplugin. There's not necessarily anything wrong with doing this, but there's also nothing necessarily wrong with not doing it. It depends on whether it makes sense for the plugin or not.
Unlike what many people in the community falsely believe, there is nothing at all wrong with using monoplugins. Not only are the perceived negatives incorrect, in many ways, monoplugins can be even better than using multiple smaller plugins. I'm not saying you should go and replace every single plugin on your server with a single plugin. What I am saying, is that using monoplugins that provide a common theme, such as Essentials or CraftBook, can in many ways be better than multiple smaller plugins that add the same features. It's also worth noting that if you use 5 features of a monoplugin but one of them isn't quite what you want, using a separate plugin for that one feature while still utilising the monoplugin for the others is not necessarily a bad idea.
When you can use them, monoplugins can be great for your server.
Share this with others!
Posted on July 10, 2018
My journey over 8 years with the Minecraft community. From The Powder Toy, to CraftBook, AntiCheat, Sponge, and WorldEdit.
Posted on November 18, 2018
Updating CraftBook to 1.13 has had a few issues, however it works properly now. A few major changes are also expected in the future.
Posted on September 17, 2020
Running a Minecraft Server can be a daunting task. In this article you'll find answers to questions, guides for various systems, and advice on server administration.