GSoC08 Message History

From PsiWiki

This page does not describe Psi's code. I'm Aleksey Palazchenko and these are just notes for writing a Google's Summer of Code 2008 project. You can find my code at github, and little more details at my blog and Flyspray.

Contents

Plan

Task
Hours
Milestone
Status
Community bonding period
Setup a blog, wiki-page, e-mail filters, feeds, send documents to Google, etc.
few
100%
Reading and understanding of XEP-136.
90% - waiting for v1.0
Understanding structure of Psi's code.
100%
Understanding Iris' API.
30%
Find or install for public use jabber-server with support of XEP-136; experiments with it and XML-console.
?
0%
Study «real-time» English and slang.
poor
Preliminary implementation of storage engine for collect real-life logs.
?
100%
Discuss engine's structure with Kevin.
100%
Design and discuss UI with Remko and Kevin.
50% - prototype is below
Local part of project (May 26 — July 7)
Design and implementation of encryption methods (database driver, QCA or just class's methods).
0%
Implementation of storage engine — code.
?
80%
Writing documentation for later integration.
30%
UI – models.
?
30%
UI — views, main window.
?
30%
UI — options window.
?
0%
Integration with Psi — private messages, MUC.
?
20%
EXAMS AT MY UNIVERSITY
many
3/5 - PITA
Network part of project (July 14 — August 11)
Preliminary implementation of server-side history class with stubs instead of real code.
0%
...
remote-2
0%

Milestones

Milestone zero

  • Setup a blog, wiki-page, e-mail filters, feeds, send documents to Google, etc.
  • Preliminary implementation of storage engine for collect real-life logs.
  • Understanding structure of Psi's code.

local-1

  • Discuss engine's structure with Kevin and Remko.
  • Design and discuss UI with Remko and Kevin.

local-2

  • Implementation of storage engine — code.
  • Writing documentation for later integration.

local-3

  • UI – models.
  • UI — views, main window.

local-4

  • UI — options window.
  • Integration with Psi — private messages, MUC.

remote-1

  • Reading and understanding of XEP-136.
  • Understanding Iris' API.
  • Find or install jabber-server with support of XEP-136; experiments with it and XML-console.
  • Preliminary implementation of server-side history class with stubs instead of real code.

someday

  • Design and implementation of encryption methods (database driver, QCA or just class's methods).

Back-end

There are two main types of objects: collections and entries.

Collection is... well... a collection of entries. :) It have several attributes: buddy's JID, creation time, subject, thread.

Entries have several types: private message to/from user, MUC user and system message.

Also there are bookmarks – references to entries, collections or several other bookmarks.

Database design

Image:History database design.png

Main principles

  • It's impossible to create an entry without a collection; entries may be created only by collection, or by copying another valid entry.
  • All information stored in db without delay; for example, creating entry by collection will call INSERT statement.

Code

See github.

Options and parameters

  • One database is used for all accounts – it's useful for search and must not be performance problem.
  • User may switch off logging for particular JID, group or account.
  • Whole database must be encrypted. (to discuss how)


UI

Trillian

Image:Gsoc08_history_trillian.jpg

Nice, but activity graph is useless.

Miranda

Image:Gsoc08_history_miranda.png

Very nice! Integration list of collections with calendar into tree is really useful feature.

Jaiku :)

Image:Psi-jaiku.png

More info.

Proposed for Psi

Image:Historydlg_v1.png Blog post.

Notes

TODO (someday)

  • Backend redesign:
    • remove friendship!
    • done - prepared queries ( bindValue )
    • done - columns by name ( query.record().indexOf("colname") )
    • done - arg()'s are evil: QString("%1 : %2").arg("%1X").arg("foo")
    • to save more data
  • database encryption!
  • special interface for "normal" messages (may be like e-mail)
  • PEP on remote-side?? (good idea, but XEP should be changed...)

Google Talk

http://code.google.com/apis/talk/jep_extensions/otr.html

http://code.google.com/apis/talk/jep_extensions/usersettings.html

GTalk's disco info contains "http://jabber.org/protocol/archive#otr" and "http://jabber.org/protocol/archive#save" features, which are old namespaces for XEP-136. This means you can save or not to save your messages, but you can't retrieve them. ( version 0.6? that is the last one edited by Jon Perlow from Google )

Servers with support of XEP-136

Files to be changed

New code:

  • eventdb.* – complete rewrite
  • historydlg.* – complete rewrite ( + historydlg.ui )
  • file for model
  • file for view
  • ...

Integration:

  • psicon.* – d->edb stuff ( constructor, destructor, edb() )
  • psiaccount.* – logEvent(), edb_finished()

--AlekSi 06:06, 8 July 2008 (EDT)