vendredi 10 mai 2019

What is an efficient way to handle static database on web applications?

I'm currently developing an interactive map with many variables and additional graphs. For now, this app uses a static json file to store the data. In production, the data will not be updated very often and the end user will not be able to update the data.

My question is simple: should I keep a static json file as database of should I go toward more sophisticated solutions (such as MongoDB) ?


To my knowledge, the pros and cons of both approaches are:

Static json file:

  • pros:
    • No need to set up a server. The app is fully on the client side.
  • cons:
    • The data must be loaded on app startup (which can takes time)
    • Handling "requests" to the data is not as easy as with an API (Not sure about that)

NoSQL database:

  • pros:

    • Scalable
    • Isolate data from app
    • Fast app loading
  • cons:

    • Must pay a server
    • A bit overkill

I've not been able to see clear consensus on this question, so I'm very interested in hearing your thought.




Aucun commentaire:

Enregistrer un commentaire