--
Brett Morgan http://brett.morgan.googlepages.com/
- display name
- who they are following
- who is following them
- a merged list of the tweets of the people they are following
- a list of recent tweets
I'd be tempted to store these lists pickled in string properties,
because I don't see any need to run queries on these fields.
I'm redundantly storing both follower and followee lists. This is how
I am avoiding the need to do database joins. It does mean more work on
doing add and delete follow relationships.
This means that the updates (add a follower, delete a follower and
post a tweet) are going to be expensive, as you are updating multiple
entities. Especially in the case of posting a tweet for a popular
person. (Eggads, contention issues. Ugh)
But, on the flipside, displaying a person's page with the list of
tweets relevent to them is cheap. Which is important, because this is
the one query you want to poll regularly. Like, every second or so.
If we had background processes I'd migrate the tweet updates to a
background process with communications via a queue.
--
Brett Morgan http://brett.morgan.googlepages.com/
http://code.google.com/appengine/docs/datastore/transactions.html
--
Brett Morgan http://brett.morgan.googlepages.com/