Server Side Smack and Scale

Hi,

(Before I start, I know I saw a discussion on this a while back, but I simply can’t seem to find it now… if you know where it is, please point me in the right direction.)

I’m building an XMPP Proxy Server that allows non-XMPP capable devices to publish presence events. They send presence events via HTTP to the Proxy Server, which then maps information in the presence events to a JID and then sends the presence out via the appropriate XMPPConnection.

The problem is the XMPPConnection… or quantity thereof. XMPPConnections are not lightweight, and I can’t imagine a single app server instance being able to maintain hundreds, much less thousands or tens of thousands of connections. So what I need is either:

a) A method by which a single (super) connection with OpenFire will allow me to publish presence and availability for any arbitrary JID.

b) A stateless mechanism for posting presence information to OpenFire.

I have a few ideas, but I also know there are a number of HTTP to XMPP solutions out there (e.g. mobile XMPP clients), so this problem must have been solved. Any input or direction will be much appreciated.

Cheers,

Dan

Hey Dan,

If you just need to receive presence updated via HTTP and simulate like if it came from a client then you can just create an Openfire plugin that provides a new servlet that will get the HTTP requests. You can see the Presence plugin to see an example. The presence plugin is not what you need (i.e. it published information via HTTP - the other way of what you need) but will give you an idea on how to code it. On the other hand, if you need a more complete HTTP solution then you might want to use the HTTP binding available in Openfire. In that case your client will also need to be able to speak HTTP binding language.

Regards,

– Gato

Hi Gato,

I looked into the two options you suggested. The

XMPP Binding is a very robust solution, but is overkill for what I need

(publish only, not 2-way); plus one of the clients is very

unsophisticated and would take a lot of work to make it a robust HTTP

client. As such, I think the Openfire Plugin is the way to go.

I have a first version that simply uses the Presense Router and it seems to be working fine. Thanks, and wish me luck!

Cheers,

Dan

Good luck!

– Gato