Im using Pusher SDK for android which is split up into Java for client and servers. My aim is to make a chat feature between two groups, A and B. These are the rules
Members may only talk with people from the opposite group
Only members of group A can initiate a chat with group B
- Estimate of 10 people in group B and 15,000 in group A
- Being an app, active users % is assumed low and those who chat even lower, and say at a given time I dont cross 50 concurrent users (based on several assumptions and calculations)
- All chats are private one-to-one between user from A and B
I will be taking the appropriate price plan as per the scale of course. From what I have read, in Pusher, in order to publish on a channel, you need to be authenticated and subscribed to it as well. Does this mean I will require ?
num(channels) = num(groupA) * num(groupB) +1 channels (one global channel)
Using a global channel, whenever a private chat needs to be initiated, a message will be sent on it to the two users prompting them to subscribe to a unique channel made for them on the fly (probably by concatenating their UUIDS) in which they can continue their conversation.
Channel ="global", event="userId1" , message="subscribe to channel userID1userID2" (same for userId2)
Is there a more efficient way to develop my app using Pusher? Should I continue down this path? If the numbers seem strange, think of it like a customer care service type scenario where the number of users far outweigh the executives but the interaction is not that often.
Thanks in advance !