2008/7/15 Marco Schierhorn <[EMAIL PROTECTED]>: > Hello Symfony friends, > > we are running an online community with 20.000 member currently. > We are just nearly finished with developing a new version written in > symfony. > Now i want to implement a facebook-like newsfeed. There should be different > kind of entries like > " XYZ uploaded new Album Pictures", "Karl, Heinz and Oliver are now friends > with Theo", "Heinz uploaded a new profile picture", "Karl is now thinking > about travelling" ( <- the users have options to post new status messages > like on facebook or twitter ). > My question is what would be your approach for a good database solution for > this? What would your tables and relations look like? First i thought about > an easy solution like creating a table with an primary id, the user id, a > date field and a text field. In the text field i could put the newsfeed > message. But what would be with a message like this -> "Karl, Heinz and > Oliver are now friends with Theo". It should sum the people who are new > friends to someone. > So, i hope there is someone who can help me :-) > > Cheers, > MS
I for one wouldn't generate the news feed on the fly from the database at all. I'd schedule news feed generation and also embed hooks in current code to trigger/encourage news feed regeneration based on certain non-frequent events. Run this kind of processing on a separate slave database server to prevent the read load affecting writes to the main site. Feeds could either be stored as flat files for reading and displaying, or as xml that's translated on the fly with a bit of xslt, or the latter method stored in a db field somewhere. Food for thought? Steve Daniels Steve --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
