How can I incorporate status updates into my social network? I hand coded the whole thing myself so I can easily make changes but I'm having trouble with the logic..
The goal is for people to not only be alerted of new things their friend's have done, etc. but also have their friend's new actions, updates, appear in their own profile.. Facebook does it like this and I think it's a convenient way for everyone to see what's new.
One method I considered is when a user performs an action, every single friend of that user has a new row put in the database so when a user visits their profle we can just list loop through the alerts for that person.
To me that seems to be overdoing things. If I have 9,000 friends I don't want 9,000 rows inserted every time I do something 🙂
Also I don't want to see 100 updates from a single user on my profile before seeing updates from another user. I mean they should be ordered by time() or something. This way I'll see an update from one friend and maybe a comment that someone left on my friend's profile in regards to their update and it follows through into my profile since everyone's profile should show updates from their friends, sort of how facebook does things.
Perhaps another method is to have a single UPDATES table or something and every action just gets put in there, with each action coded differently and on every profile show UPDATES where user_id = friend_id or something...
As you can see I'm like a fish here with no idea what i'm doing 🙂
Can anyone offer some advice if they have a clue what I'm talking about? 🙂
Please if you can help me with the logic behind what I want to accomplish, then I can code it myself 🙂 Thanks in advance!