views:

71

answers:

2

I'm building a face-book style activity stream/wall. Using python/app engine. I have build the activity classes based on the current activity standard being used by face-book, yahoo and the likes. i have a Chanel/api system built that will create the various object messages that live on the wall/activity stream.

Where i can use some help is with some design ideas on how the wall should work. as follows:

I am using a fan out system. When something happens i send a message - making one copy but relating it to all that have subscribed to the channel it is written on. This is all working fine.

My original idea was to then simple use a query to show a wall - a simple get all the messages for a given channel or user. Which is fine.

But now I'm wondering if that is the best way to do it. I'm wondering if as the wall is a historical log that really should show "what has happened recently say last 90 days at the most. And that i will use Ajax to fetch the new messages. Is it better to use the message api i have built to send messages and then use a simple model/class/ to store the messages that form the wall for each user. Almost storing the raw HTML for each post. If each post was stored with its post date, object ref (comment,photo,event) it would be very easy to update/insert new entries in the right places and remove older ones. It would also be easy ajax side to simply listen for a new message. Insert it and continue.

I know their have been a lot of posts re "the wall" & "activity" stream does anyone have any thoughts i if my ideas are correct or off track?

Thanks

+1  A: 

This is pretty much exactly what Brett Slatkin was talking about in his 2009 I/O talk. I'd highly recommend watching it for inspiration, and to see how a member of the App Engine team solves this problem.

Nick Johnson
Hi Nick, Yeah have watched that and yes its very useful - i have used this fan out method as described along with the 2010 IO fork join queue process to manage the channels. I was really talking about what to do with the messages/best way to handle the building of them into the wall etc.
spidee
A: 

Also you can check Opensocial API for design and maybe http://github.com/sahid/gosnippets.

sahid