[ejabberd] ANN. Couchdb Backend
stephan at spaceboyz.net
Wed Apr 8 22:10:06 MSD 2009
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'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.
* 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
* 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. I've been desperately wanting comments
on that. :)
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.
More information about the ejabberd