arrowheadapps/strapi-connector-firestore

Proposal: "documentisation"

brettwillis opened this issue · 1 comments

Considering that Firestore charges based on read and write operations, there may be some opportunity to reduce usage costs and increase performance.

Proposal:

  • Add a documentise option for each model (or an documentiseAllExcept option)
  • Documentisation combines all documents in a collection/table into an array of objects in a single document

This proposal would be effective for models that are:

  • Bounded (i.e. finite number of documents, like the collections for Strapi configuration and permissions/roles, but not collections like users which may be unbounded) so that they fit within the document size limit
  • Queried often, or queried in their entirety (reduce many document read operations into a single read operation)

Renaming this feature to "collection flattening".

  • The connector options will have an option flattenCore to flatten core internal models but default.
  • Model options will have a flatten option