MidNight send data to all users

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

italianRichy
Posts: 14
Joined: 09 May 2019, 17:24

MidNight send data to all users

Postby italianRichy » 22 May 2019, 13:12

Hello World,
I want to send data to all the users that are on the server, but if I have many users connected at the same time, this would lead to a bottleneck because for every room I take all users, how can I send data to all users of the server without causing a bottleneck?

Would the solution be that the client queries the server? I have the same problem, because all clients would query the server at a given time.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: MidNight send data to all users

Postby Lapo » 22 May 2019, 14:23

Hi,
the server is not going to be a "bottleneck". The main bottleneck is the network, depending on how much bandwidth you have at your disposal, and how many messages you need to send.
However if you want to send a message to all users, then there's no way around it. You need to send a copy of the message to everyone.

All you can really do to is optimizing the message size, making it as small as possible.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
italianRichy
Posts: 14
Joined: 09 May 2019, 17:24

Re: MidNight send data to all users

Postby italianRichy » 22 May 2019, 14:45

Very well, thank you for having raised all my doubts

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 101 guests