Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Prepare for stable release #1

Open
brettwillis opened this issue Jun 2, 2020 · 6 comments
Open

Prepare for stable release #1

brettwillis opened this issue Jun 2, 2020 · 6 comments
Assignees
Labels
help wanted Extra attention is needed
Milestone

Comments

@brettwillis
Copy link
Member

brettwillis commented Jun 2, 2020

I bootstrapped this codebase from the official strapi-connector-mongoose package at version 3.0.0, because I figured that, because Mongoose is also a NoSQL database, that package would be the best starting point.

https://github.com/strapi/strapi/tree/v3.0.0/packages/strapi-connector-mongoose

Simple operations and relations seem to be working, but most features (particularly components and more complicated relations) have either been only lightly tested, or not tested at all.

To do: see project.

Contributions and pull requests welcome, because I have limited capacity to complete and maintain this package.

See also strapi/strapi#530 and strapi/strapi#5529.

@brettwillis brettwillis added the help wanted Extra attention is needed label Jun 2, 2020
@brettwillis brettwillis pinned this issue Jun 6, 2020
@brettwillis brettwillis added this to the 3.0.0 milestone Jun 14, 2020
@brettwillis brettwillis self-assigned this Jul 26, 2020
@rrubio
Copy link

rrubio commented Nov 13, 2020

@brettwillis this is a brilliant project, thank you. Is there anything particular you need help on? or do we just choose from the board?

@brettwillis
Copy link
Member Author

@rrubio thanks, it would be great to have your support! The end goal is getting the tests to pass. Most of the failures are related to #23 and #15, which require a bit of a deep dive I haven't had time for. If you review the test failures there may be some smaller issues hiding in there, particularly in the search and filtering tests (look for a test suite that mostly passes but has a small number of failures).

@rrubio
Copy link

rrubio commented Nov 16, 2020

@brettwillis i'll be able to do some testing this coming weekend. Let you know how i go.

@rrubio
Copy link

rrubio commented Nov 28, 2020

Load & Response Times (CRUD)

Test case included the following -

  1. created 2 new content-type with 3 fields of string value
  2. enter new records + edit + delete
  3. navigating between menu options

Response times for each -

  1. New Content-Type (after save reload) - 10+ seconds
  2. Collection types (load) - 10+ seconds
  3. New record entry (after save reload) - 20 seconds
  4. Edit (after save reload) - 20 seconds
  5. Switching between menues - 10+ seconds for first paint

Observations -

Cloud Firestore metrics show that after each save of new record/edit, on reload it equates to 100 reads.

@brettwillis
Copy link
Member Author

Thanks for the data.

Yes... Strapi itself is designed in a way that causes a huge amount Firestore operations, especially when operating Strapi's front-end admin dashboard. This does not suit Firestore's usage-based pricing model.

Here are some of my observations:

  • The admin front-end counts the number of documents every time a collection is listed. This means Firestore will read every single document in the collection - disasterous for large collections.
  • The users-permissions plugin introduces a huge amount of overhead, because it fetches users, permissions, and roles on every operation. There are CRUD permissions for every single data type, so that can be a huge amount of permissions.
  • There are a large amount of operations when the backend server starts up. So it's best to use a relatively persistent server like Cloud Run or App Engine, not Cloud Functions.

Personally, I think using users-permissions plugin with Firestore in production is a bad idea, because of the overhead it introduces. Best to replace it with something that uses Firebase Auth, and eliminate all the roles and permissions, if you can. This is what I'm trying to do.

Also, regarding the latency, I found it drastically improves performance when the Strapi backend server is running local to the Firestore database (i.e. in the same GCP location). When you run the server on your local machine, the performance is poor because of the many round trips to Firestore database on every operation.

What do you suggest? Some warnings in the documentation at least... PRs to Strapi itself?

@brettwillis
Copy link
Member Author

I opened a separate issue for the counting problem - #33

@brettwillis brettwillis changed the title Prepare for production release Prepare for stable release Jan 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants