5

请教下各位大佬,如何实现例如半年最常访问某些功能的需求

 2 years ago
source link: https://www.v2ex.com/t/840357
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

请教下各位大佬,如何实现例如半年最常访问某些功能的需求

  Mroldx · 9 小时 48 分钟前 · 480 次点击

比如: 网易云的最近一周的听歌排行,最常访问某几个报表等等 有大概的思路吗, 技术栈: java ,redis

4 条回复    2022-03-15 09:41:39 +08:00

vance123

vance123      9 小时 18 分钟前 via Android

每次访问的时候打个时间戳,查询的时候过滤排序一下,这样行吗

4ark

4ark      8 小时 44 分钟前 via iPhone

visitant

visitant      8 小时 32 分钟前

看业务需要什么,可以记录每次访问功能的信息(后续走 OLAP 处理出需要的数据),也可以抽象一下把每次访问功能都聚合到一个计数器上。

rbe

rbe      40 分钟前

都指明 redis 了,难道没有想到 zset 吗 😁

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK