What’s the best way to store static JSON files for a puzzle game?
Asked by
TechyTraveler92
I'm new to web development and I'm currently building a web app where the data for each puzzle is stored in JSON format. Each JSON file is around 5KB, and I expect to have a few thousand files at most. I'm considering different storage options: should I keep them as static files in a folder on the server, use object or blob storage, or store them in a database like MongoDB or PostgreSQL? I'm aiming for a cost-efficient solution for now, but I might want to track stats or user data on the server later on.
Answers
A set of static files on the server should work perfectly for you! Just keep them organized and you’ll be good to go.
Reply to this answer
If your JSON files are mostly static and don’t change frequently, using blob storage with a CDN would be a solid choice. It can improve load times significantly for your users.
Reply to this answer
Storing your JSON as static files in a 'public/' directory on your server is totally fine! At 5KB each, that's really lightweight, and you won't run into any performance issues with a few thousand files.
Reply to this answer
Add your answer
Answers are reviewed before publication.
WebWiseGuy: Agreed! A CDN can really enhance the user experience, especially when you have a lot of files to serve.