Questios on Application like skype

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”
  1. 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.

  2. 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.

The way I design them is I join a ‘notification’ channel (which then joins other topics for the user specifically and such) that listens for such chats and shows the user, in addition I have them join a channel per ‘visible’ thing they see, so if they see the chat list for something then I have them have a channel for it, etc… :slight_smile:

1 Like

Thanks it really helps. Against notification you may need to track which user has’nt read the message.

I display notifications in a G+ like notification panel, they can click dismiss or swipe it away, which sends a message back over the channel stating it is dismissed. Tons of styles you can do. :slight_smile:

1 Like

Suppose user “B” in room 2 sends the message to user “A” who is currently chatting with “A” it means he is not in room 2. So how can I notify like skype at the bottom that message comes becuase call back of room 2 is not available for User “A”

I do that via my notification channel. :slight_smile:

1 Like

Yep its a good thing. I really think now what should I do.