vendredi 27 décembre 2019

Web Dev Backend: when not to use database

I'm working on a web project and I'm not sure if I need database or not. The following steps summarises what I want my project to do:

  1. The server makes API calls to Google Docs API to get the document data
  2. The server renders the document data and store it
  3. The client gets the document data from the server and it gets displayed on the browser
  4. If any changes to the Google Docs are noticed, the server repeats (1) and (2).

From my limited web development experience, I think I have two options:

  1. Store it in the server as a variable while the server is running (A hashmap to store key-value pairs of rendered documents)
  2. Store it in some sort of database (e.g. MongoDB, MySQL etc.)

My question is, how do I know what the most appropriate way of storing such data?

FYI, I'm using React and Node (Express.js) backend. And the rendered data of a single document would look something like this:

{
  lastModified: ...
  renderedHTML: "<html> ... "
}



Aucun commentaire:

Enregistrer un commentaire