powered by Jive Software

Several XMPP client's connections over just one TCP socket

Hello all,

That’s my first post here. Hopefully it will open the people attention to solve some issues and questions regarding XMPPConnection().

I would like to use a single shared TCP/IP socket opened by a high-resource device, in order to simultaneously host the loging, presence and communications of multiple XMPP client instances with different jids (most of them will belong to the same domain but others to a different domain).

For example user1@domain.org/Test1, user1@domain.org/Test2, user2@domain.org/Test1-u2, user3@anotherDomain.org/Test3-u3, etc… ,would all share a single client socket connected to the same server, over which auth and presence stanzas for the multiple endpoints would be passed. This socket would be simultaneously able to handle inbound and outbound stanzas on behalf of the multiple XMPP endpoints it hosts.

After discussion, I’m thinking to modify the client-side-library and more specifically the class XMPPConnection():

When a new client or intance (JID) wants to connect against the server, there is a high-resource device which manages the connection on behalf

–> test if there is any TCP-5222 connection already opened with the server --> if so, perform sothing like a fork()

and deals with stanzas as it was a new client --> send/receive outbound-inbound stanzas by this new “process handler”…

My questions:
Does it enought or I have to modify also the Server side?  Note that the Server receives
a login connection from the same IP:Port. Is it anyhow of NAT the solution?

If so, and if I can’t not follow the server standards I will drop this idea since we need inter-XMPP-servers interopaerability

and not a simple closed solution.

I’ve been reading the forum entries and many people talks about Connection Managers…it is possible to have one in the client side?

or somehow imitate it’s behaviour in order to have one “hard” connection?

Annother colleague suggested me to perform federation upon the entities which share the same domain. Does the OpenFire support this Federation

in order that the server assum that each socket matches to several instances rather than only one as It has been developed?

Well that’s enoght for today thanks for your reading and hopefully also for your replies, suggestions.

Diego.

Hi,

From your description, it sounds exactly like what the Connection Manager does, but I’m not sure how it works exactly. I would think since it is a standalone piece of software that opens a socket to the Openfire server that you could run it on any machine in your network and consider it a “client” in that sense. I think using a Connection Manager and/or writing a server plugin would be an easier route, as you already mentioned. Both of those applications are designed for huge scaling, whereas Smack is designed for a single user to use a single socket. You might be able to get more help in the Openfire forum on something like this.