[ejabberd] Custom roster behaviour without writing your own mod_roster

Martin Langhoff martin.langhoff at gmail.com
Wed Nov 5 21:49:14 MSK 2008


Hi all!

For the OLPC School Server we are using ejabberd extensively -- so let
me preface this with a heartfelt *thanks* to all the dev team and
contributors for a fantastic piece of software.

One of the things ejabberd is doing for us is roster and presence
mgmt, which right now boils down to everyone having '@all@'. In other
words, no roster mgmt. For many reasons, we need to start doing
something smarter. The key ones are:

 - We're starting to plan installations in very large schools (3K to 5K users)
 - We now have a group / course mgmt tool on the school server (which
can feed roster info to ejabberd).

So I'd like to start driving the rosters that ejabberd publishes for
its users. My initial problem is that I don't have erlang or ejabberd
internals knowledge. So the obvious answer (write a custom mod_roster)
falls in the very hard basket.

My immedate alternatives seem to be

 - Use mod_roster_odbc with a PostgreSQL backend (as we're using Pg
already). Does it work well? Does it scale well? How many queries to
the DB an I expect it to make? Does it behave well if an external tool
updates its tables?

 - Keep using mod_roster, and write minimal erlang to write to the
mnesia tables that mod_roster uses. Is this feasible? Advisable?

Do we have other alternatives? I am very keen on understanding
ejabberd better, and I've been reading my new Erlang book -- but at
this stage I could very well be missing something big and obvious.

RTFM pointers welcome too :-)

cheers,


martin
--
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the ejabberd mailing list