[ejabberd] ANN. Couchdb Backend

Christopher Zorn christopher.zorn at gmail.com
Wed Apr 8 22:47:25 MSD 2009

On Wed, Apr 8, 2009 at 2:10 PM, Stephan Maka <stephan at spaceboyz.net> wrote:

> Christopher Zorn wrote:
> > Just wanted to announce that I started a couchdb backend for ejabberd.
> This is an interesting project.


> I did an internship at ProcessOne in the past semester and my task was
> to abstract out backend specific code from the modules. I do not want to
> discourage you, but the following reasons kept me from implementing a
> CouchDB backend:


> * CouchDB's primary keys (_id) are picky on allowed characters, because
>  you can use attachments and other features. Watch out for that.
>  In particular, I was hitting attachments even when escaping the
>  document id. Might have been a bug.

Ok. I have not run into this just yet. I will keep an eye out for it.

> * Due to CouchDB's versioning, any write operation will cause the
>  database to grow size-wise. In the version I experimented with this
>  turned out to be quite rapidly. I advise periodic compaction
>  operations.

Do you have a number on how large the growth was and how fast? Thanks for
the advice.

> * Last, but most important, CouchDB has no transactions like Mnesia or
>  any SQL database have. They're important for a reliable IM server.
>  Even in case you invent your own schema, you will still have to pay
>  attention to write over the exact revision of a document that you've
>  read before. I eventually implemented a MVCC layer on top of
>  erlang_couchdb: couch_lier[1]. I've been desperately wanting comments
>  on that. :)

I am now following couch_lier on github. I did not find it when I looked for
this before I started. Dont know why. I will check it out. Thanks for
posting this.

I have only implemented authentication right now, so I have not run into a
case where I need transactions.

Thank you!

> As I said my task was a more general approach, targeting minor
> modifications to the modules themselves, ergo to reduce code duplication
> while not introducing new bugs.

> Stephan
> [1] http://github.com/astro/erlang_couchdb/tree/couch_lier
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20090408/68d338a2/attachment.htm>

More information about the ejabberd mailing list