Page 1 of 1

[SOLVED]Disable Zone wide events, still not implemented?

Posted: 01 Aug 2011, 20:24
by sHTiF
Hi, we need to disable some of the Zone wide events ROOM_ADD for example, this is crucial since we create/destroy a lot of rooms for a turn based 2 player games. In this scenario this floods a lot of users with unnecessary data and generate traffic spikes, each time 2 users start a game ROOM_ADD is dispatched to thousands of other users unnecessarily.

We solved this in SFS1X by disabling these events and dispatch only custom made ROOM_ADD events to users that need them (those 2 that are going to work with that particular room) so the client API isn't broken.

I found this option in config file as well as admin but it says not implemented yet. When can we await this functionality since this renders SFS2X unusable in our scenario when comparing to SFS1X.

Thanks.

[EDIT] Also creating this event by custom code and dispatching it only to valid users now can be kind of tricky since the packet isn't transparent and we don't know how it looks. Any ideas?

[EDIT2] Just a brain storm, will the client API broke if i don't dispatch room creation from server and do all the join/leave implementation on the server side?

Posted: 01 Aug 2011, 21:27
by jurekf
ROOM_ADD is only sent to users who are listening to that room group.

Your users should unsubscribe from the room group if they no longer wish to receive the ROOM_ADD events.

http://forums.smartfoxserver.com/viewtopic.php?t=8090

Posted: 02 Aug 2011, 08:24
by sHTiF
jurekf thanks i am aware of this feature however this would mean that each pair of users would need to have their own room group to listen to their particular room and i don't think that going this route at this level of room fragmentation is a good idea.

From latest tests it seems that i need to:
1. create room server side and disable the client event dispatch
2. join room server side to avoid client API inconsistency after non-received ROOM_ADD from 1.
?. The question is if the client will work ok after it receives ROOM_JOIN to a room that it doesn't know about. (It seems to be working)

This way everything works perfectly without disabling any zone wide events.

Posted: 02 Aug 2011, 08:59
by jurekf
In the first message in the link I gave you Lapo states that you can join any room even if the room is not in your room list. The room list doesn't affect any other functionality.

I would turn off subscriptions entirely (perhaps by creating the rooms in a non-subscribed group) and just have the server create the rooms, then send extension messages to the players to join once the room is ready.

Posted: 02 Aug 2011, 16:24
by sHTiF
Yep exactly so you can omit the subscription/room group implementation entirely, no need to play with that. I simply don't dispatch the room creation from server so users even thou it is a default group room. After that 2 players are joined to that room by server side script both get the ROOM_JOIN event and everything works smoothly.

So as i see it unless we want to work with roomlist on client side there is no need to have ROOM_ADD ;)