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

Track daily counts of replies sent by different users, partners and orgs #70

Closed
rowanseymour opened this issue Jun 27, 2016 · 1 comment

Comments

@rowanseymour
Copy link
Contributor

rowanseymour commented Jun 27, 2016

Currently on partner dashboard we should counts of replies sent by that partner's users. These are calculated on the fly, and that works for our production instance because total number of replies is still < 100,000.

With upcoming org-level dashboard and as database grows, need to add proper tracking of these counts. We can track on a per-day basis and aggregate to generate per-month charts.

From our experience with RapidPro, the most reliable way to track counts and avoid database deadlocks is to use an insert/squash pattern. As new items are created, they insert a count into a table, and a background process is responsible for squashing those into daily totals.

@rowanseymour rowanseymour changed the title Track counts of replies sent by different users, partners and orgs Track daily counts of replies sent by different users, partners and orgs Jun 27, 2016
@rowanseymour
Copy link
Contributor Author

Added in #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant