[ejabberd] gen_storage in mod_muc on 3.0

Badlop badlop at gmail.com
Sun Dec 12 01:54:06 MSK 2010

2010/12/9 W. Andrew Loe III <andrew at andrewloe.com>:
> It looks like there has been some progress in abstracting the storage
> layer out of mod_muc (and other modules). The init callback supplies a
> default of mnesia
> (https://github.com/processone/ejabberd/blob/master/src/mod_muc/mod_muc.erl#L267),
> but can it run against odbc/mysql? I am trying to figure out the
> config option to change this if that is the case.

Yes, mod_muc in ejabberd master supports the backend option.
I've documented the option, and later will document the tables:

You can configure like this:

{odbc_server, {mysql, "localhost", "dbname", "user", "pass"}}.
{modules, [
  {mod_muc, [{backend, odbc}, ... ]},

Make sure the MySQL database exists, and that user has enough access.
When started, ejabberd will create the required tables.

> Also, it looks like this new code has some similarities with
> https://github.com/cstar/modular_muc, is that fair to say, has it been
> refactored since 2.1?
> I am starting on a new project that will use ejabberd, and I'd rather
> start on the 3.0 branch in hopes that it is released as stable soon,
> then write everything against 2.1 and have to port it all to use
> exmpp. Is this a good idea, or is 3.0 still very unstable and going to
> remain that way for a while.

The "master" branch isn't yet final, and is still away from final.

Stability is a different topic: the server doesn't crash the whole server,
the worst you can see are features that don't work, and an error
report in the log.

For example, I configured mod_muc as mentioned above, and this worked:
join a new room, chat, configure the room.
But some features didn't work, so I've filled tickets:
persistent rooms aren't started at server start,
and registering a nick in the service crashes.

I invest some hours every week to fix bugs like those in ejabberd master.

You can try the "master" branch and check how many of the features
that worked in 2.1.x
and that you really need don't work yet in master.

You have at least two options:
A) Use master, and expect to fill many tickets and update master branch
daily/weekly to get the bugfixes.
B) Use 2.1.x, and expect to later upgrade your code to 3.0/exmpp

If you pick A, you will act as an alpha tester, and your bug reports
will be very valuable
to progress in the branch bugfixing. Also, you could vote in the
tickets that are required
for your specific project.

In case you write a bugfix, you can send a pull request to the
ejabberd github repo,
no need to fill a ticket.


More information about the ejabberd mailing list