RaiseEvent() in Master Server?

Options
ASilverblade
edited November 2012 in Photon Server
Hey, I'm trying to run a single universal server as a concept, is there any way to force the Master Server to use RaiseEvent()?
I can't think of any other way to send an event to all connected peers using unity.

Comments

  • dreamora
    Options
    You can not send messages to all connected peers, that would be an overkill.
    also when you join a room you disconnect from master anyway.

    If you want to communicate to all users you best use a specialized backend for such a purpose. Especially when its meant to be for chat, better build upon IRC or XMPP
  • Hey thanks, I guess I have to learn more about Photon, the app itself isn't named as a Master server but then I don't know how they are identified yet. xD
  • Kaiserludi
    Options
    The master server is responsible for matchmaking, for getting lists of open game rooms and for balancing the load betwen multiple game-servers, but not for any client to client communication. Players can only communicate with other clients inside a room and rooms ca only be opened on game servers as all ingame networking is going on in rooms and that ingame networking is producing most of the workload, that the servers ressources like CPU-power, amount of RAM and network bandwith have to handle, so if we would allow this kind of stuff on the master server, than it could become a performance bottlenet very quickly and no matter how much more gameserver you would add, you would only be able to have a very limited amount of players online at the same time, before you get into serious perforamnce problems.

    You could however just let all players join the same room and use it like one single huge lobby. Every client could send events to everyone else in that room. If you host you own Photon instance instead of using the cloud, then you could even run this gameserver on the same hardware like the masterserver.
    However be aware, that if everyone is always sending to everyone else in the same room, the amount of messages and traffic, going around, increases squred to the amount of sending players in the room, so the limit of players, where the server can't handle anyone more, will be reached a lot sooner when everyone is in the same room than when you only have a few players per room. Also with everyone beeing in the same room an everyone sending to everyone else the traffic per player quickly becomes astronomical an your clients won't be handle to handle all the incoming event anymore, after you have reached too many plaers in that room.
    You could handle these issues by just not sending to everyone else in the room, but just to certain players, but in that case you could also just let these certain players together join a separate room.
    So the only scenario, that I can imagine, for which it makes sense to send an event to everyone on the master, is when the masterserver itself wants to sent it, but the master itself can just send it to the lobby, where it already does this for informing the client about open game rooms. You would then add the according code to the master server.