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

Your method is correct. You would have a table of user_id, user_following_id, and then select the timeline for user_id in a single query, gathering the latest posts of all the users in your array of user_following_id's including the actual user_id too of course. This should be fine on a normal single server database for a large amount of data.

As for 'billions', yes you will have lots of speed problems. Dealing with big data sets like that is a massive task, one I have never had the pleasure to work on, except once on a very big pensions project long ago, but I was just a junior doing tiny parts of a massive code base.

But working on users to get up to millions is quite a task in itself, and by then you would be in a position to not be working on the project alone in all probability, with hopefully the investment to put into place distributed data servers. For now, I would put the problem of billions away for a while, you may never get anywhere near that problem.

Paul.
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