I'm thinking of writing a small SPA that serves as a sort of "database" viewer for assets in a video game (vehicles, weapons, etc. that players can use). I want users to be able to form advanced queries about what types of vehicles/weapons/etc. they want to see based on a range of properties each of those objects has (in the way that you can filter down items in Amazon or Newegg based on the values of item properties).
My question has to do with where and how to store that data.
It takes the form of a 10MB JSON file, far too large just to bundle into the client-side code of the SPA, meaning I'm going to have to serve it from a back-end somehow (probably an Express app). I could easily throw this into MongoDB, but I'm wondering if perhaps that's overkill.
In a case like this, where your data is on the order of 10MB (an array of ~10,000 items), could your Express app simply load the JSON file into an array of item objects in memory, and have the REST endpoints just perform native JavaScript array operations to filter and sort the main collection to generate the subarray (or single item) to return? Is there any reason not to do this?
Obviously if your data is of a certain size, you would want to throw it in a database, but I'm very fuzzy on where that cutoff point is or how you would make that determination (assuming that what I proposed isn't totally ludicrous).