[jdev] s2s implementation

Sergey Dobrov binary at jrudevels.org
Sat Oct 30 07:22:37 CST 2010


On 10/30/2010 08:00 PM, pablo platt wrote:
> Hi
> 
> I understand that xmpp federation is similar to mail servers.
> There is some kind of verification and stanzas are sent in a fire and
> forget way.
> A server doesn't need to keep track of the presence of users from other
> servers
> or other kind of distributed state except for the actual connection.
> 
> I couldn't find info about how to handle failures.
> Let's say host1.com <http://host1.com> on server1 has user1 at host1.com
> <mailto:user1 at host1.com> and host2.com <http://host2.com> on server2 has
> user2 at host2.com <mailto:user2 at host2.com>
> user1 and user2 has each other on their rosters.
> user1 is already logged in and now user2 is logging in and sending a
> presence stanza.
> host2 pass the presence stanza to host1 with the to attribute and a
> presence probe.
> host1 pass the presence to user1 and respond with user1's presence.
> host1 doesn't remember that user2 is online and the opposite.
> 
> 1.server2 has a power failure and it is back up in few minutes.
> Does host2 need to send offline presence for all its users to hsot1?
> 
No, If user is offline too long, user will see remote-server-timeout
error if it sent any stanza to him.

> 2. server2 is running but the connection to server1 is lost for few minutes.
> When the connection is back, the online users are not in sync.
> How do I handle this situation?
> 
TCP gives you a guarantee that data will be delivered to a recipient.
This problem is occured only if connection was down too long. And the
answer is the same such 1.

> 3. When host1 sends a stanza to a user on host2 that is offline,
> does host2 respond with an error?
> 
It's related on stanza kind and server's settings. If you send a message
you will store it in the offline storage for example. But if you send iq
stanza to a full jid server will return service-unavailable error.

> Is there a doc explaining s2s implementation?

RFC 3920
> 
> Thanks
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> JDev mailing list
> Forum: http://www.jabberforum.org/forumdisplay.php?f=20
> Info: http://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: JDev-unsubscribe at jabber.org
> _______________________________________________


-- 
With best regards,
Sergey Dobrov,
XMPP Developer and JRuDevels.org founder.



More information about the JDev mailing list