heres three ways on how i might implement articles having views on wikiverse:
1. i iterate through every article and check which articles has the most views
- advantage: you can see top 10 most viewed
- disadvantage: will defintitely not scale up for large data
2. therell be a popular articles field in the root endpoint the field will contain information about the popular article. whenever someone incremenets a view to an article, itll compare the article someone just viewed to the popular article in the root endpoint if it has more views itll replace the article in the popular article field in the root endpoint
- advantage: im sure this'll scale well, right?
- disadvantage: I CANT DO TOP 10 WATCHMOJO THING BOOOOOOOOO
3. urmmm i actually forgor the third
- advantage: less thinking
- disadvantage: theres literally nothing
4. therell be an additional row called viewers. whenever someone views an article itll do a check server-side to see if someones already viewed it already, then will do the same steps from method 2
- advantage: wohooo! no botting!
- disadvantage: viewing only applies to logged in users
so urmmm please do suggest some other techniques or point out some obvious flaws please thank you :)
1. i iterate through every article and check which articles has the most views
- advantage: you can see top 10 most viewed
- disadvantage: will defintitely not scale up for large data
2. therell be a popular articles field in the root endpoint the field will contain information about the popular article. whenever someone incremenets a view to an article, itll compare the article someone just viewed to the popular article in the root endpoint if it has more views itll replace the article in the popular article field in the root endpoint
- advantage: im sure this'll scale well, right?
- disadvantage: I CANT DO TOP 10 WATCHMOJO THING BOOOOOOOOO
3. urmmm i actually forgor the third
- advantage: less thinking
- disadvantage: theres literally nothing
4. therell be an additional row called viewers. whenever someone views an article itll do a check server-side to see if someones already viewed it already, then will do the same steps from method 2
- advantage: wohooo! no botting!
- disadvantage: viewing only applies to logged in users
so urmmm please do suggest some other techniques or point out some obvious flaws please thank you :)
Comments
There are no comments here yet!
Come back later to see if someone commented something or create one!