this post was submitted on 08 Oct 2023
6 points (87.5% liked)

Web Development

0 readers
1 users here now

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

Hello, I'm developing application which uses websockets for chatting feature.

I was wondering what is best way to store all client handles in server side. Every tutorial (eg. this) just says to store in some form of map. I figured that in large commercial apps list of clients would be rather high and I wondered if storing it on heap is actually valid implementation or if some other solutions like caching dbs like redis are used.

What's your experience with that?

you are viewing a single comment's thread
view the rest of the comments
[–] towerful@programming.dev 1 points 1 year ago

Socket.io is abstracting away the client connection details, so is doing the storage itself.

Socket.io might not be available for the chosen language, socket.io might not be suitable for the project, some people want to develop things themselves.