Not all messages get to the handler?!

Options
ddks
edited September 2012 in Photon Server
Hi all,

Have been using Photon for quite a while, developed a custom server, master and sub server design. For the most it is all running pretty smoothly but running into the following issue.

When a client send a lot of updates in a short period of time not all messages get to Photon. E.g. Say i have 30 updates (customops) to send:

- If i put these in one single loop
onely 3-4 actually get to the eventhandler inside the sub server.

- if i split these 30 updates into 3 batches of 10 and run them every 50 frames it all works fine.

Is this expected behaviour? Haven't done a full multiuser test but would this hold up as well if there are 50 concurrent users or should i expect more problems again?

Anything i should look at, words of wisdon is greatly appreaciated...

Comments

  • Hi,

    sorry for the late response. I assume that you use UDP (unreliable) - in this case, it is by design that packages might get lost - even if you are only using localhost. For example, this is a very insightful discussion about UDP packet loss: http://stackoverflow.com/questions/7968 ... -localhost

    You have not mentioned your message size - there might be an issue with buffer sizes if your messages are too big. So if you have lots of operations to call, it's good practice to dispatch them often. (As you have already noticed -works better if you split them in smaller packets).

    You should also consider how important your messages are:
    For example, if you are sending player positions that change several times per second, it is rather unimportant that each message is delivered - the position will change again in a few ms anyways. You don't want to waste resources to make sure that this volatile information will be delivered in any case. It's a good use case for unreliable UDP.
    On the other hand, you might have really important messages - for example, if players join or leave games or set game properties. In this case, you might want to send them as reliable messages. We also recommend to use different channels for reliable / unreliable messages.

    If this general info does not help to solve your issue, please give us a bit more info: what kind of clients, server version, network infrastrcture, message sizes, protocol types, server config, a sample piece of code or whatever we might need to reproduce the issue.

    And a final word of advise: we strongly recommend that you run a real load test to see if your scenario can handle the desired amount of users before you release your game into the wild. Photon can handle hundreds or thousands of clients, but each project has it's own bottleneck, and you'll only discover it by a good load test. The good news is that it's often easy to resolve once it is found. ;)