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

Tables for labels and categories? #139

Open
vrom911 opened this issue Aug 20, 2019 · 6 comments
Open

Tables for labels and categories? #139

vrom911 opened this issue Aug 20, 2019 · 6 comments
Labels
backend Haskell backend db Database queries, requests, issues question Further information is requested
Milestone

Comments

@vrom911
Copy link
Member

vrom911 commented Aug 20, 2019

No description provided.

@vrom911 vrom911 added question Further information is requested db Database queries, requests, issues backend Haskell backend labels Aug 20, 2019
@rashadg1030
Copy link
Collaborator

@vrom911 Yes good question. Originally we did have a table for labels and categories, but I think we decided we didn't need it and it complicated the database schema, so we removed it...I forgot the exact reason why. If you look at the code from earlier in the project you can see it. Should we add this back into the code?

@rashadg1030
Copy link
Collaborator

@chshersh @vrom911 Bump

@chshersh
Copy link
Contributor

@rashadg1030 This issue is about creating separate tables for labels and categories for caching purposes. Previously we were using those tables as the only place to store this information. But now we still have columns with type array in the main table. The point of having separate tables is the ability to fetch all unique labels and categories on frontend when the page is loaded. For autocompletion and discovery purposes. If we need to SELECT unique labels and categories each time the page is loaded by scanning big tables of repos and issues our backend might die...

The only difficulty with this issue at the moment is how to populate those tables efficiently.

@rashadg1030
Copy link
Collaborator

@chshersh Okay got it makes sense. Thank you for explaining. I'm ready to tackle this issue, but should we figure out how to optimize the syncing algorithm first?

@rashadg1030
Copy link
Collaborator

rashadg1030 commented Aug 22, 2019

@chshersh @vrom911 So for GitHub labels are we just selecting a few labels that we think are useful or do we plan on fetching all the labels on GitHub? I'm assuming the former. In that case, which labels should we select?

EDIT: Scratch out what I said above. I think what you're implying is that once we sync are issues and repos, we can scan those tables and create the categories and issues tables from that data. If this is correct let me know, because I would like to work on that.

@chshersh
Copy link
Contributor

@rashadg1030 Sure, let's finish with the sync first and think about proper caching. Not sure how it should be done, but probably one more step after syncing.

@chshersh chshersh added this to the Sync milestone Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Haskell backend db Database queries, requests, issues question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants