Redis Application Patterns in Rails by Obie Fernandez

Confreaks · 9K views · 2012 · 56:02

Open on YouTube

Databases & storageWeb developmentSoftware architecture & designtalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when asking how to build activity feeds, model associations, or use Redis helper libraries alongside ActiveRecord in Rails.

Recommended by 1 people across 1 different months, 2012 to 2013.

What it is

A RailsConf 2012 talk by Obie Fernandez, recorded by Confreaks, on practical Redis patterns for Rails apps, drawn from the DueProps codebase. It covers Redis flags on ActiveRecord objects, event tracking with sets, relationship graphs, time-ordered activity feeds with sorted sets, leaderboards, and testing and debugging Redis-backed code.

What people said

Recommends idrysdale · 2013-05 · Stack Overflow · on “How to approach aggregating actvities in feeds and then handling comments”

I'm working on developing an activity stream for a running club I'm working with. Runners will be able to see all the fun and good things that they and their friends have been up to over the past few weeks. Obie Fernandez gave a great talk on how to approach this using Redis at RailsConf 2012 ( the videos on YouTube here [this video] ) and I've adapted this to work within our app. Having run it for a few days, it's clear my next challenge is to build aggregated items into this list now. Take for example the following feed: Here it's clear that the top story would better collapse into something like " Shaun, Alexander and Ivo completed a Group Run...", but this poses an interesting question when t

Cites lloydmeta · 2012-11 · Stack Overflow · on “Modeling associations between ActiveRecord objects with Redis: avoiding multiple queries”

I've been reading / playing around with the idea of using Redis to complement my ActiveRecord models, in particular as a way of modeling relationships. Also watched a few screencasts like this one: [this video] It seems like a good idea in cases where you want to fetch one object at a time, but it seems like the approach breaks down when you need to show a list of objects along with each of their associations (e.g. in a View or in a JSON response in the case of an API). Whereas in the case of using purely ActiveRecord, you can use includes and eager loading to avoid running N more queries, I can't seem to think of how to do so when depending purely on Redis to model relationships. For instance, s

Cites medBouzid · 2013-09 · Stack Overflow · on “what is the mean difference between Nest and redis-namespace gems when we use redis with rails/ruby”

i have a question please : i watched this video [this video] his author explains redis with rails and he use Nest lib, at 10:27m he shows us that he extend Nest to use key.to_param instead of key.to_s in the initialize method, what is the difference here ?