Background Processing with Rails, Redis and Sidekiq
HTML-код
- Опубликовано: 16 июн 2024
- In any non-trivial web application you will get to a point where certain requests take so long to answer that your application will break if you try to respond with a synchronous HTTP response.
In this case you need to offload the work into a background process and start to build out a slightly more distributed workflow for your backend architecture.
This screencast is a quick overview of how to build background processes in Rails apps using Redis and Sidekiq, and then deploy the proper infrastructure onto Heroku.
This is a pattern that is necessary to understand to do any kind of serious web development.
=========================================================================================
Source Code: github.com/AlwaysBCoding/Epis... - Наука
The production quality is on point, please continue making these mate.
I love how you explain exactly what the deal is regarding synchronous requests, and explain exactly what Sidekiq would be used for. A big problem I have is running into tools and libraries that sound interesting, but I can't exactly figure out what they do, or why they'd help me because of all the jargon that everyone assumes you already know.
Really enjoy the way u talk the tech points, brief and clear!
Great work 💪, nicely encapsulated tutorials on key rails topics. Thank you and please keep the content coming 🙏.
Haven't watched the rest yet (only the intro so far) and that was amazing. Thanks!
Dude I love watching this. I'm a beginner and its refreshing how you explain this. keep it up!
Great tutorial! I think that the fact that you show your face makes you connect more with viewers, and you're the first web developer with a youtube channel that i've seen doing it. :) Keep it up!
Thank you, this was so informative, probably the best sidekiq tutorial I came across :D
Awesome introduction and coding tutorial! Helped me a lot!
Thank you very much for this. I really appreciated using this resource and it taught me just what I needed. Have a nice day.
Awesome explanation, thanks a lot for showing end to end flow.
Great Explanation. Loved it.
Thanks a ton, mate, for simplifying this concept for us. Great job.
Thank you!! I've been having a problem and the worst part is knowing it's running but doesn't know what's the logic error but thanks to the UI, I finally know why it's not doing what I want it to do.
Best intro for coding tutorial I have seen! Keep going! More React stuff also as a request :)
HekaFOF yeah, I love this guy.
Excellent video! Congratulations, it's clarified me a lot.
Thank you
Wow, bro! Awesome explanation... Loved it!
This was great, thank you. Keep up the good work!
Great video man, keep going! greetings from Argentina
This is amazing! Keep them coming!
You did a great video. Exactly what i'm looking for. Thanks a lot.
Excellent tutorial, keep up the good work!
Thank you so much, I finally understood more clearly. Thank you so much! :)
What a helpful tutorial! Great job!
Fantastic video. Thanks for starting all the way from the beginning and going all the way to production. One question: If I have multiple workers, do I need to put multiple workers in my procfile?
Thank you! Very useful!
ps. What program do you made slides in this video, and mix all with livecam window?
Thank you for a clear explanation! 👏👏
Nice screencast, thanks a lot!
Subscribed! Nice stuff man!
Great stuff man! Useful even in 2021
so helpful man, thanks a bunch!
Yo Jordan, great video. I was curious why you didn't need to start a redis server on heroku, and just a sidekiq one? Does the redis gem take care of that for us?
enjoying your video, really appreciate.
The best so far. Much respect
much much good tutorial ... explained perfectly
Thanks a ton for this video! Does this need a paid account for Heroku? Or can an app run multiple dynos for these web and worker processes with the free version?
Thank you sooooo much. Your video really save my day🙏
that was awesome. that was awesome. thanks for the tutorial.
Amazing Explanation !!
Great tutorial!
Great job! Thanks for that.
great explanation thanks ..please make some video on how ajax requests works
Thank you! very helpful!
Nice explanation!
Great video tutorial. Thanks
Gret work. Thanks a lot!
Nice bro, thank's!!
Amazing video 👏
AWESOME VIDEO!!! THUMBS UP!!!
Great tutorial thanks!
Thank you for the video.
thank you for this video!
Best intro ever!
Hey, great video! I had to learn from LOTS of different places this very same information that you just put into one video, good job!
From my own experience, I had to move from RedisToGo to RedisCloud (also free) because I kept getting a Max number of connections reached error. Looks like RedisCloud offers 30 connections and for some reason my simple email worker created up to 27 connections.
So bottom line: can you make a video about configuring your application/ job back-end/ Heroku so that you can get optimal number of connections? That's the only piece of information I just couldn't get and looks like the default configuration wasn't helping.
Thanks again,
David
Truly good video
Thanks for explanation
If I'm doing this in the context of a ReactApp, is there a NodeJS approach for doing this? If so, is there a reason to opt for the Rails approach instead?
Really good!
Hi please can you do a video to integrate clockwork or whenever gem.with sideqik
Basically wan to configure Cron schedule with the rails app
Really nice intro
Bundling Sinatra appears to be no longer necessary; I can access the Sidekiq UI out of the box
Also, why wouldn't I want to move everything to a background job? Besides the extra code.
Thank you brother your
best
@decipherMedia or @anyone
Please answer this,
Question:
But once the report is generated how do you return it back to the client? How does a background job still Fulfil the clients needs? Any idea how to come around this?
I never did coding on Ruby even though it is easier to get overall overview on Sidekiq.
But you don't show how to access the report once it's generated! Not to mention that multiple users can generate multiple reports, each with different parameters...how are they supposed to view their reports once the associated background job is completed?
This entire video can be fulfilled with a single go-routine in Go.
nice tutorial
Thank you!!
"This youtube channel is about to BLOW THE FUCK UP" lmfao - but yeah this video was awesome, thank you for creating! ONE QUESTION/SUGGESTION... It would be helpful to make a list of common scenarios and how to set up threads to process those scenarios properly. For example. Simple Scenario: "Creating a user/report (like this video explains)", Heavy Duty Scenario: "Scheduling 20 drip emails when a user opts-in at scale at 100 user opt-ins per minute"
nice intro!
awesome!
You didn't show how to access the message from the queue (aka retrieve the report). That's the reason real apps need to use sidekiq with redis to begin with.
Make it happen!
Very educative, as usual, thanks for the video.
Can I make a request for Angular 2/Rails 5 tutorial, with best practices, running and deploying to production environments.
I was thinking about something like a simple Angular 2 CRUD app with a REST Client running on a simple stand alone web server, and a Rails 5 backend server in --api mode, handling the requests of the NG2 app, the ideal would be to make them communicate securely with something like jwt? involving action cable would be a huge plus. What do you think? I'll make a diagram once i get home, and now that I have more free time, I'll finally start working on a proof of concept, hit me up of interested, we could build this together.
isbit.mx