Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
JBteam #1
Member since Mar 2006 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: Implementing an IM server
Hi,

AS part of a project we need to implement an IM server using the agsXMPP SDK, so we decided to extend the server example.
Now our main problem is implementing the messages routing.
1. Can you please explain or give an example of how this should be done?

I think we have 2 options: one, if the 2 clients are registered to the same server (ours, in this case the server needs to send the msg to the other client), and the other, if they are registered to two differend servers (then our server needs to send the msg to the other server) .
2. how do we know to find the other client's/ server's socket to route the message to?


hope the questions are clear...:)
thanks
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

there is also much more to do ;-)

If both contacts are on the same server then the message gets routed internal. But the routing also depends on many other requirements.

  • if the contact is offline then you have to store the message in your offline storage and deliver it once its back online
  • if the message gets send to a full Jid then this FullJid must be online and the message must be routed over this connection
  • If the message gets send to a Bare Jid you have to route the message according to the rules specified in the XMPP RFC by priority

If the receiving contact is on another you have to route the message over a s2s connection. Setting up s2s connections is also not trivial.

You can find some other threads in this forum which explain the routing in detail.

Alex
Alexander Gnauck
AG-Software
This post was edited on 2007-02-12, 23:19 by Alex.
Avatar
JBteam #3
Member since Mar 2006 · 9 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex and thanks for your response.

Now I understand how should the internal messages be routed.
I still don't know how to set up s2s connections.
Can you please explain how to do that, and which of the libraries of the agsXMPP support that?

And another question:
Other part of the project is implementing a recorder agent, to which the IM server routes the messages too.
actually this agent is like a server because it waits for incoming messages from the IM server.
do you have any implementation tips  for that?
can you please explain what does a component connection serve for? can we use it for our purpose?


Thanks a lot,
JBteam
This post was edited on 2007-02-13, 10:47 by JBteam.
Avatar
Alex #4
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello JBteam,

server2server connections are not build i the SDK. You have to implement them yourself. We also can do that on part of our professional services.
There are currently many different ways of implementing s2s connections where the most common is still dialback. Server Dialback is explained very well in the RFC 3920 document.

component connections can server many purposes. But i think components are exactly what you are looking for.
If you send the messages to Jid of your component then the server is routing all the messages directly to your component.
There is a basic component example in the samples directory.

Alex
Alexander Gnauck
AG-Software
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 SDK Support RSS