Redis Application Patterns in Rails
summary
An activity stream for DueProps moves from slow Sequel queries to Redis and scales through traffic spikes, with pages serving in 20–30 ms page times. The codebase uses Redis sorted sets for time-ordered feeds (event IDs scored by timestamp), sets for attendee and follower indexes and HMSET details hashes to store event metadata; set intersections and unions filter and aggregate feeds. Redis CLI monitor aids debugging, Redis props and Redis objects libraries add model-level accessors, and the demo app runs successfully in production-like tests.
AI-written summary · about
chapters (11)
- 0:00Introduction to Redis
- 2:04Understanding Redis
- 3:28Live demo setup
- 7:51Managing keys and namespaces
- 12:31Strings and basic operations
- 16:31Working with sets
- 25:36Sorted sets for events
- 31:13Data hashing
- 36:44Redis props and metaprogramming
- 40:57Advanced patterns
- 45:51Q&A and conclusion
related talks
46mFun with Ruby and Redis
26mRuby APIs for NoSQL
59mUsing Redis beyond caching
51mX-Raying Your Redis App: SDK Tuning with a Performance Engineer’s Eye
27mRedis: Beyond Caching and Queues
24mWhen Real Time Meets Big Data & Analytics
36mBuild a Cloud Native Asynchronous Messaging System For Scale With Redis
41mFROM ACTIVERECORD TO EVENTS
