Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
beekay #1
Member since Sep 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: server to server communication
Hi,
I've been using AGSXMPP on a couple of my XMPP servers for a while now. I've stored all presence and user data in the DB. But the onlt downside was users connecting to one server wont be able to see users on the other servers. So, I've modified the design to store user whereabouts in the DB and use timers and poll the presence from db and send it to users in that servers. This works very well. However im curious to know how i can broadcast this information to users in the other server without hiting the database.

Is implementing server to server communication the right way to do it? or is there something else that needs to be done? Please advice.

Thanks
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you please elaborate your question? I don't understand exactly what you are doing with agsXMPP. Did you wrote a server based on agsXMPP or clients?

Alex
Avatar
beekay #3
Member since Sep 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
I have used the AGSXMPP library both on the client side and the server side. Im not concerned about the client side however though. On the server side, we have a couple of servers that listen one on port 80 (for people who cant connect to 5222) and one on port 5222. All user session data and whereabouts (on which server a particular user is) is stored in the DB. Presence is shared across servers by fetching related info from the DB with the help of timers. So are the chat messages across users connected to different users. But there is significant delay in relaying messages in this fashion.

Initially (when messages not stored in DB), i had opened XMPPCLIENTCONNECTION from one server to another server to send messages to users in other servers. But that dint seem to work well (as i had to open and close connections each time and had to wait for say 3 seconds everytime i do an OPEN). In this model, i had treated each server to be a client while broadcasting messages to another server. So, in essence there would be two client connections one from A to B and another from B to A. But I know this is a very ad-hoc solution and am curious to know how to implement it better.

Let me know if you still dont understand. I'll try to explain it better.

Thanks
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
ya, I understand what you are doing. But this is not compliant with the RFCs. Server to server connections (s2s) are defined in the RFC 3920 and RFC 3921.

When you have a custom server which is not connected to the federated XMPP network there is no need to implement the RFCs for s2s connections, but this protocols are proved and well designed. Implementing the s2s protocols is pretty complicated, but I think the best solution.

Regards,
Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS