There was once when we needed a LAN chat server. After hunting located Openfire which is an XMPP implementation. I did have the knowledge of it being an Open stardard but thats all i knew then. That was more then a year back. Now we have a dozen servers across the city and all running OSS software on a medium grade desktop machine hardware. We use the same server to chat with all the staff and archive messages.
After installing the second server, I knew, it needed a self health reporting system so we sitting in the moon can see if a problem is developing or even the reason for a problem. There are all sorts of problems that come on servers that are not in a protected space and without a stable internet or network connections. The first idea was simply to make a webpage and dump vital stats. But who the hell will go to a dozen IPs for checking if it is fine. Thats where I knew, my Openfire XMPP was the key for a fantastic new way of realtime monitoring and much more.
Just like any chat servers, it also supports making rooms. These rooms can be joined by anybody and can simply see the activity going within. Thats the key. I created a health-check room. I developed by entire stats gathering core and piped it using XMPPHP library into the targetted room. Then scheduled a script to run every 5 minute. Now the result is that my room can be joined by any person who wants to monitor the current stats. The stats gathering core has been scheduled in every installation with a gap of 30 seconds. Therefore, all servers send their reports in a gap of 30 seconds ina continous stream within the room.
The above practise was used perfectly till I realized something more. Openfire has inbuilt support to archive messages. Therefore the stats was not parsed with details instead left as is within its Mysql DB. The same DB later was later also the point where remote comman output stream was sent to. Today we have 3 rooms for realtime stats, health stats and one exclusive realtime room for test cases, runtime errors in PHP/Mysql server. This is far better than RSS fees since it refreshes itself automatically in a stream and sourced from the servers itself. Far easier to use. An RSS feed was also made just for my mobile which parsed data from XMPP archive DB.
My favorite XMPP client is PSI. Its sleek, java-less (which means loads faster with less RAM) and with better UI. XMPPHP is a great library to access and conduct all operations using the standard. It happens that its docs don’t have everything it is capable of. I can share some of my code on request, specially the groupchat code which was not easy to locate.



September 9th, 2009 at 17:50
dear boss, that what u did.. u rock everywhere, but where is mine name in XMPP installation process…