I have a question, Is it effective to store online userId and socketId in the database, and also is it effective to store messages in the database directly and emit an event after the message has been saved?
I mean if there are so many users, how will we handle it if everyone sends messages at the same time and we save it directly to the database?
Thanks in advance