rubygems / rfcs

RubyGems + Bundler RFCs
45 stars 40 forks source link

Add RFC for time series gem downloads #48

Open segiddins opened 1 year ago

segiddins commented 1 year ago

@indirect would appreciate your help rounding this off

indirect commented 1 year ago

@segiddins this looks good to me, I think. my only remaining question is how we will ensure the main app doesn't break if e.g. timescale disappears. for the work outlined in this RFC, I think the only thing that might break is the background job that writes to timescale? if so, that means it's mainly a question for the future work that will display download counts and graphs.

segiddins commented 1 year ago

So my thought there is, we can have a cron job that copies all time download numbers to the main postgres database on some cadence?

indirect commented 1 year ago

Oh yeah, that seems good. That plus a circuit-breaker type thing on the requests to the timescaledb so puma can continue to serve other rails requests sounds like it should work.

segiddins commented 1 year ago

That plus a circuit-breaker type thing on the requests to the timescaledb so puma can continue to serve other rails requests sounds like it should work.

I'm not quite sure what you mean by that? My thinking was we'd use stimulus to show download counts on pages, so as to be able to cache download numbers separately, and that would give us a natural place to keep reads from timescale off the critical path

indirect commented 1 year ago

That's pretty much what I was thinking--something out of the critical path to show the numbers, something out of the critical path to write into timescale. Thanks for writing this up!