Live data from Hacker News

How to Build a Fast News Feed in Redis (and Rails)

blog.waxman.me

11–12 of 12 posts

Re: How to Build a Fast News Feed in Redis (and Rails)

#11
post #5

Earlier quoted context omitted.

I'm not sure what version of Redis you were using, but depending on the data you're storing, 2.2 uses significantly less space than previous versions. Some data from GitHub: http://technoweenie-ruby-onales.heroku.com/#34

It looks like our approaches are very different. Stratocaster stores lists of integer IDs, which Redis optimizes for pretty heavily. We're taking the list of IDs and doing a multi-get from either memcache or mysql. It looks like this lib uses Sets of the actual event data. It won't be able to take advantage of the same optimizations.

On the plus side, switching from storing zsets of actual event data to storing integer ids should be a pretty minor code change.

Re: How to Build a Fast News Feed in Redis (and Rails)

#12
Implemented something similar for a project I was working on a few months ago using PHP. Just wrote up a blog post about my implementation:

http://nleach.com/post/4315166514/activity-feed-in-redis-usi...

It's pretty similar to the Ruby example, but I figured I'd share it anyway. Feedback very much welcome!

Post reply on HN