Hello!
This post outlines the changes we've made to the backend of Tarvos server and its related services. It mainly relates to the methods of storing and retrieving data such as player information, server settings and more. Be warned, it's a bit technical.
In the beginning of Tarvos' development, the team decided to go with storing data with something called Structured Query Language, commonly known as SQL. Essentially, this type of database is structured, which means we define the table and column names, and insert data into said tables and columns specifically. This type of data storage is generally fine, but eventually we felt like it became a bit outdated and hard to add new content on the fly.
We started off by communicating with the database directly from our Core plugin that runs on each server. This ended up being a temporary solution due to both speed/processing and security concerns. Due to this, the legendary @Tom created a new solution for Tarvos, a custom web-based API that would process a query and return or take action on data using the common GET, POST, PUT and DELETE methods. This solution would give the Tarvos Realm data structured in a JSONObject, which is incredibly easy and simple to retrieve and store data. Due to this, it ended up being a lot more efficient for both server-load and speed, in addition to added security.
Eventually, even though the API returned JSON data to the Tarvos Realms, storing data became more difficult for the things we wanted to do, mainly revolving around our upcoming Universe gamemodes. This is because SQL is limited by nature, and we wanted to add custom data that wasn't necessarily pre-defined in the database. In addition to this, we had multiple tables for player-related data, for example in order to load a player the API would retrieve a row of data from the following tables:
- players
- preferences
- arcade_stats
- punishments
Having to do this ended up being messy and didn't really make sense, but there's simply no other way to do it in SQL. Thus, we decided to migrate to a different solution, called MongoDB. This solution is vastly different as it is unstructured, whereas SQL is structured. Instead of tables and columns, data is stored in JSONObjects. This means the API is getting a JSONObject and directly sending it to the Tarvos Realm, instead of converting it into one. This also means we can store all of the data from the multiple tables mentioned previously into one. This is way more efficient for updating and retrieving player information.
We started experimenting with MongoDB early in the Universe development, but we have now recently migrated completely from SQL to MongoDB. You will not notice any changes on the surface, but under the hood the Tarvos backend has been reformed completely.
As a result of this major update, we are clearing all player data. This includes your rank and balance. We are going to figure out the best way to restore all relevant ranks to players via Discord or in-game. Balances and other stuff like arcade stats will be reset, as there's not really a reason to keep them.
Additionally, with this update, we will soon be giving all players the option to use two-factor authentication on Tarvos. This is optional, except for Staff Members.
If you have any questions, please don't hesitate to ask!
Cheers,
James