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

Implement a proper database #8

Open
elifoster opened this issue Feb 9, 2016 · 5 comments
Open

Implement a proper database #8

elifoster opened this issue Feb 9, 2016 · 5 comments

Comments

@elifoster
Copy link
Member

I think having a database where we store accessed user info, and tracking the generation time for those rows in order to only perform API requests once or twice a day per user could greatly increase our performance, and prevent API rate limit issues. @Strikingwolf what do you think?
User table:

PRIMARY KEY
Username    | Avatar | Current Streak | Longest Streak | Total Year | Average Day | Average Week | Average Month | Followers | Following | Public Repos | Private Repos | Forks   | Mirrors | Repos
String      | String | Integer        | Integer        | Integer    | Integer     | Integer      | Integer       | Integer   | Integer   | Integer      | Integer       | Integer | Integer | Pipe sep Strings

Repository table:

PRIMARY KEY
User/Repo   | Open Issues | Closed Issues | Open Pulls | Merged Pulls | Closed Pulls | Forks   | Stargazers | Watchers | Language Data
String      | Integer     | Integer       | Integer    | Integer      | Integer      | Integer | Integer    | Integer  | Hash as String
@FayeAlephNil
Copy link

Yes, definitely yes

It's fairly easy to implement as well using the Sequel gem

@elifoster
Copy link
Member Author

I was reading about some database development stuff in pure Sinatra today, and was thinking of going with that. It won't be done until after #4 though, so it's still a while away.

@elifoster elifoster mentioned this issue Feb 10, 2016
@elifoster elifoster self-assigned this Feb 15, 2016
@elifoster
Copy link
Member Author

@Strikingwolf How do you suppose we'll save the actual language data? Right now in the main post I have it as a string that represents the main hash, but I hate that.

@elifoster
Copy link
Member Author

The performance is officially so bad that Heroku will not load the site...

@elifoster
Copy link
Member Author

@strikingwolf ping about the Lang data column

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

No branches or pull requests

2 participants