[jdev] Local history storage

Mathieu Pasquet mathieui at mathieui.net
Wed Dec 19 10:02:11 UTC 2012


On 19/12/2012 08:14, David E. Ammouial wrote:
> Hello,
>
> I'm currently switching from Gajim to Empathy (trying it out becomes I'm
> discovering GNOME 3), and as a user I'd like to express a wish to client
> developers: IMHO, clients should store the chat history at the same place.
>
> Gajim, for instance, has taken interesting steps since its beginning.
> Before, everything was stored under $HOME/.gajim and now there's
> .local/share/gajim, .config/gajim and .cache/gajim. Such sweetness is a
> global naming policy change that modern software tend to respect, so
> that there's more consistency (e.g. all local storage goes to .local).
>
> So here, my proposal is to go one step further: I guess .local/share is
> called "share" because it's supposed to host shared resources, not one
> subdirectory per program. Chat history is a good example: a
> .local/share/xmpplogs/ directory would make total sense.
>
> 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.)
>
> Regards.
I’m not sure about having the same location for every clients 
(conflicts, concurrent access, and all the fun of shared resources), but 
a common format in order to allow easy migrations (copy + paste of the 
log files) would indeed be nice. It would also mean that we could have 
an external, standardized tool to view the logs.

As it was mentionned, XEP-0136 introduces a standard for querying and 
retrieving message logs, but in order to create a new XEP to specify the 
file format of the client logs, we would need to extend its scope. Most 
clients nowadays store lots of things in their logs (namely, presences) 
which are not mentionned in the XEP (or did I misread?) ; this is 
especially true for nick changes in a groupchat.

Another issue with a standardized file format is that the chosen file 
format depends of the goal of the client. E.g gajim, if I’m not 
mistaken, stores its logs in a sqlite database, which allows them to 
have a nice graphical tool dedicated to query the logs in various ways, 
and stay efficient. But other clients (like poezio, or mcabber) have 
opted for a plain text and file-based file format, because it keeps the 
logs human-readable, and less prone to corruption (and we can still 
kinda-query it with grep).

(for reference, you were talking about the freedesktop basedir spec: 
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html )

--
Mathieu Pasquet (mathieui)




More information about the JDev mailing list