Friends I am going to plan an application like skype. I have few concerns of multiple rooms on one socket connection.
Suppose I have 200 friends online. In phoenix socket when a person joins a room he will be able send and recieve all message (send by other users in a same room)
My question is in this scnaioro .
I am chatting with my Friend "A"
"Myself" and "A" both joins a room "1" , we both are sending and receiving messages successfully.
My other friend "B" sends me a message, I have not join room:2 yet. I won't going to receive alert and notification from "B".
My question is that what should I do. Should I join multiple rooms at the same time according to list of my online friends ? in this case alot of room will be joined by myself and other friends. is there any performance issue.Because maybe my online friends count may b more than 200 to 400. and also when any friend become online or offline, I also need myself to join and leave rooms continuously.
Another scenario is, I should keep only one room with the name of chat. I should write a SubChaneel Module which contains my logic. each message will be broadcast with subchannel param. My javascript and ui will control that which message belongs to which user's (friend's) room. Active chat (Friend) will be appended and not active (online) user will be also append in their hidden ui element.