ejabberd turns 20
ejabberd is a piece of software that was born 20 years ago.
This is a long time, even at the scale of Internet. And yet, what ejabberd represents has not always been obvious. It took us a long time to realize what was so important about ejabberd. Why have we been developing it for 20 years? Why are we pushing it further even today? What makes it so special?
ejabberd is a scalable messaging server. That sums it all and that does not do justice to this critical piece of the Internet infrastructure. Sure, it is known to be the most scalable XMPP server, so scalable that it was used as a building brick to build Whatsapp messaging service. This is something that we have always been proud of, something you can easily brag about when meeting your friends.
But is that just it? Of course not. Today, with the troubles at Twitter, something appeared clearly.
ejabberd is important because it helped build much more than Whatsapp or any other big name high-profile projects we have built. It is important because it makes people communicate, in a federated way. It is important because it implements open protocols, and now several of them: XMPP, MQTT, SIP and now Matrix.
It’s about federation
ejabberd is about federation. It is helping people on different servers, domains, companies, communities or even countries chatting together. And today even more than 20 years ago, it really matters. We have built ejabberd for 20 years, because it is a critical building brick of what makes the Internet exists. Openness, interoperability, federation. It is one of the few software that prosper outside of the spotlights and make the Internet what it is, along for example with web and mail servers.
This is something we are pondering as we are thinking about the next steps, the next 20 years. But deep down, we know for sure, what we are about. ejabberd is about federation. You will read more from us here soon. It is a tradition. No birthday celebration speech is complete without looking back at the past.
It is hard to track all ejabberd usage, but we know that ejabberd empowers more than a billion users. Not bad for a piece of code we wrote. Trillions of messages went through our lines of code.
As mentioned in this post ten years ago:
Closed protocols come and go – ejabberd and XMPP remains
Happy 20th birthday, ejabberd!
Brief timeline
The very first public commit in ejabberd’s source code was done by Alexey Shchepin the 16th November of 2002. That was in the Jabber.ru CVS server. Later when that machine had technical problems, the development code moved to JabberStudio CVS.
The first official ejabberd release was ejabberd 0.5 in November 2003. The ejabberd home page at that time was a simple HTML. It’s also worth checking the early stage of the Ejabberd Installation and Operation Guide. Notice this first ejabberd logo represented a frog-like animal sitting on a “Jabber globe bulb,” with bat wings, dangerous-looking cogs, and an Erlang suit.
After the 0.7.5 release in October 2004, ejabberd home page moved from JabberStudio to ejabberd.jabber.ru, and the bug tracker to Jabber.ru’s Bugzilla. For this Drupal site, the logo changed to a hedgehog, and that would remain ten years until the final website and logo update in 2015.
At the beginning of 2005, JabberStudio CVS had technical difficulties and the development code moved to ProcessOne SVN. Notice that ProcessOne contracted Alexey to work in J-EAI, a project based in ejabberd specially designed for some business usages, and later extended that relationship to ejabberd.
In February 2005 the source code repository moved from SVN to Git, and the bug tracker to JIRA. Around October 2010 the source code repository and the bug tracker were finally moved to GitHub.
From around that time, there’s an interview to Alexey Shchepin which covers the initial concept and years of ejabberd development. By the way, there was another interview two years ago.
The ejabberd code base got a relevant massive change with the data binarization (use Erlang binaries instead of Erlang strings for data representation) in March 2013, which jumped ejabberd version from 2.1.12 to 13.03.
The next years followed another major source code change: the movement of many C/C++ code to independent external libraries.
Today, ejabberd is not just about XMPP. Even if it is mostly know for its great XMPP support, it also supports several other protocols:
– SIP support to connect SIP phone was added in 2014 (see ejabberd 14.05)
– Support for MQTT protocol, to better support Internet of Things use cases, was added initially in the Business Edition, and some months later added to the Community Server 19.02.
– Right now Matrix federation is being introduced to allow interop between ejabberd and Matrix servers, to ejabberd Business Edition internally or on Fluux ejabberd SaaS platform. It will come later to ejabberd Community Server.
ejabberd keeps on improving at a steady pace and is happy to open to other protocols and communities.
Some source code statistics
The oldest unchanged function in ejabberd is probably one of the least used: stop/0. And the oldest functional line is the SETS macro definition.
The ejabberd repository got 1,070,325 line insertions and 901,287 line deletions. When counting both ejabberd and the dependency libraries, they got 1.693.180 line insertions and 1.108.873 line deletions. With all this, the ejabberd source code went from 13 files to 868, from 1,448 lines of code to 480,961.
Looking at the programming languages of ejabberd and its libraries, Erlang is obviously the major one, and C comes as a relevant second:
Language | Files | Lines | Code | Comments | Blanks |
---|---|---|---|---|---|
ABNF | 3 | 128 | 110 | 3 | 15 |
ASN.1 | 1 | 14 | 10 | 0 | 4 |
Autoconf | 14 | 696 | 544 | 33 | 119 |
Batch | 4 | 31 | 21 | 0 | 10 |
C | 20 | 187549 | 139764 | 39614 | 8171 |
C Header | 8 | 11199 | 3783 | 6979 | 437 |
C++ | 1 | 533 | 442 | 17 | 74 |
CSS | 5 | 532 | 507 | 0 | 25 |
Elixir | 32 | 1888 | 1469 | 130 | 289 |
Erlang | 604 | 247901 | 208912 | 18368 | 20621 |
JavaScript | 2 | 23 | 21 | 1 | 1 |
Lua | 1 | 16 | 16 | 0 | 0 |
Makefile | 21 | 848 | 635 | 10 | 203 |
Perl | 3 | 1086 | 897 | 63 | 126 |
Python | 1 | 53 | 49 | 0 | 4 |
RPM Specfile | 3 | 5408 | 3928 | 1059 | 421 |
Shell | 21 | 4031 | 3263 | 336 | 432 |
SQL | 9 | 3857 | 2994 | 303 | 560 |
TCL | 3 | 1179 | 1002 | 69 | 108 |
Plain Text | 13 | 1870 | 0 | 1561 | 309 |
YAML | 20 | 1448 | 1357 | 53 | 38 |