title: How to model a social news feed on Google App Engine
body: <p>We want to implement a "News feed" where a user can see messages
  broadcasted by her friends, sorted with newest message first. But <strong>the
  feed should reflect changes in her friends list</strong>. (If she adds new
  friends, messages from those should be included in the feed, and if
  she removes friends their messages should not be included.) If we use
  the <a href="http://pubsub-test.appspot.com/" rel="nofollow noreferrer">pubsub-test</a> example and attach a recipient list to each message
  this means a lot of manipulation of the message recipients lists when users
  connect and disconnect friends.</p>
  
  <p>We first modeled publish-subscribe "fan out" using conventional RDBMS
  thinking. It seemed to work at first, but then, since the IN operator
  works the way it does, we quickly realized we couldn't continue on
  that path. We found <a href="http://www.youtube.com/watch?v=AgaL6NGpkB8" rel="nofollow noreferrer">Brett Slatkin's presentation from last years
  Google I/O</a> and we have now watched it a few times but it isn't clear to
  us how to  do it with "dynamic" recipient lists.</p>
  
  <p>What we need are some hints on how to "think" when modeling this.</p>