hi i have a site which has social elements, and feeds are created for some user activities. As the user base grows, the feed grows drastically.. I am still in search for a way to efficiently delete old feeds. I have some methods which i think still not good enough. ANyone has a better way pls shed some lights. - check for the feeds every time a feed is going to be created, and have a thredshold set, delete those overflow ones THis method is quite resource consuming. Checking the database every time. Not efficient - have cron job to delete overflowed (thredshold still set) feeds everyday in a specific time this method is till bad because everytime the cron job is executing, the site slows down i have checked online for how those big sites handling this problem, like facebook myspace. but couldn't find sth helpful Hope digital point have some good and kind hero to help me out. thanks
Since this is the database forum, I'm assuming that the feed content is stored in a database. Can you explain the structure of your system, it's unclear to me from your initial post. When you say delete old feeds, are you refering to deleting an entire feed, or just an entry in a feed, etc.? Also, are you storing an entire feed in your DB, or generating XML based on the data that's in the database?
yep, everything is stored in db. (mysql) i have a table to store all the feeds created. and have another table to have the relationship between a feed and any user (it shows which user will see which feed entry. One feed entry may be viewable by multiple users) When there's more user activities, the feed table gets bulky. so my question is: when and how to efficiently delete those old feed entries. Just like facebook, those old activities no longer can be seen, i think they probably delete all those.