title: Storing an Event Timeline in Redis
body: <p>I'd like to store a list of events in a timeline in Redis. I'm thinking of a sorted set with seconds since 1970 as the score, allowing quick lookup and range searches. </p>
  
  <p>The problem is I want each of these events to represent an object, with a couple of keys (about 3 maybe), so I'd store a sorted set of IDs - the application would then lookup the hash based on the ID. </p>
  
  <p>So the conversation would go something like this:</p>
  
  <pre><code>&gt; ZRANGEBYSCORE events start end 
  1) "16"
  2) "17"
  &gt; HGETALL events:16
  1) "key1"
  2) "val1"
  ...
  &gt; HGETALL events:17
  ...
  </code></pre>
  
  <p>Is there a better way to organise or do things that would avoid the application making a separate call for each result. Could everything be done on the redis-server side to avoid this overhead? Is it even a big problem?</p>
  
  <p>PS. I'm using the node client, but my question applies to other languages too.</p>