Multiple Instance vs Single Instance

Dec 3, 2014 at 6:46 PM
Hi Team,

I would like yo know your point of view about our approach. We are developing some apps where we decide to use websocket to broadcast messages. Today we have one instance of superwebsocket where every user will connect, then the user can send message to other user connected or group of user connected. As we have one instance, we are managing all the dispatcher behavior in backend.
There is another option, wherein we can handle one instance of superwebsocket for each communication, so for example if an user wants talk with other user, we will create a new superwebsocket instance to make this possible, so , the dispatcher behavior will be handled by supersocket instance.

We are looking forward be 100 users interacting at the same time in different amount of groups

I appreaciate your thought
Dec 4, 2014 at 4:21 AM
Actually, I cannot understand your question.

One instance is enough for multiple client communications. Why do you want multiple instances?

SuperWebSocket just provide a communication channel to you, the high level business depends on you.
Take online chat as example, when you get a message from one session you can find the target session and then send the message to the target session.

For chat room/group, you can define your group containers and put session in them, then you can find sessions in one group easily and then broadcast messages to them.
Dec 4, 2014 at 6:02 PM
Edited Dec 8, 2014 at 10:29 PM