Rewriting the Redis Twitter Clone
The Redis Twitter clone app is showing its age:
I’m looking at the Twitter Clone and noticed a N + 1 -like “get” in the code […] The above code seems rather suboptimal, if my understanding is correct.
At least three better approaches have been suggested, so who is up for experimenting with Redis and rewriting this app to use latest Redis features?
- use pipelining to get all the posts in one server roundtrip (won’t change the code much and be much faster)
- use
SORT…GETsemantics to get all the post data at once from the list of ids (should be somewhat faster than 1) - Use
MGETto get all the post data at once.
Original title and link: Rewriting the Redis Twitter Clone (NoSQL databases © myNoSQL)
via: http://groups.google.com/group/redis-db/browse_thread/thread/a67aae56aca2bc84