I am looking to have a third party program “manage” my Openfire database. That is, I am looking to have another program wrap around Openfire and take control of certain aspects (i.e. roster, group and user account information). How this would work is the program would take in requests / commands (new user creation, new roster items, new group affiliations, and some others) from the users and handle the requests in its own space, and then update Openfire’s database to reflect the user requests.
I thought of two different possible methods of achieving this, and I was wondering if anyone could give insight into which is better (or actually possible). And if neigther are posible, please let me know what would likely be the best way to achieve my goal. And if I have failed to fully explain anything, please let me know of that as well.
- The first method would be to create an XMPP client within the program wrapping Openfire that would have the credentials of the Openfire Admin. This client would work in conjunction with the rest of the code, and whenever Openfire information needed to be updated, the client would send an iq set stanza to Openfire to change the user’s information accordingly (update the user’s roster / group affiliation(s), etc).
- The second method is to have the wrapping program directly modify Openfire’s database according to Openfire’s database schema. I have already started looking into this method, and have noticed that if I directly modify table informatoin, it does not take effect in the admin console until the Openfire server is restarted. I was not able to test if the changes actually took effect, and it was just that the admin console was not updating. With this method, I know that I would need to properly map the information between the program wrapping Openfire and Openfire’s database, and I have already begun looking at the exact sort of information Openfire needs for the tables I am looking to manipulate.
Do either of these plausible? Or do I need to figure out another way of achieving this goal?
Thanks for the help and advice,
Kyle M. Cummings
P.S. In case anyone was wondering, I need to do all of this to incorporate a bigger social sphere than just Openfire that is accessable from multiple client types (i.e. Android, browser, iPhone…).