I am using NodeJS,Scoket.io
I am trying to send notifications like Facebook. If there are 1000 Users and User A have 50 friends then Notification is send to those 50 Users. I do not want to broadcast for all Users
What is the efficient way to do this ?
If a user has lots of friends then you can have all of those friends listening to a namespace or room for that user.
The explanation and example is here: http://socket.io/docs/rooms-and-namespaces/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With