[JDEV] guarantee of order?

Oliver Jones oj at world.std.com
Fri May 25 08:26:37 CDT 2001


At 07:49 AM 5/25/2001 -0400, David Iodice wrote:
>The underlying set-up of the internet does not guarantee the
>ordered delivery of data.  Protocols like RTP provide
>mechanisms within their protocol headers to manage ordering
>of packets received.

It's true that IP doesn't guarantee packet ordering, but TCP does, and all 
client-server connections in Jabber use TCP connections (AFAIK).  So we 
know that Jabber messages from any client to a server, or back again, will 
stay in order.  It's the server processing that might re-order messages, 
not the network.

Dustin Puryear wrote:

>Is there a guarantee that if I send messages in the
>order of a, b, c
>that the recipient will receive the messages in that
>order?

Peter St Andre's response to this question ... "no" ... seems to me 
appropriate.  It wouldn't be wise to build a system on top of Jabber that 
assumed messages would always stay in order, because an enormously 
scaled-up Jabber message relaying system might break that assumption one day.

I should think that series of messages needing ordering should carry a 
sequence number someplace in their payload.  The receiving entity should be 
responsible for reordering messages if they were received out of order (and 
dealing with missing message sequence numbers if any are detected).

Ollie Jones




More information about the JDev mailing list