Welcome Guest, Not a member yet? Register   Sign In
Best way to store user activities
#1

Hello!

I'm creating a website where users can put like to a post, where they can write a post, where they can put dislike to a post and so on. I'm writing also the "timeline" algorithm. I must write an algorithm that selects foreach user the posts to append to the "wall", like facebook.

So I thought to store the user's activities, like the like action, the dislike action, the comment action and so on. So which is the best practice? I thought about creating a table and store in it all activities, but:

EXAMPLE: I've an array of user's id like that: 
PHP Code:
$ids = array(234); 
suppose that my id is 1. I follow the user number 2, number 3 and number 4. So foreach user that I follow I'll search some activities in a time range and then I'll insert this data to my timeline. So, If I had millions/billions of data? Could there be speed problems?

Maybe you can reccomend me something that does not come to my mind ;P

Thank you!
Reply


Messages In This Thread
Best way to store user activities - by theedo - 12-06-2017, 09:38 AM
RE: Best way to store user activities - by PaulD - 12-06-2017, 11:36 AM
RE: Best way to store user activities - by theedo - 12-06-2017, 01:18 PM
RE: Best way to store user activities - by theedo - 12-07-2017, 04:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB