[jdev] Local history storage
justin at affinix.com
Wed Dec 19 09:55:41 UTC 2012
On Wednesday, December 19, 2012 09:01:13 AM Will Thompson wrote:
> On 19/12/12 08:14, Justin Karneges wrote:
> > On Wednesday, December 19, 2012 08:14:34 AM David E. Ammouial wrote:
> >> Of course, the exact format would need to be thoughtfully defined, but
> >> does the goal itself sound reasonable?
> >> (I'm well aware of the efforts to store history on server side, but I
> >> think local history will still be around for a while.)
> > I've been wanting this since forever. Email has mbox and Maildir. IM could
> > use something similar. Maybe we could even just use an email format
> > (conversations in RFC822 format anyone?). I say it now just so it gets
> > said.
> I think you're suggesting storing each message as a separate email?
> For a data point, Google Talk conversation logs show up over IMAP as
> emails, with one email per conversation. One alternative in the mail is
> human-readable HTML; the more interesting one is a <conversation
> xmlns='google:archive:conversation'> document with simple <message
> xmlns='jabber:client'> children. 1-1 conversations have the From: header
> set to your correspondent; MUCs have all participants in CC:.
Yes I was thinking something like this, where an email encapsulates an entire
> I spent a little while hooking this up to Telepathy's log storage a few
> months ago and it was pretty straightforward, because of course we
> already have the machinery needed to show <message>s. Appending messages
> to the log file as a conversation continues would be more painful in
> that format, though.
Yup, you'd want to append/update each email-per-chat as the chats go on.
> Storage as one or more emails lets one use existing tools to quickly
> index and search by sender, time etc.
> It seems a bit of a shame that XEP-0136 doesn't use collections of
> <message> elements timestamped with jabber:x:delay/urn:xmpp:delay. I'm
> late to the party, but presumably this was considered and rejected for
> some reason?
I suspect the currently documented format was used for compactness. Whole
message stanzas could be interesting if you wanted full-on recording of
everything, like chat states, but in most cases it is overkill and we also
didn't want to log non-IM stanzas (no logging of IBB traffic). So that's why the
collections format is lean and to the point. I believe the intent was to allow
other IM-related elements sibling to <body> though (like <html>).
More information about the JDev