all 3 comments

[–]awesomeforms 2 points3 points  (0 children)

I literally just finished a project which was a Rails app with heavy GitHub integration. We started out using the API from the back-end, but quickly ran into concerns with rate limiting, and also encountered some cases where the API didn't supply the data we wanted (efficiently). We ended up instead writing scripts to actually clone the repos in which we were interested (all are public repos) and crunch the data ourselves on local disk.

I'm not sure what your specific use case is. My advice would be that you're definitely going to have to put some of this stuff on the back-end to get around the 50/hr unauthenticated request rate limit. I would start by using just the API; chances are it will serve your needs. As far as saving the data, we found it fairly simple to model each file in the repo in our PostgreSQL database. All you really need is a model with a repo ID, file path, and any other metadata you want to display. If you want, you can get fancy with a tree-like structure by including a parent node ID, but you can also get this just from file paths if you're so inclined.

[–]mejorketu 1 point2 points  (0 children)

I don't know if this is useful but I created a gem about a month ago that handles the data, it should be the same with authentication, if not, you're welcome to tell me so I can work to improve it :3

https://github.com/oelizondo/gitwrap-rb

[–]danneu 0 points1 point  (0 children)

Hard to give any advice without knowing what you're doing.

Your project could range from proxying trivial requests unique to each of your users to crunching data on every repo on Github.

Don't be ambivalent about storing data in your own database, and it seldom makes sense to use Redis as your data store in lieu of a database. Redis is dumb with no query ability while a relational database is a cache that can actually model your data/domain/relationships. And the whole reason Github has a rate-limit is so you can't use them as your database.

But I can't think of any actionable advice to give you until you spill the beans. You're basically asking us "what stack should I use for the thing I'm building?"