- Home /
Save and Load JSON Data to and from Webserver, Performance Question
Hello Guys,
i've got some Questions about Saving and Loading Data. A Short Background:
Im working on a Game with "Non Realtime" Multiplayer functions. This including as Example:
Character Information such as Playername and Stats like Strength, Intelligence etc.
Character Equipment such as Helm, Chest, etc.
Crafting Information like a Queue with 3 Helms which contains the HelmName and Starting Time
Character Achievements like 1000 Items Crafted
My Idea was to Save and Load the Data as JSON on a Webserver/Dedicated Server and a MySQL Database (Performance of the Webserver/Dedicated Server is not Choosen yet and it could be end up in multiple Webserver)
So the MySQL Database should have as example the following Information:
PlayerID, PlayerName, Webserver, PathToJson
To Keep the Datas in the Folders small i thought about to store like 1000 PlayerDatas per Folder.
Depending on the PlayerID there will be new Folders:
PlayerID 1-1000 = DataOne
PlayerID 1001 - 2000 = DataTwo
.......
Now My Questions are the following:
Is the Approach with JSON a good Idea? or Should i use Only MySQL / SQL to store all Data?
Should i keep the Folders Small? Or what do you think a "Medium size Webserver/Dedicated Server" can Handle?
Is it Useful to Save the Data seperate? As Example:
PlayerID-CharacterStats.json
PlayerID-CharacterEquipment.json
PlayerID-CharacterCraftingQueue.json
PlayerID-CharacterAchievements.json
To Load and Save them individually when they are needed. This would keep the Size of the JSON also very Small instead of having One very Big JSON that have to be Requested, Serialized and DeSerialized like:
PlayerID-CharacterInformation.json
Im relative new to Saving and Loading Data and i would appreciate every helpful Information about Saving and Loading Data to a Webserver/Dedicated Server
Thanks in Advance for Answers
If you need more Information feel Free to Ask
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
What is the CCU of the default Unity Networking? 1 Answer
Can a person be both a client and a server? (and more) 0 Answers
can firebase real-time database be used on a pc standalone game? 0 Answers
Running a Unity game on a server with no GPU acceleration (EC2) 0 Answers