Trucs de geek

mod_couch : embedding ecouch client for CouchDB in ejabberd

Posted on September 16, 2008

Quick and dirty :

  • checkout, compile and copy the ecouch directory somewhere erlang will find it. Mine is /usr/local/lib/erlang/lib

  • download this, compile, copy the beam file in the ejabberd ebin directory.

  • in ejabberd.cfg :


{modules, [
.
.
.
.
  {mod_couch,     [{server,{"127.0.0.1", "5984"}}]},
.
.
.
]}
  • restart ejabberd

  • You now have access to your CouchDB server within ejabberd.

Atompub interface for distributed microblogging over XMPP

Posted on September 12, 2008

atompubsub has been updated and simplified and renamed to atommicroblog. Some might argue that it’s useful now.

The scope of the plugin is reduced to one node : the “urn:xmpp:microblog” node of the upcoming Microblogging over XMPP XEP.

Also improved : removed dependency on Yaws and implemented caching like they want it.

The code is on the ejabberd_modules svn.

For full context, these mails tell about production use.

Once this patch is implemented, it’s going to be even better. I will move entry payload processing into a nodemacroblog. And maybe I’ll find a more generic interface for atommicroblog.erl.

To the broader subject of distributed microblogging over XMPP, you might want to read Jack Moffit’s blog post. Follow the links !

PS : Yup, very pompous title.

Writing ejabberd modules, good places to find documentation [Updated]

Posted on September 11, 2008

Just found on the ejabberd mailing list Anders Conbere’s blog, with quite a lot of information to get you started, and code for the http server, write a bot.

[U] And Jack Moffit in the comment directed me to his weblog. Very good read about ejabberd deployment and administration.

Both of these live well in my NetNewsWire subscriptions.

Other locations

The Process One wiki is also a location to bookmark. All the standard hooks are listed.

Last but not least, the source code ! The simple features of erlang make it quite easy to navigate through the source code.

Modules you’ll use on a frequent basis are jlib, ejabberdrouter, xml and xmlstream along with mnesia and lists.

  • jlib : for manipulating JIDs, iq stanzas

  • ejabberd_router : send your stanzas elsewhere

  • xml_stream and xml : for parsing xml into the internal tuple representation or the other way round.