Best way to handle who is online.

I have a basic T3 app that is a chat app It has the ability to create separate rooms. I am using web sockets and handle messages, etc. and I can track when someone connects, I just am unsure of how I should handle how the person connects. My current ideas are: 1. Just take the id and store it into a object on the server then just fetch it through trpc. The problem I can see with that is the object could become quite large if you have a large number of users. 2. Store who is online at the time in a DB, it would make it so I can easily query through the data without worrying about handling large objects. Only problem is it would be tons of query's to the DB.
1 Reply
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server