powered by Jive Software

Archiving delay

I have configured the Archiving plugin with a MySQL setup and everything seems to be working fine. However, there is a delay of about 10 seconds between a message being sent and it actually archiving to the ofMessageArchive table. I imagine this is due to some sort of cache. I am wondering, though, if there is any way to eliminate that delay? I do not see it in any of the archiving setup options.

I am creating a chat library spawned from JsJaC and have been trying to get a “history” of one-on-one chat working so that it can be reloaded between page refreshes. Cookies can’t store enough information and saving the information through something like an AJAX call doesn’t scale well. If there is an alternate way to do this (aside from the Archiving plugin and querying ofMessageArchive on page load) please let me know.

Hi mlerch,

That delay is a result of the monitoring plugin waiting to do batch inserts so it can try to minimize the amount of time it has to hold a connection open to the database. That delay is hardcoded in the monitoring plugin so the only way to change it would be to alter the code and rebuild the plugin but making that sort of change may affect the overall performance of the plugin and Openfire.

I’m not sure if I understand exactly what you’re trying to do but an AJAX solution should scale really well since if you are only refreshing a small portion of page, not the entire thing. In your case it sounds like you should be storing the history of the chat in the page itself and only add to it as needed, rather than retrieving the entire history of the chat every time a new message needs to be displayed.

Hope that helps,

Thanks for the info.

I was able to overcome the limitation by using Open Archive instead, as it commits immediately.

The chat client is only one part of the website in question. If a user is in the middle of a chat, and decides to navigate to another part of the site, I want the chat client to retain the chat log between page loads. I could have an ajax call on body unload but that would both cause lag between page loads and also increase load on the server as we receive a fair amount of traffic. Cookies cannot hold enough data and client side storage solutions (like PersistJS) require yet another dependency.