What’s Up With Queues? Ruby + Redis

Queues are super useful and important to understand. They are usually necessary once your application grows. However, Rails 5 ships with ActionCable which relies on Redis publishing events to a queue. So maybe it’s time we all achieve a simple understanding of basic queueing concepts.

I’m going to use dining out as an example. It’s something many of us experience and it relates to a number of fundamentals.

What’s the point?

It’s pretty damn useful. Queues are what help us save jobs for later. They allow us to keep the application moving along without forcing the user to wait while we execute something not relevant to their current experience. When you sign up for a new site and receive a welcome email in your inbox later on, that’s thanks to a queue. It’s an almost certainty that you’ll need queues in some form or another to ensure your application is extensible and scalable.

Are there other fundamentals worth noting? Is there a better way to achieve our sorting than what’s used above? Let me know!