Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 backend: generate and serve case stats #1972

Open
rjhuijsman opened this issue Mar 30, 2021 · 1 comment
Open

v2 backend: generate and serve case stats #1972

rjhuijsman opened this issue Mar 30, 2021 · 1 comment
Assignees
Labels
needs:triage New issue that needs triage resolved:stale No recent activity on the issue or PR source:public Issues created by the public

Comments

@rjhuijsman
Copy link
Contributor

Summary

Currently, the case stats being served by the v2 backend are...

  1. Static, out-of-date, not-localized stats, useful only as an example.
  2. Served by the old v1 API (getCaseStats) instead of using Firestore-based "API-less" access.

Desired Solution

We'd like to...

  1. Determine a good data layout in which to store case stats in Firestore Native.
  2. Periodically generate actual case stats (via scheduled Cloud Function)
  3. Modify the clients to read the case stats directly from Firestore, instead of going through the v1 API.

Additional Context

There is existing AppEngine code to generate case stats in RefreshCaseStatsServlet.java. We're looking to replace this code with our new Cloud Functions approach - its logic can likely be mostly maintained.

To allow for direct access from the client to Firestore, we will need to update our Firestore security rules in firestore.rules. Please also update the unit tests in firestore_rules.spec.ts to demonstrate which parts of the database should and should not be accessible directly to clients.

@rjhuijsman rjhuijsman added needs:triage New issue that needs triage source:public Issues created by the public labels Mar 30, 2021
@matthewblain matthewblain self-assigned this Apr 2, 2021
@stale
Copy link

stale bot commented May 4, 2021

This item has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the resolved:stale No recent activity on the issue or PR label May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:triage New issue that needs triage resolved:stale No recent activity on the issue or PR source:public Issues created by the public
Projects
None yet
Development

No branches or pull requests

2 participants