DJabberd

DJabberd is a high-performance, scalable, extensible Jabber/XMPP server framework.

What is DJabberd?

While it comes with an example server, it's really a set of classes for you to build your own Jabber server without understanding Jabber. Instead of working with XML and protocol-specific details, you subclass parts and work with sane objects and data structures and let DJabberd do all the ugly work.

Status

Current status: 2007-05-08, been in production on LiveJournal, running "LJ Talk" for well over a year now. Considered mature. Used by many other sites now too. Download the core from danga.com/dist/djabberd/, or from CPAN, where you can find complementary plugins as well. Subversion access available from here.

Extensible

Consider DJabberd the mod_perl/qpsmtpd/Perlbal/Plagger of the XMPP world. Everything is a plugin. The framework lets you override the behavior of:

  • Authentication
  • Authorization
  • Roster Storage
  • Automatic roster population
  • Presence lookup
  • Message delivery
  • Inter-node communication
  • ...
  • everything else

Or, if you're lazy, choose mix and match behaviors from other CPAN modules: mix LDAP auth with SQLite storage with LDAP roster-population, with Spread inter-node communication...

You can even have multiple plugins per hook, in any order. Also, rather than implementing the hooks directly, the framework comes with simple objects you can subclass which further eases the use of the async plugin system.

High Performance

While implemented in Perl (which might dissuade you), DJabberd is written using the same event-based architecture that powers Perlbal, which pushes out billions of HTTP requests per month for LiveJournal.com and TypePad.com. In detail, it:

  • Is async/event-based.
  • Uses epoll on Linux 2.6, enabling hundreds of thousands of connections in a single process, limited only by memory (but new connections use significantly less memory than a threaded server). A recent test had 300k connections in 1GB of RAM.
  • All the aforementioned plugins can operate asynchronously. (If you're lazy, you can block in them, for low-traffic servers...)
  • Uses libxml (implemented in C) for the XML processing.

Scalable

Inter-node communication lets you just scale out, providing both load balancing and high availability in your Jabber farm. Because good Jabber clients will quietly reconnect on TCP connection failure, you can even do rolling code upgrades without users noticing.

As an admin, you're free to choose which inter-node communication method to use or you can write your own, specific to your application (assuming you're integrating this into an application).

Compliant

The DJabberd core aims to be fully XMPP 1.0 compliant, as well as supporting common pre-XMPP standards. To name the obvious ones, DJabberd supports:

  • s2s (Server to Server), but may be optionally disabled
  • XMPP StartTLS support
  • Pre-XMPP SSL-on-separate-port support
  • ...
Application Type: Infrastructure
Discuss: Mailing List
Source Code: Trac and SVN
Latest Release: May 8, 2007

Download 0.83

Also on CPAN