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.
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.