powered by Jive Software

Openfire background tasks

I’m totally new to Openfire (some backgrounds with other realtime databases like Firebase). I’m wondering if Openfire could be used for an IoT application, where a server (Openfire?) should poll some analog values and then send notifications to connected clients when predefined events occur. Maybe that’s not Openfire’s job out of the box, but plugins programmed by me could be the solution. Any suggestion is appreciated.

Thanks in advance, regards

You’d certainly need to write your own plugin to handle this, but I’d suggest Openfire is probably quite suited to the task.

I’d suggest using the pubsub mechanism built in to Openfire (https://xmpp.org/extensions/xep-0060.html)

Your custom plugin would create pubsub nodes, and when something of interest happens, publish a message to that pubsub node.

Your clients would connect to Openfire, and subscribe to the pubsub nodes they are interested in. They would get a message when your plugin publishes to one of those nodes.

At this point you’re merely implementing an MQ type mechanism over XMPP. But where XMPP has an advantage over MQ is that your plugin can also response to custom IQ ‘get’ requests (https://xmpp.org/extensions/xep-0050.html) which would allow your clients to discover which pubsub nodes represent what sort of Thing, with any associated meta-data of interest to your clients.


Many thanks Mr gdt, I will follow your suggestions and dig deeper into Openfire