0
votes

Let's say my goal is to create a chat service. I also want multiple, discrete chat rooms.

I am leaning toward using XMPP for scaling / load balancing. I read the article here, and I am looking at

enter image description here

Let's say I want to send a message from one client to another. According to this diagram,

1) The sender sends a message to Sender's XMPP Server. 2) Sender's XMPP Server relays the message to the MUC server. 3) The MUC server determines which server the recipient is connected to and relays the message there.

(correct me if I'm wrong)

Two questions:

1) The article suggests clustering the MUC over several servers. Does this mean a) mirror the MUC server's status over sender and recipient servers or b) turn the MUC section of the diagram into multiple servers, and the sender and recipient servers communicate with that cluster, transparently?

2) When a user first connects to a node, how does the network know which server to bind the user to? Is there a single point of entry machine to delegate this?

1

1 Answers

1
votes

As far as entry point into the system are concerned, your clients will always use default entry points or the one you have specified in your DNS SRV settings i.e. user rcv and send data only via your xmpp server port 5222 (c2s) or 5269 (s2s).

So MUC message stanza flow will look like this (lemme know if i mis-interpreted your question):

a) if Sender/Receiver are both registered at your server

[email protected] <--> myjabber.com:5222 <--> muc.myjabber.com <--> myjabber.com:5222 <--> [email protected]

b) if Sender is @gmail.com user and Rcvr @myjabber.com user

[email protected] <--> talk.google.com:5222 <--> myjabber.com:5269 <--> muc.myjabber.com <--> myjabber.com:5222 <--> [email protected]