dylanrenwick / GiantScape

MMO concept built with C# and Unity
0 stars 0 forks source link

Database architecture overview #1

Open dylanrenwick opened 2 years ago

dylanrenwick commented 2 years ago

Currently the server loads all relevant data from files, mostly json formatted.

User account data, including password hashes, map records attaching names and IDs to tilemap files, and player records connecting user accounts with data stores are all stored in a monolithic database.json file.

Tilemaps are then stored in individual json files in the Tilemaps subdirectory.
While DataStores are stored in the similar DataStores subdirectory in bson format with .dat files

Worst of all, all of these files are read and deserialized into memory on startup.

This method of storing DataStores will likely remain, but a better solution is needed to handle data storage and loading. Data should be loaded as its needed, and only kept as long as it is needed. User accounts should be handled by a separate database via a json web API.