title: How would you approach a Twitter-like application with Azure table storage?
body: <p>I was thinking in a very simple Twitter-like app, I was considering support just twits and the time line.</p>
  
  <p>But my head, pretty much used to relational models... cannot come up with an reasonable model in Azure tables or noSql. Basically, I was thinking in:</p>
  
  <ul>
  <li>A user can add other users as
  friends.</li>
  <li>A user can write messages (up to 200
  characters).</li>
  <li>Messages are always shown ordered by
  time, the newest the first.</li>
  <li>The user page shows his last 20
  messages.</li>
  <li>The main page (time line) shows the
  last 20 messages from him and his
  friends.</li>
  </ul>
  
  <p>Pretty simple :D</p>
  
  <p>If I put all messages in a single table, and I put the userId as partition key... everything is easy, BUT ... I don't think that that solution scales very well. But other solutions make the time line page very complex or very unefficient, because it's not about get the latest 20 messages from every of your friends, it's about get the latest 20 from all together... and that is blowing my mind. It could be that you have a very annoying friend and the latest 20 messages are from him :D</p>
  
  <p>What could be a scalable and efficient way to store this information in a Azure tables fashion?</p>
  
  <p>Thanks in advance.</p>