Conversation history

I am considering the best way to store recent conversation history for all conversations on our Wildfire server. When a user logs in I would like to send them the recent conversation history (previous 10 messages) using a custom xml block. Most clients can just ignore it.

I have some experience developing Wildfire Plugins. I guess the functionality would be similar to the chat rooms. Any ideas?

Thanks!

Daniel

Message was edited by: StaticVortex

Daniel,

Sounds like it should be pretty straightforward. Another option is to use Spark as a client, which stores recent conversation history locally instead of on the server.

One thing I’‘m not clear on – do you plan to just send the last 10 messages no matter who the user was talking with? This could be a bit confusing. For example, if I’‘m chatting with three different users before I shut down my connection, the next time I log in, I’‘d see messages from all three conversations intermixed? Usually, I’'m most interested in recent history when I click to chat with someone in particular. Can you describe your use case further?

Regards,

Matt

Hey thanks for your quick reply.

The functionality is to be used for a web based client, so storing the messages locally isn’'t practical.

The service would only return the last 10 messages of the conversation between the two users in conversation. Our web client can make an xml request to the wildfire server with the username’'s of the two users, and then the Wildfire plugin should send back the results. This could be a component or an extension to the normal interface.

Thanks

Ahh, gotcha. That makes much more sense. I think building this out would be fairly straightforward. One thing you’‘d want to do is store conversations by bare JID. That way, it wouldn’'t matter what resource a user is using at any one time: “/Home”, “/Work”, etc.

Do you need to store all conversations or just the last 10 messages between each user? If the former, it might be easy to build on top of an existing archiving implementation. For example, it would be quite easy to use the archiving API in Wildfire Enterprise (commercial extension to Wildfire) to build out this feature.

Otherwise, I think you could store the messages fairly easily in XML files or the database and then write an IQProvider to serve up the data. The code might look somewhat similar to how private data storage is implemented if you want to look at existing code. Otherwise, feel free to ping me if you need more specific ideas.

Regards,

Matt

We would only need to store the last 10 messages.

I considered the enterprise component but $20k sounded a lot to pay if I can develop it myself.

I think your solution to storing them as XML files makes the most sense. I am a little worried about hurting the performance of the Jabber server doing this. Would be worth caching somehow but that maybe beyond my ability but I will look into it.

I appreciate your help - keeps me on the right track!

Daniel

I considered the enterprise component but $20k

sounded a lot to pay if I can develop it myself.

It’‘s only that expensive for unlimited users, but I’‘m guessing that’‘s your situation since it’‘s an external site? In any case, it sounds like it’‘s not the right fit since you only need to log recent messages and don’'t need the deep archiving support in Enterprise.

I think your solution to storing them as XML files

makes the most sense. I am a little worried about

hurting the performance of the Jabber server doing

this. Would be worth caching somehow but that maybe

beyond my ability but I will look into it.

Another bit of code you could look at in the Wildfire code base is the XML message logging logic. It’'s also pretty similar to what you want to do.

If it turns out that you need development help, definitely feel free to contact us. Jive Software has a professional services team that helps out with these types of projects all the time.

Regards,

Matt

Yes it’'s an external site - we will be very interested in your Wildfire Connection Manager Module when it is ready.

Thanks for your help - I have been in contact with Kelly about a Spark skinning/customisation project we would consider using your professional services team for but waiting on a reply. Thanks for your invaluable help today.

Daniel

Hi,

you could also take a look at http://zeank.in-berlin.de/datasink/ and or url=http://www.jabber.org/jeps/jep-0136.htmlJEP-0136[/url].

LG