I'm learning pubnub and I read their documentation but I just can't find how to manage a multi room chat box.
By default, a channel can be listened by anyone. Subscribing to it and publishing on it is easy.
What I want is to have a main public room (so far so good) but anyone should also be able to talk privately to anyone else without the risk of being read by other users.
These dynamic rooms would be tabbed and the user should be able to go from one to another.
Another requirement would be that talking privately to someone doesn't kick you out of the other rooms you subscribed to (you can still be notified that a new message has been posted on another room while chatting)
What would be the best practice to achieve this?
- Would I use different channels (created dynamically)?
- Would I use one channel and filter the messages according to their status, pseudo-room id or protagonists?
- Would I use multiplexing (one socket only)?
I need to know the best way to achieve this as the documentation only describes basic scenarios with a single room and there's nothing about this on the internet.
Thank you.
PS: I know PubNub doesn't recommend more than 2 channels at a time (even though I have a hard time finding the explanation of this).
PPS: I'm using punbub with socket.io