I'm trying to understand how XMPP works and I'm much concerned about how do both the protocol and existing implementations ensure privacy.
More specifically, I want to understand how do XMPP servers process the messages sent out by their clients.
While reading the chapter 4 of the book "XMPP: The Definitive Guide by Remko Tronçon, Kevin Smith, Peter Saint-Andre", I got the following note:
Upon receiving the message stanza, the realworld.lit server checks to see whether Alice’s sister is online; if so, the server immediately delivers the message to one or more of her online devices over a server-to-client XML stream (without storing it or otherwise performing much processing on it)
However it doesn't explain the way how the message is temporarily stored, and what it is meant by "performing much processing on it" (sounds vague).
I made a research and I read the XMPP Core RFC, but didn't find enough information.
What I'm wondering:
- Are the messages directly stored within the source server (mapped to the sending client), before forwarding them to destination server?
- Are the messages directly stored within the destination server (mapped to the target client) before forwarding them to the target client, after he becomes online?
- How longer are they stored: are they stored temporarily (and how longer do they remain on server)?
- How are they stored physically: are they in-memory or persisted to disk?
- Are the messages directly flushed (deleted) from both source and destination servers after forwarding them?