Datagram Size

Options
bball13
edited August 2011 in Native
Right now, we’re also using Photon in order to communicate with some web services to use a persistence layer that is currently implemented in another server.

The workflow is the following:
* Client send an event for ask some information through the server
* Server receive the petition and ask to the ws the info required
* Server receives the answer of the ws (JSON String ) and introduces the answer in an entry in the
hash table that is returned to the client.

* Client receives the hashtable, get the content data and do some internal stuff.
The problem that we are facing is that sometimes the result of the invocation is longer than 1200 bytes, and in that case, the event in the client is never triggered.

As I said previously, the ws services return some JSON strings and if the size is below 1200 there’s no problem.

What do you think that we can do to assure that the whole string return??

Is precise to code something else in the server or client to achieve that?

At this moment, we are thinking in change the focus and divide the work in various events sent from the client and manually reassemble the info in some data structure if Photon cannot provide that functionality.

BTW, our current work is heavily based in LiteGame , Lite and LiteLobby

Comments

  • Tobias
    Options
    Sending a few kilobytes of data should not be a problem. There are limitations but it's not 1200 bytes.

    Yesterday I found a bug in the client library, which is not yet published. It could be a very similar problem.
    Which client SDK / library are you using (client platform and SDK version)?
    I have to test and fix.
  • I found the 1200 number in this link http://developer.exitgames.com/photoncl ... rmancetips

    We run tests some tests and 1198 bytes are sent Ok.

    If we send 1201 bytes then the receive event is never triggered.

    Our current server is
    ExitGames-Photon-Server-SDK_v2-6-0
    And our client is
    Photon-Win32_v6-5-3_SDK

    Thank you
  • Kaiserludi
    Options
    Hi.
    This is a known bug of the Marmalade Clients, which has been fixed a few days ago in the 6.5.5 release:
    http://blog.exitgames.com/2011/08/photo ... d-windows/
    However this should not happen with the Win32-clients.
    I will try to reproduce this on Win32.

    EDIT: Just tested it and it works for me: Even getting a lot more than just 1.200bytes is no problem at all.

    However, are you calling service() often enough?
    1.200 is our max MTU, meaning a single packet can't be bigger than that(and this already includes overhead for protocols, etc.) -> therefor Photon will split the operation, response or event into multiple packets before sending and reassemble them after receiving. Every single fragment will be acknowledged by the receiver and there is only sent one ack per service()-call (as service() calls serviceBasic() and sendOutgoingCommands() both only once), so for big data you will have to call service() more often.
  • Thank you, I downloaded the 6.5.5 sdk client and now Im able to transmit a few kbs, thanks for the support