RealDevSquad / RealDevSquad/website-backend
RFC - Automating Updates of User Status in our Backend
@heyrandhirs is already working on this.
Since Jun 8, 2023.
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
Problem Statement
We store user status info in our Firestore backend, including their current status (active, OOO, idle, etc.) and future status. We have an API that allows users to mark themselves as OOO for a specific date range, and we need a way to automatically update their status based on this information. Currently, we can manually trigger an existing API every day to update the users status, which is time-consuming and inefficient.
Objectives
Our objectives is to:
- Automate the process of updating users status based on the dates.
- Reduce the amount of time spent manually triggering the API every day.
- Improve the efficiency and accuracy of updating user status in the Firestore backend.
Possible Solutions
We considered several possible solutions, including:
- Using a Serverless function to update the user status at a scheduled interval for e.g Cloudflare Workers to update the user status at a scheduled interval.
- Using GitHub Actions to create a scheduled job that runs the script to update the user status at a scheduled interval.
Monitoring and Metrics
To monitor the performance and health of the system, we can also create a collection in Firestore to store some metrics related to the updates of user status. We can track the number of users updated, execution time, error count, last execution time and use this information to optimize and improve the system over time.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.