So I'm currently building an App and I am trying to think about the most efficient way to do the networking.
I'm trying to create a cross between chat rooms and forum posts, in that you post a topic and people will chat about it. I want this chat to be in realtime, and users will be able to swap between many different topics (chat rooms) quickly.
This is essentially just a simple chat room app, which as you know, is extremely easy using SocketIO. What makes me nervous however, is the scalability issues. Are there scalability problems with having many users subscribed to many SocketIO rooms?
Generally with a chat room application, a user with only be active in one chat room at a time, and therefore there won't be that many rooms in total. In the system I'm designing, there could potentially be thousands of these topics (chat rooms) being updated at the same time, and a single user could be active in many of them at the same time (every time you are creating a new forum post, you are creating a new SocketIO room).
How best could this be solved? I'm thinking of only destroying all the SocketIO rooms for topics that have not been updated in over an hour or so, storing them in a database with all the information ready to re-create it if it gets updated again? Would this be a suitable approach?
Has anyone encountered issues like this before? I feel like I am going about this the wrong way and shouldn't even be using web-sockets for this.
Update:
I'm being stupid, I just realised you would only require socket.io messages to be sent whilst the user is browsing a topic, not for all topics.
I would however need to push a message telling users a topic has been updated (someone has commented etc)