Skip to content

feat: show online number count#629

Open
zuowendong wants to merge 4 commits into
cuixueshe:mainfrom
zuowendong:feat/online-number
Open

feat: show online number count#629
zuowendong wants to merge 4 commits into
cuixueshe:mainfrom
zuowendong:feat/online-number

Conversation

@zuowendong

@zuowendong zuowendong commented Apr 19, 2024

Copy link
Copy Markdown
Collaborator

relate to #567

效果

image

实现

基于websocket + redis

新增依赖

  • serve: @nestjs/platform-socket.io, @nestjs/websockets, socket.io
  • clinet: socket.io-client

redis 实现在线离线人员的存储
websocket 广播告知前端展现实时在线人数

@zuowendong zuowendong changed the title feat; show online number count feat: show online number count Apr 19, 2024
@baboon-king

Copy link
Copy Markdown
Collaborator

这种 类似长链接,对于前期我们服务器带来压力,这个功能其实对实时性的要求也不高
see #567 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants