The Chunk, where I am sadly leaving, is currently in the process of being merged with CubeCraft. As part of the merger, we are getting to do whatever we want with tech that isn’t going to be used. PlayPen, my server management framework that I originally wrote for managing the large number of minecraft servers we have, is some of that tech. As such, it is being open sourced here.
PlayPen is a generic server management framework, made for managing ephemeral services (ones that do not need to store data across restarts and can be stopped/started at will) across large numbers of servers. While we used it to provision and manage minecraft servers, it doesn’t assume anything about what you are trying to run and is especially useful for running practically any kind of game server.
Just a Framework
PlayPen can’t do much by itself, and only provides a framework for managing servers. It can provision/deprovision services but needs something to tell it what to do and when to do it. To do so, you either need an external program that can talk with playpen (such as the command line client or PVI). For that purpose, we developed MCBalancer for minecraft servers, which automatically creates and destroys minecraft instances depending on how many players are online. It will be pushed to our repositories soon (needs some cleaning up).
There are quite a few issues to be fixed, mostly for the sake of cleaning up the codebase (and network protocol – that’s a bit of a mess), but PlayPen is stable enough that we’ve had local coordinators (the parts of playpen that actually run services) run for months on end without restarts. The only times we needed to restart them was to add new features that we needed for newer services.
I have a lot of plans for playpen and I plan to make it much easier to run services that don’t fit the ephemeral model as well. Other ideas include the ability to control docker containers in addition to normal playpen services. Further plugin support (like allowing them on local coordinators) and some new official plugins (REST API plugin so you don’t have to work with the network protocol directly? Yes please!) should help out a lot. Maybe even a more generic load balancing system that replaces MCBalancer and allows more than just minecraft servers to work.