Sending 9,423,231 JSON table to Client

Greetings everyone,

I’m currently in the process of developing a moderation system for my game, and I could use some guidance. Here’s the scenario: In my game, administrators have the ability to access an Admin Panel on any server. From there, they can input the UserID of any player. Once the admin submits this information, a remote event is triggered, sending a signal to the server.

Upon receiving this signal, the server retrieves the player’s profile and prepares the relevant player data to be sent back to the admin’s client for display via the user interface.

However, I’ve encountered a challenge. My game features an extensive inventory system, resulting in a significant amount of data stored within each player’s datastore. To be precise, I anticipate sending a JSONEncoded table containing approximately 9,423,231 characters.

My question is: What is the most effective method for transmitting this substantial amount of data from the server to the client?

Your insights and suggestions would be immensely valuable. Thank you all, and have a fantastic day! :slight_smile:

1 Like

Why are you sending so much data? 9 million characters?

1 Like

An item in my game has a string size of around ~1500 characters.

The inventory fits 850 items = 1,275,000 characters.

I store the trading history of the player - the past 200 trades. Each player can offer 10 items each.
200 * 20 * 1500 = 6,000,000 characters.

These are the two biggest sets of data and might offer some insight into why I am sending 9 million characters.

Note that this is the maximum amount of data that the system can be requested to send. It will not always send 9 mil characters - only when an admin is doing detective work on a player with a full trading history and a full inventory. :smiley:

1 Like

The root of the problem is the string size of an item. Why is that so large? If possible, can I see a string of one item ~1500 characters?

Even though this is for a moderator-only feature and would only affect large profiles, you’re bound to run into other issues with data sizes being this big.

Also, I urge you to lower the limit of past trade history. Put a 72 hour trade hold on items that are recently traded like the Roblox trade system. This way, if someone gets scammed and reports it in 72 hours, you only have to check one trade. Another solution is to have players report recent trades and only those are stored in their files. This way you won’t have to worry about old trades being removed and you can easily track down what was scammed. The previous solution plus a 72 hour trade hold is going to make it impossible for scammers to run away with stolen items if it’s reported in a timely manner.

1 Like