How to Implement scalable Notification System with Socket.IO

Hello Developers,

I am about to implement real-time notification system in my project with the help of Socket.IO . So I am looking for some great advice from Expert how I can implement it more efficient way. I am using NextJS at my front-end.How can I send notification to specific person when somebody react on their post, like (like, comment etc) ? Should I emit event to that specific where post owner belongs to ? I dont understand how can I implement such thing. Please advice.

Well I’m no “expert” but I have used in some small games. So generally speaking, when a user connects to your site, the sock.on(“connect”) event will give you an object that you can the send messages through via socket.emit. However if your trying to send messages when the user is not currently on the site, you would have to use notifications and that’s a whole different can of worms that has nothing to do with sockets.