Answer the question
In order to leave comments, you need to log in
Which technology stack to choose for such a site?
In order not to be thrown at once with slippers, I note that I have been thinking about the site for half a year now. During this time, I managed to write the main api methods in php (lumen), and now I am rewriting the front from the second angular to view. But most importantly - I never came to understand how to do some things correctly. That's why I'm writing this question.
Now a little about the site. The functionality is typical, as an example, we can consider the well-known peekaboo. Load, say, 6 million views per day.
Main functionality:
1. Creation of posts with tags
2. Output of posts by tags
3. Rating of posts
4. Possibility of pagination of the best posts (per day/week/arbitrary period)
5. Feed with hot posts. It also comes out in pages.
6. It is advisable to hide posts that the user has already seen when completely updating the page.
The most difficult thing was to make a competent feed with hot posts. The ranking algorithm was taken from reddit:
https://medium.com/hacking-and-gonzo/how-reddit-ra...
It is quite simple, but I don’t have enough knowledge to implement it correctly. Now I settled on the fact that once every 20-30 minutes, the kroner launches the task of ranking posts and ranks them. Let's say this is how the top ten hot looks after completing the task:
#5 - 100 (post number, hotness index)
#1 - 95
#2 - 90
#3 - 85
#4 - 80
#6 (etc)
#7
#8
#9
#10
Then the user requests the best posts and he is given the first five posts: 5, 1, 2, 3, 4. While he is watching them, he completes the task and we get a new list of hot ones:
#7 - 120
#8 - 115
#5 - 110
#1 - 95
#2 - 90
#3
#4
#6
#9
#10
The user requests the second top five posts, and he receives posts #3, 4, 6, 9, 10 in response. That is, he will be sent two posts, which he already seen, and he will miss two posts #7 and #8, because. they are already at the top.
Of course, you can save posts that have already been given to the user, the session number. And then we whine to rake out the first 1000 hot posts, posts that have already been issued to the user, and give the first 20 fresh posts. But for such feats, it seems to me, there will not be enough performance and disk space.
It is also not clear how to store posts already viewed by the user. Not in the cheekbone?
Perhaps php and skul are already outdated and for this task it is logical to use NoSQL and some node.js instead of php?
In general, you need the advice of a knowledgeable architect)
Answer the question
In order to leave comments, you need to log in
1. Ranking by hotness - sorting the ratio of the total number of views over the past period of time.
2. Sampling for filling the user's feed - a selection of ID-posts according to user preferences, along with the desired ranking.
3. Displaying the tape is item 2 + a table of ID-posts read by a specific user (to exclude those already read).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question