mod_archive - Message Archiving (XEP-0136)

mod_archive implements XEP-0136 version 0.6 except otr (off-the-record).

Usually Jabber clients can store the conversations in the user hard drive. But sometimes this isn't possible or affordable, for example when using a mobile phone, or in a public access machine. XEP-0136 proposes that the Jabber server archives the messages as they pass through the server, if the Jabber client requested it. Later, the client can request to the server the messages. As a summary, mod_archive allows a Jabber client to request the server to store his own conversations, and later request them.

There are three different versions of this module. The main difference between them is the storage method:

  • mod_archive uses Mnesia (old)
  • mod_archive_sql uses PostgreSQL (old)
  • mod_archive_odbc uses MySQL or SQLite3, and includes other improvements
There is also the module mod_archive_webview which is a web interface to mod_archive_odbc (for vieweing the logs) You can find thoses modules in ejabberd-modules See also mod_archive_odbc homepage


Name: mod_archive
Purpose: Message archiving
Author: Olivier Goffart <ogoffart at kde.org>, Alexey Shchepin and Alexander Tsvyashchenko
Type: Module
Requirements: ejabberd 1.1.1
Download: mod_archive in ejabberd-modules

mod_archive

Features

  • Automatic archiving
  • User may enable/disable automatic archiving for one contact or globally
  • Manual archiving
  • Retreive or remove archive
  • XEP-0059

Not Supported

  • Off the record
  • Groupchats message

Options

save_default
true or false: whether or not messages should be saved by default
session_duration
The time in seconds before a session timeout (for a collection). The default value is 30 minutes.

Support of XEP-136 on Jabber clients

JWChat
Implemented, but does not work, since it implements an old version. An update on JWChat is expected in the mid-term.
Web reader
Php web interface

Related Links




Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

mod_archive_webview does not work with ejabberd 2.0.1

Hi,
I am using ejabberd 2.0.1 on Debian Lenny which has been patched with mod_archive module taken from trunk. I have followed all the instructions in README.txt and http://www.ndl.kiev.ua/content/mod_archive_odbc-release for setting it up. The messages get archived properly. But when I try to access the archive via my browser using the URL http://localhost:5280/archive/ ejabberd, it throws an error as shown below in sasl.log:

=CRASH REPORT==== 13-Jul-2009::20:50:07 ===
  crasher:
    pid: <0.718.0>
    registered_name: []
    exception error: no function clause matching
                     mod_archive_webview:process([],
                                                 {request,'GET',
                                                  ["archive"],
                                                  [{nokey,[]}],
                                                  undefined,undefined,"en-us",
                                                  [],
                                                  {115,108,115,201}})
      in function  ejabberd_http:process_request/1
      in call from ejabberd_http:process_header/2
      in call from ejabberd_http:receive_headers/1
    initial call: ejabberd_http:receive_headers({state,gen_tcp,#Port<0.577>,
                                                 undefined,undefined,
                                                 undefined,undefined,
                                                 undefined,undefined,"en",
                                                 [{["archive"],
                                                   mod_archive_webview},
                                                  {["admin"],
                                                   ejabberd_web_admin},
                                                  {["http-poll"],
                                                   ejabberd_http_poll}],
                                                 false,[]})
    ancestors: [ejabberd_http_sup,ejabberd_sup,<0.37.0>]
    messages: []
    links: [<0.242.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 610
    stack_size: 23
    reductions: 364
  neighbours:

=SUPERVISOR REPORT==== 13-Jul-2009::20:50:07 ===
     Supervisor: {local,ejabberd_http_sup}
     Context:    child_terminated
     Reason:     function_clause
     Offender:   [{pid,<0.718.0>},
                  {name,undefined},
                  {mfa,
                      {ejabberd_http,start_link,
                          [{gen_tcp,#Port<0.577>},
                           [http_poll,web_admin,
                            {request_handlers,
                                [{["archive"],mod_archive_webview}]}]]}},
                  {restart_type,temporary},
                  {shutdown,brutal_kill},
                  {child_type,worker}]

I tried to debug but hardly have any knowledge of erlang. Is something wrong with my configuration or is mod_archive_webview broken? Looking forward for any possible support in resolving this issue.

New version,

New version, mod_archive_odbc is available at http://www.ndl.kiev.ua/typo/articles/2007/11/14/mod_archive_odbc-release

This version, I hope, should solve quite some problems existed in earlier implementations.

errors

1) when I retrieve message page from collection I cannot retrieve next page by 'last' value (something here last value return the same page that first)

2) when I retrieve archive store, they have wrong timestamp (it is not UTC). Maybe I must to change some config settings?

I have -vsn('$Revision: 702 $ ').

Storage question

Can it store the archived messages in odbc/sql/wherever, or only in mnesia? Because with current client support, (that is, lack thereof) sql storage is essential, since it's the only way to get at the logs. You can expect to turn automated logging on from an XML console, but reading them that way would be pointless.

Relationnal storage is not yet supported

Relationnal storage is not yet supported, but note that you can access Mnesia data with any Erlang program :)

(Yes, I guess that you might not want to learn Erlang for that, but data is accessible)

The main reason to use relationnal database would be probably to increase the amount of data you can put in the database.

--
Mickaël Rémond
Process-one

Is relational storage

Is relational storage support planned?

When will I can use PostgreSQL?

what is maximum amount of

what is maximum amount of data can be stored in mnesia db?

Syndicate content