0
votes

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?

3

3 Answers

1
votes

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.

0
votes

I'd say it's not guaranteed but it's expected to be so 99% of the time.

In any case, you could give a sequence number to every message sent in the server and check them in the receivers to see if something is still missing.

0
votes

Since it is not being mentioned anywhere that the order of the messages is guaranteed it should be assumed that the messages may not arrive in the order they were sent, which actually makes sense when you think about GAE's scalability.