google-app-enginechannel-api

Does Googe App Engine's Channel API ensure that the messages arrive in the order in which they were sent?


Let a Google App Engine application be connected to a client via the Channel API. Let the server send messages through this channel in rapid succession. Does the Channel API guarantee that the messages are reported to the Javascript client in exact the same order?


Solution

  • The messages do not arrive in the same order.

    It is very noticeable when sending a large amount of messages, like when doing WebRTC signaling.

    The trick is, as @Mario mentions, to envelope the messages with a sequence and then re-order the messages on arrival.