Jump to content

Updates to the Tarvos Server Backend & Player Profiles Reset


James
 Share

Recommended Posts

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

 

 

  • Like 1
  • Champ 2
Link to comment
Share on other sites

Very interesting to read. I'm known with SQL but never heard of MongoDB. It sounds like this would not be a quicker way to store and retreive data, but that's probably my lack of knowledge on the matter. I think it's great that you guys are doing all you can to stabilize the server and its database. Shout out to @Tom for coming up with a solution that improves the performance!

Will the previously established 2fa's still work, or will we have to link it again? And do you have an update on the staff portal?

 

Anyhow, good work! 

  • Like 1
  • Confused 1
Link to comment
Share on other sites

7 minutes ago, Melt said:

Very interesting to read. I'm known with SQL but never heard of MongoDB. It sounds like this would not be a quicker way to store and retreive data, but that's probably my lack of knowledge on the matter. I think it's great that you guys are doing all you can to stabilize the server and its database. Shout out to @Tom for coming up with a solution that improves the performance!

Will the previously established 2fa's still work, or will we have to link it again? And do you have an update on the staff portal?

 

Anyhow, good work! 

Mongo is advantageous because it:

  • Scales when server loads increase.
  • Scales horizontally rather vertically¬†making it cost effective.
  • Stores unstructured data so¬†developers can quickly prototype
  • Supports nested data, i.e arrays, objects within objects.
  • Natively supports the JSON data format, which¬†decreases conversion overheads.
  • Champ 1
  • Confused 1
Link to comment
Share on other sites

Phenomenal job @Tom & @James !

Tarvos already had been providing a gameplay we loved to call smooth as butter.

That's now been taken to the next-est level, even further than anyone could've ever imagined on Minecraft.

Congrats everyone! ‚̧

  • Like 3
Link to comment
Share on other sites

41 minutes ago, Tom said:

Mongo is advantageous because it:

  • Scales when server loads increase.
  • Scales horizontally rather vertically¬†making it cost effective.
  • Stores unstructured data so¬†developers can quickly prototype
  • Supports nested data, i.e arrays, objects within objects.
  • Natively supports the JSON data format, which¬†decreases conversion overheads.

So, is there a downside to MongoDB? Why isn't thios as widely spread as SQL?

  • Confused 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Watching This Thread   0 members

    • No registered users viewing this page.
  • Online Users   0 Members, 0 Anonymous, 1 Guest (See full list)

    • There are no registered users currently online
×
×
  • Create New...