group chat
group chat
What's the best way to implement a group chat functionality?
Hi. Well, it depends of if you want or not everyone to see everyone's else chat.
If you want everyone to be able to see everyone's else chat, well... that's not advisable... but i think the best way will still be only 1 room for handling everyone. To improve the performance you would need to disable some of the events and limit the max rate an user can send a msg.
If you only want to group people in smaller rooms, but still be able to change between rooms, the best way is to have many rooms (with not too much users each) and all in the same room group (in case you want to receive updates from the other rooms such as user enter and leave, etc).
But this also depends of what other features will you add to the chat...
If you want everyone to be able to see everyone's else chat, well... that's not advisable... but i think the best way will still be only 1 room for handling everyone. To improve the performance you would need to disable some of the events and limit the max rate an user can send a msg.
If you only want to group people in smaller rooms, but still be able to change between rooms, the best way is to have many rooms (with not too much users each) and all in the same room group (in case you want to receive updates from the other rooms such as user enter and leave, etc).
But this also depends of what other features will you add to the chat...
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
jamalsoueidan
- Posts: 153
- Joined: 15 Aug 2011, 16:33
There is two options you can go for.
The easy one is.
10 tabs for 10 rooms, some rooms for only 2 and other rooms for 20 users.
So people who want to talk alone can join room with limit 2 users.
This is easy task and you can do it easily.
The hard part to make it dynamic, then you need more time and code
The best thing to do is to start with the easy task, when you are done with the interface and working chat rooms.
BY THEN you can start working on advanced chat while your other simple chat is LIVE online
The easy one is.
10 tabs for 10 rooms, some rooms for only 2 and other rooms for 20 users.
So people who want to talk alone can join room with limit 2 users.
This is easy task and you can do it easily.
The hard part to make it dynamic, then you need more time and code
The best thing to do is to start with the easy task, when you are done with the interface and working chat rooms.
BY THEN you can start working on advanced chat while your other simple chat is LIVE online
---------------------------------------------------
Jamal Soueidan
http://linkedin.com/in/jamalsoueidan
Jamal Soueidan
http://linkedin.com/in/jamalsoueidan
hi. So for the public tab, you can create rooms with around 20 - 30 people.
For the private tab, you dont really need to create a room, as you can easily send private messages to users between different rooms.
For the group tab, you create smaller rooms and, if the group chat is private, you set a password to that room, so only people known people can enter.
For the private tab, you dont really need to create a room, as you can easily send private messages to users between different rooms.
For the group tab, you create smaller rooms and, if the group chat is private, you set a password to that room, so only people known people can enter.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
jamalsoueidan
- Posts: 153
- Joined: 15 Aug 2011, 16:33
Yes, you just subscribe to the other room or zone 
---------------------------------------------------
Jamal Soueidan
http://linkedin.com/in/jamalsoueidan
Jamal Soueidan
http://linkedin.com/in/jamalsoueidan
Hum... Sorry on mobile now. Can you post the steps u're doing?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
jamalsoueidan
- Posts: 153
- Joined: 15 Aug 2011, 16:33
Example:
getApi().subscribeRoomGroup(user, "roomName");
getApi().subscribeRoomGroup(user, "roomName");
---------------------------------------------------
Jamal Soueidan
http://linkedin.com/in/jamalsoueidan
Jamal Soueidan
http://linkedin.com/in/jamalsoueidan
Hi. Please check the docs before posting.
In the PUBLIC_MESSAGE event details, you can see that there is a property called Room, which is the Room object from where this public message was originated.
I know it says that it is "An object representing the Room at which the message is targeted.", but that's because when you send a public message, you choose to which of the joined rooms you want to send it to.
In the PUBLIC_MESSAGE event details, you can see that there is a property called Room, which is the Room object from where this public message was originated.
I know it says that it is "An object representing the Room at which the message is targeted.", but that's because when you send a public message, you choose to which of the joined rooms you want to send it to.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.