Piotr Jozefow

Joined

20 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Using Webhooks with Stripe Discussion

Thanks a lot for help! :)

Posted in Using Webhooks with Stripe Discussion

Great episode! Thanks!

Could you recommend some article or gem that could handle some kind of "leaky bucket" algorithm?

I wanna build an app where many different Users will be able to send API Calls to a third party website which would return a link to generated by this site document in pdf.

I am wondering if I should construct an algorithm which would queue up all these requests so they do not fire off at exact same time, or is it something that Rails4 handles? Or maybe its not a problem at all?

Another thing I would like to set up is a queue for request so they would fire for example not more often than f.e. 2 calls per second. And on the other hand, if one call returns f.e. 429 error, an app would try again in f.e. 30 seconds and the other ones which would be in a queue (triggered by another Users) would be put on hold until the errored one would be successful after another or several attempts...

Is there any gem that handles that kind of requests scheduling for API calls?

Would you build a seperate model for API calls and queue them up in the database with timestamps?.. If so, then what is the best way to schedule a controller to reach to this database of queued requests and make an api call in the background?

f.e. Shopify handles that kind of errors on their server site,.. but I'd like to be able to control it from my app as not all of the services handle it... https://docs.shopify.com/ap...

Thanks for great tutorials!!! :)

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.