[ejabberd] ejabberd and reliable message delivery

Magnus Henoch mange at freemail.hu
Tue Jun 17 16:10:28 MSD 2008

Konstantin Khomoutov <flatworm at users.sourceforge.net> writes:

> While many people (including me) think that there should be some 
> /required/ mechanism for transparent reliable transportation of 
> messages, TCP is completely out of place here because it just offers a 
> transport layer for XMPP: TCP ACKs acknowledge nothing more than ranges 
> of bytes in TCP streams. The TCP subsystem doesn't care about the 
> structure of the data it carries. So if we only rely on the TCP stack to 
> implement such "reception acknowledgement", the granularity of it will 
> be the whole TCP stream, i.e. a given TCP session either completes OK 
> (and then all the traffic was received by the remote) or ends with an 
> error (in which case we know not all the traffic  was received, but 
> can't tell which part of it was, so we again have to use some 
> out-of-band way of synchronization after reconnect -- think of HTTP 
> partial transfers for instance).

Actually, the TCP protocol itself more or less solves this problem - you
get acknowledgement of exactly which bytes have been received.  Some
acknowledgements may be lost in transmission, but at worst you will send
some data twice.  Unfortunately, popular TCP implementations don't
provide this information to applications.

JID: legoscia at jabber.cd.chalmers.se

More information about the ejabberd mailing list