Planet Jabber

May 26, 2015

Alexander Gnauck

MatriX JS XMPP library in beta now

We are pleased to announce our new JavaScript XMPP library MatriX JS which is available for beta now.

MatriX JS is build with Microsoft’s TypeScript. The software design is very similar to our popular MatriX .NET XMPP SDK. TypeScript allowed us to port lots of existing source code, logic and patterns from our MatriX C# library to JavaScript. MatriX JS is also based on LinQ and LinQ to XML. This will make it very easy for our existing customers to port existing code bases to the web or cross platform HTML/JS applications.

Currently BOSH and websockets are supported as transport layers. Node.js and tcp sockets are coming later.

MatriX JS will be licensed under a Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license.

Contact us to join the MatriX JS beta

by gnauck at May 26, 2015 17:51

The XMPP Standards Foundation

Eyeball Networks become an XSF Sponsor

We’re happy to announce that Eyeball Networks are the latest organisation to become an XSF Sponsor.

Eyeball Networks pioneered the STUN/TURN/ICE device-to-device connection technologies adopted by communications standards including SIP, XMPP, IMS, PacketCable, IBM Sametime, Microsoft Lync, and now WebRTC. You can read more about them here.

Sponsors are vital to the ability of the XSF to continue to fulfil its mission to build an open, secure, feature-rich, decentralized infrastructure for real-time communication and collaboration over the Internet.

Our sponsors help us with everything from infrastructure for the XMPP site to funding the regular XMPP Summits so please take the time to thanks Eyeball Networks by visiting their website, getting them involved in discussions and perhaps following them on your social network of choice (from LinkedIn, Facebook, Twitter and Google+).


by willsheward at May 26, 2015 13:38


Code as Craft Interview #1 –

I had a quick chat of Fernando Ripoll (left) and Alex Knol (middle) from at Sea Beyond conference.

Cobrowser is a proactive web based chat solution build using ejabberd.

by Mickaël Rémond at May 26, 2015 09:12

May 20, 2015

Fanout Blog

Building a realtime API with RethinkDB

RethinkDB is a modern NoSQL database that makes it easy to build realtime web services. One of its standout features is called Changefeeds. Applications can query tables for ongoing changes, and RethinkDB will push any changes to applications as they happen. The Changefeeds feature is interesting for many reasons:

  • You don't need a separate message queue to wake up workers that operate on new data.
  • Database writes made from anywhere will propagate out as changes. Use the RethinkDB dashboard to muck with data? Run a migration script? Listeners will hear about it.
  • Filtering/squashing of change events within RethinkDB. In many cases it may be easier to filter events using ReQL than using a message queue and filtering workers.

This makes RethinkDB a compelling part of a realtime web service stack. In this article, we'll describe how to use RethinkDB to implement a leaderboard API with realtime updates. Emphasis on API. Unlike other leaderboard examples you may have seen elsewhere, the focus here will be to create a clean API definition and use RethinkDB as part of the implementation. If you're not sure what it means for an API to have realtime capabilities, check out this guide.

We'll use the following components to build the leaderboard API:

Since the server app targets Heroku, we'll be using environment variables for configuration and foreman for local testing.

Read on to see how it's done. You can also look at the source.


by justin at May 20, 2015 23:13

May 19, 2015

Peter Saint-Andre

RFC 7565: Account URIs

RFC 7564 is a good example of a necessarily complex piece of work that required a long time to produce. Yet sometimes even simple things take time. Case in point: the specification of the 'acct' URI scheme, also published today as RFC 7565. In June of 2012 I split the definition of this scheme out from the WebFinger document so that it could stand on its own. Indeed, the 'acct' URI spec was approved for publication almost 2 years ago, but couldn't be published as an RFC until the PRECIS framework was published today as RFC 7564. Ah, the wonderful world of technology standardization...

May 19, 2015 00:00

RFC 7564: An Internationalization Odyssey

It all started in 1998 when Jeremie Miller chose XML as the basis for Jabber. Although XML seems old-fashioned now, at the time it was the cutting edge, in part because from the beginning Jabber Identifiers could include characters outside the US-ASCII range (unlike textual protocols of the time such as email or SIP). In 2002, Craig Kaes and I started to codify the Jabber address format in JEP-0029 - an effort that was superseded by activity in the IETF's XMPP Working Group, which eventually led to the core specification for XMPP in the form of RFC 3920 in October 2004.

May 19, 2015 00:00

May 15, 2015

Tigase Blog

Tigase Server 7.0.2 Release

A new maintenance version of Tigase XMPP Server (7.0.2) has been released. Binaries are available for download in the files section on the project tracking system.

by eric at May 15, 2015 16:08

May 04, 2015

Peter Saint-Andre

RFC 7525: SSL/TLS Best Practices

Internet security is very important to me. That's why I pushed hard last year to encrypt the XMPP network. It's also why I've been working on two specifications at the IETF that document major attacks on SSL/TLS as well as best practices for preventing those attacks on a wide range of Internet applications (websites, mobile apps, email, messaging, etc.). I'm happy to report that those best practices were published today as RFC 7525 and that before long we'll also be strengthening the use of TLS in XMPP to further enhance the security profile of the XMPP network. Is that security perfect? No, because we still need end-to-end encryption and several other improvements (indeed, our work is never over because the attacks keep getting better, too). But we're doing what we can within the confines of existing technologies to make Internet applications as secure as possible. Onward and upward!

May 04, 2015 00:00

April 30, 2015


Easy installer and structure for ejabberd contributed modules

Ejabberd comes with a lot of modules, but sometimes you may need an unsupported feature from the official sources or maybe you need to write your own custom implementation for your very special needs.

For many years, such contributed modules are stored on ejabberd-contrib repository.

However, these modules required manual compilation. This means having Erlang/OTP installed, a base knowledge of how to compile ejabberd modules and manual maintenance when ejabberd’s api is updated over time.

Complex operations to manage ejabberd contributed modules is now behind us. ejabberd is now able to fetch module sources by itself, compile with correct flags and install in a local repository, without any external dependencies. You now longer need to know Erlang and have it installed in order to use the contributed modules. This works with ejabberd modules written in Erlang and will also support new Elixir modules.

ejabberdctl module_install

Before getting started, you need to use ejabberd official repository on Github. We are gathering feedback before you see that command in the next stable release. It will work with ejabberd HEAD, starting from version 15.02.77 (aa1250a). Once you have an ejabberd compiled from source installed, you can start playing with the commands.

As a user, this is how it works:

First you need to get/update the list of available modules:

$ ejabberdctl modules_update_specs

Then you can list available modules

$ ejabberdctl modules_available
mod_admin_extra Additional ejabberd commands
mod_archive     Supports almost all the XEP-0136 version 0.6 except otr
mod_cron        Execute scheduled commands
mod_log_chat    Logging chat messages in text files

Let’s give mod_cron a try:

$ ejabberdctl module_install mod_cron

This command installs mod_cron from ejabberd-contrib repository. An example default configuration is installed in:


All you have to do is to copy paste the module and add the values in there in the proper place in your ejabberd.yml config file. Be careful, the snippet can include ACLs, listeners and module configuration, that you have to put in the right place in your config file.

Now, check your new module is installed:

$ ejabberdctl modules_installed

And finally, you can remove it:

$ ejabberdctl module_uninstall mod_cron

What’s next

Please note this is provided as a beta version. We want the work in progress to be released early to gather feedback from developers and users.

For now, you need to edit the configuration snippet provided in module’s conf directory and copy it into your ejabberd’s main configuration. Then you’ll need to restart ejabberd or manually start the module.

However, our plan is to keep iterating on the tool and to make our best to make module installation as easy as possible and avoid need to change main configuration: ejabberd should be able to include module configuration snippets on the fly in a near future.

As a developer, how can you provide an ejabberd contribution ?

As a developper, you still need Erlang and Ejabberd if you install everything from sources, but you can even not need Erlang if you installed ejabberd from official ProcesOne installer. The official installer includes everything needed to build ejabberd modules on its own.

First you can work on your own module by creating a repository in $HOME/.ejabberd-modules/sources/mod_mysupermodule, and creating a specification file in YAML format as mod_mysupermodule.spec (see examples from ejabberd-contrib). From that point you should see it as available module.

Before commiting your code, you should check if your module follows the policy and if it compiles correctly:

$ ejabberdctl module_check mod_mysupermodule

if all is OK, your’re done ! Else, just follow the warning/error messages to fix the issues.

You can keep your repository private in this location, ejabberd see it as an available module, or you can publish it as a tgz/zip archive or git repository, and send your spec file for integration in ejabberd-contrib repository. ejabberd-contrib will only host a copy of your spec file and does not need your code to make it available to all ejabberd users.


We have a bright vision for the ejabberd modules ecosystem and this is just the first step. We are waiting to hear from you. With your feedback, your ejabberd installation with instantly become much much more powerful.

by Christophe Romain at April 30, 2015 16:26

April 28, 2015

The XMPP Standards Foundation

XSF GSoC Students 2015

This year, we’ve been lucky enough to have had many great applications to take part in Google Summer of Code under the XSF. We’ve selected the following six students/projects and are looking forward to working with them over an exciting summer:

Tarun Gupta: Extend Stroke Implementation

        Tarun’s going to be working on fleshing out the Stroke Java library to bring it up to feature parity with the Swiften C++ library.

Daniel Baczynski: Multi-account support in Swift

        Daniel’s going to be working with the Swift team on a strong user interface for supporting multiple concurrent accounts in the Swift client.

Ishan Khanna: Add support for XMPP Serverless Messaging (XEP-174) to Smack

        Ishan will be working with the Smack Java library developers on a modern implementation of serverless XMPP messaging over the summer.

Marvin W: Add support for DNSSEC to Smack via MiniDNS

        Marvin’s also going to be working with the Smack developers on the underlying mechanisms to support DNSSEC in Smack.

srtb: Axolotl support for Conversations

        srtb’s going to be working on end to end encryption mechanisms in the Conversations Android client.

Adhish Singla: Prototyping tools, for Internet of Things

      Adhish is going to be working on Internet of Things extensions for the SleekXMPP library.

This should be a great summer for the students, and for all the projects involved.

by Kev at April 28, 2015 14:43

April 24, 2015

Ignite Realtime Blog

Spark 2.7.0 Released

The Ignite Realtime community has released Spark 2.7.0 for general availability and it can be downloaded from Ignite Realtime: Downloads (Note: there are no working Mac OS X installer as our current build environment has no working setup for Mac, also Spark has lots of issues on the current Mac OS versions and the community has no active Mac OS developers willing to step in).


This release is a mandatory one to use with the recently released Openfire 3.10.0. As 2.6.3 version has issues connecting to the new server version. Though there is a not recommended workaround to revert to using Old SSL setting, which is less secure than TLS. The community strongly advises to upgrade to 2.7.0 version. Even if you are not planning to update to 3.10.0 release of Openfire yet. Spark hasn't seen a release in almost 3 years, but it was constantly evolving. Many fixes and improvements have been applied to the code since the last release. Some users have it deployed in the production environment for years and find it more stable than 2.6.3 version (as myself with 200+ user base).


We are sad that currently Spark has no Project Lead and there are no active contributors to this project. So, fixes and new features may not come up quickly. We hope open source community will embrace and improve this project in the future. You can start sharing your patches on the GitHub. If you find new issues, you can report them in the forums and we will at least file them in the bug tracker for the future developers to tackle.


Here's a list of some important fixes/changes:

[SPARK-1074] Sending part doesnt get a notification about the transfer cancellation - Jive Software Open Source

[SPARK-1362] No confirmation on the sender's part that the file transfer completed  - Jive Software Open Source

[SPARK-1397] Fix the displaying of system tray icons - Jive Software Open Source  (minor one, but not for such a picky person as i am, Spark icon now looks much nicer)

[SPARK-1414] Chat window is not flashing when receiving new message on Windows 7 64 bit - Jive Software Open Source

[SPARK-1525] Update smack - Jive Software Open Source  (huge update for Spark and this is probably the cause why 2.6.3 can't connect to newer Openfire as it uses older Smack library)

[SPARK-1524] Spark is not reconnecting automatically after connection loss - Jive Software Open Source

[SPARK-1546] Spark visually shows that a message is not sent - Jive Software Open Source  (one of the most annoying bugs in 2.6.3)


Also the Conversation history dialog has been completely reworked and should load faster and should be easier to navigate. Java has been updated to the recent 1.7.0 version, which should fix issues with some timezones. There are also numerous memory leak fixes. You can find the full changelog here: Spark Changelog


There are also some open issues. Like the still broken voice chat module. One of the past Spark maintainers cstux has started a work on fixing this, but it is moving slowly. File transfers may not work between 2.6.3 and 2.7.0 versions because of many changes to this functionality in 2.7.0. This is a somewhat frightening list of open issues (though many are minor) Spark - Jive Software Open Source So, again, we encourage Java developers to move this project forward.


Here are sha1sums for the downloads:


      sha1sum                                                              filename

1f74720be219fda89c450869291c0f15116f7c89  spark_2_7_0.deb

4f6c5b0c6ee7eb876509e724032222e1c997e8b1  spark_2_7_0.exe

db25cd5cf0871bdd3dd1ca5ed22592b99f57d37e  spark_2_7_0.tar.gz

0ab7bcfdebf6177399bf3107d0d26c22869b5795  spark-2.7.0.rpm

ab1f1e2ca5def7801d64183bfcb5d54697292e71  spark-2.7.0.src.rpm

eac98c6a9123170b52160499bfe8857c68d1d736  online/spark_2_7_0_online.exe

by Ignite Realtime Blog ( at April 24, 2015 16:22


ejabberd 15.04

ejabberd 15.04 keeps the project delivering new features and improvements at the same fast pace.

The focus for this release is to consolidate and improve what was delivered in the previous release, and also to integrate contributions which had been critical for most deployments these days.

New features

We integrated usefull contributions around groupchat (mod_admin_extra and mod_muc_admin) into ejabberd core. This means ejabberd admins get a new set of powerful ejabberdctl command and API they can rely on with standard ejabberd deployments.

We also made XEP-0033 Extended Stanza Addressing a default component. This is extremely useful to build chat service that uses adhoc chat mechanisms. It brings to ejabberd the ability to send messages to multiple recipients at once without using Multi User chat or pubsub. You can see a bit like email cc or bcc features. This allows to build extremely simple and lightweight multi party chat features.

Among new features, we now have a SQLite backend that can replace Mnesia for those who prefer as basic backend for small and simple standalone deployments.


We improved a lot of modules, added some major pubsub improvements, better RFC compliance, many bug fixes and small tweaks all over the place thanks to your feedback. The cluster script helpers have been improved to work in more situations.


We are still pushing Elixir integration further: this new version of ejabberd can be embedded in any Elixir application, for example in a Phoenix Web application. Here is a tutorial showing how it works.


PubSub improvements include code refactor, bug fixes, minor optimisations and removal of old mod_pubsub_odbc. mod_pubsub now uses db_type parameter like all other ejabberd modules.
NOTE: Users of old mod_pubsub_odbc will need to alter pubsub_node table changing the type attribute: set flat when it was flat_odbc, hometree when it was hometree_odbc, and pep when it was pep_odbc. Without this manual change in your database, the new mod_pubsub will not work.

Changelog overview

  • R16B03-1 is now the minimal required Erlang/OTP version
  • SQLite support
  • Default db_type can be specified with global default_db option
  • Included mod_muc_admin, mod_admin_extra and mod_multicast modules
  • Removed ejabberd_http_poll
  • Pubsub improvements
  • Better RFC compliance
  • Several other bugfixes

ProcessOne installer now includes Erlang/OTP 17.5, with added new configuration option in ejabberd: sqlite, redis and elixir support.
The Linux 32bit installer is no longer maintained.


As usual, the release is tagged in the Git source code repository on Github.

The source package and binary installers are available at ProcessOne.

If you suspect you found a bug, please search or fill a bug report on Github.

by Christophe Romain at April 24, 2015 13:59

April 22, 2015

Ignite Realtime Blog

Openfire 3.10.0 Released

The Ignite Realtime community is very proud to release Openfire 3.10.0 for general availability from


The amount of energy that has gone into this release is truly impressive, and it shows no signs of slowing down - as those of your looking at the 3.11 branch will have seen. Further 3.10.X releases will be bugfix releases; 3.11 will concentrate on a path to 4.0.0.


3.10.0 itself brings new core features to Openfire (such as Message Carbons, for example, by Christian Schudt) and vital improvements (to clustering and MUC, for example, by Tom Evans), as well as some hard bugfixing (by Guus der Kinderen) and important security improvements.


As ever, we welcome pull requests (to 3.10 or master as appropriate), and the entire development team is looking forward to you joining the conversation either in the forums or in the XMPP chatroom at


Happy Chatting!




SHA-1 hashes for download artifacts




UPDATE: Spark 2.6.3 version has issues with connecting to this version of Openfire. We suggest updating to just released 2.7.0 version of Spark.

by Ignite Realtime Blog ( at April 22, 2015 21:08

April 17, 2015

Thijs Alkemade

Validate the encoding before passing strings to libcurl or glibc

Lets start with a simple example in php:


setlocale(LC_ALL, "nl_NL.UTF-8");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $_GET["url"]);

This code is broken, can you tell how?

But it’s not just php or libcurl, lets try glibc.


#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <locale.h>
#define BUF_SIZE 500
main(int argc, char *argv[])
struct addrinfo hints;
struct addrinfo *result, *rp;
int sfd, s, j;
size_t len;
ssize_t nread;
char buf[BUF_SIZE];
setlocale(LC_ALL, "nl_NL.UTF-8");
if (argc < 3) {
fprintf(stderr, "Usage: %s host port msg…\n", argv[0]);
/* Obtain address(es) matching host/port */
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_flags = AI_IDN;
hints.ai_protocol = 0; /* Any protocol */
s = getaddrinfo(argv[1], argv[2], &hints, &result);
if (s != 0) {
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(s));

This is a slight modification of the example from the man page for getaddrinfo and it is broken in the exact same way.


The common factor is that both use libidn (well, glibc contains an in-tree copy of libidn, but the essence of it is the same). libidn is a library with various Unicode related funtions. For example, it can convert internationalized domain names (IDNs) to punycode. This is what converts яндекс.рф to xn--d1acpjx3f.xn--p1ai, which contains only characters that can be used safely by the DNS.

The idna_to_ascii_8z documentation states:

Convert UTF-8 domain name to ASCII string. The domain name may contain several labels, separated by dots. The output buffer must be deallocated by the caller.

As it turns out, the effect of passing a string that is not valid UTF-8 to any of the libidn functions that expects an UTF-8 string can be disastrous. If the passed in data ends with an unfinished UTF-8 codepoint, then libidn will continue reading past the terminating null-byte. There could be unrelated information just past that byte, which then gets copied into the result. This could leak private information from the server!

For example, the UTF-8 encoding of ф is, in hex:

d1 84

In fact, any valid UTF-8 sequence that starts with d1 should always consist of 2 bytes. But if we pass:

d1 00

instead, then it will instead interpret this as if it was passed:

d1 80

and it continues reading whatever is after our input.

The locale

Some applications don’t use idna_to_ascii_8z, but idna_to_ascii_lz instead. The documentation for idna_to_ascii_lz states:

Convert domain name in the locale’s encoding to ASCII string. The domain name may contain several labels, separated by dots. The output buffer must be deallocated by the caller.

However, this is no problem if the locale is already an UTF-8 locale (which is why the examples needed the setlocale calls): if the new locale and the old locale are identical, then no conversion is happening, which means the invalid data is not caught.


The effect of the php code above when passed a domain name with invalid UTF-8 is that a DNS request is started for a domain which contains extra data.

It is possible that this data contains passwords or fragments of a key, however, it has to continue to look UTF-8-like to libidn, so it is unlikely to continue on as long as Heartbleed could (for example, multiple successive null-bytes will stop the conversion). But it could easily allow an attacker to bypass ASLR.

The stringprep functions in libidn are affected by the same issue. These are used, for example, to normalize usernames and passwords. Here, it could allow an attacker to reuse parts of the password from a previous login.

Luckily, the AI_IDN flag of glibc is off by default, and I could not find many applications that ever set it.

So who should check it?

The libidn developers show little motivation to fix this, pointing the blame to applications instead:

Applications should not pass unvalidated strings to stringprep(), it
must be checked to be valid UTF-8 first. If stringprep() receives
non-UTF8 inputs, I believe there are other similar serious things that
can happen.

But the libcurl and glibc developers can pass on the blame to the layer above just as easily. The man page for getaddrinfo says:

AI_IDN - If this flag is specified, then the node name given in node is converted to IDN format if necessary. The source encoding is that of the current locale.

libcurl’s CURLOPT_URL says nothing about the required encoding.

This is a very messy situation, and so far nobody has shown any motivation to work on fixing it. So the best approach seems to be to fix end-applications to always validate strings to be valid in the current locale before passing them to libraries that require that. How many php developers are likely to do that? How many applications are out there that depend on getaddrinfo? Of course that’s unlikely, so I hope the glibc/libcurl/libidn developers figure something out.

April 17, 2015 18:00

Peter Saint-Andre


During a conversation not long ago with my friend Sarah, she mentioned the view of author John Maxwell that you cannot be a success in life unless you know your purpose, as in the one and only reason you are here on this earth.

April 17, 2015 00:00

April 14, 2015


Embedding ejabberd into an Elixir Phoenix Web application

By combining Elixir powerful web framework with ejabberd realtime messaging platform, you can build extremely powerful applications. This tutorial will help you get started.

Here is the screencast showing the whole process. Please read further for detailed step-by-step description and code.

Create a Phoenix application

The first step is to create your Phoenix application as usual.

First, you need to install Elixir 1.0.2+.

From there you can clone and build Phoenix framework:

prompt> git clone && cd phoenix && git checkout v0.10.0 && mix do deps.get, compile

Finally, you can generate your Phoenix application template:
prompt> mix /Users/mremond/demo/my_app

Please refer to Phoenix web site to learn more about it: Getting started with Phoenix.

Add ejabberd as a dependency for your application

You have two simple changes to perfom in your application mix.exs initial file:

  1. Add ejabberd as a dependency for your application:
  defp deps do
    [{:phoenix, "~> 0.10.0"},
     {:phoenix_ecto, "~> 0.1"},
     {:postgrex, ">= 0.0.0"},
     {:cowboy, "~> 1.0"},
     {:ejabberd, ">= 15.03.0", github: "processone/ejabberd"}]

  1. Tell mix to start ejabberd when you launch your application:

  def application do
    [mod: {Phoenixtest, []},
     applications: [:phoenix, :cowboy, :logger, :ejabberd]] 

  1. Download and build all dependencies:
    prompt> mix do deps.get, compile

For reference, here is the complete mix.exs

Before you can start your application, you need to configure ejabberd.

Configure your application and ejabberd

Copy ejabberd.yml example file in application config/ directory. I put that file in a gist online to make that step easier:
prompt> (cd config; wget

You can tweak ejabberd config file to adapt it to your needs. Please, refer to ejabberd operation guide to configure it properly.

You also need to configure your Elixir application to tell it how to set global ejabberd values like configuration file, log directory and Mnesia file directory. In the file config/config.exs, add specification ejabberd configuration for integration in your application:

config :ejabberd,
  file: "config/ejabberd.yml",
  log_path: 'logs/ejabberd.log'
# Customize Mnesia directory:
config :mnesia,
  dir: 'mnesiadb/'

Make sure the directory where to place ejabberd log file does exist. If this is not the case, it will not be automatically created and no log file will be generated.

prompt> mkdir logs

Start your application

You can now start your application:

prompt> iex -S mix phoenix.server

As you see from the log printout, ejabberd is started along with your Elixir app.

You can create a user by entering the following command from Elixir command line:

iex(1)> :ejabberd_auth.try_register("mickael", "localhost", "mypass")
{:atomic, :ok}

You can connect with those credential from an XMPP client.

You can also connect on Elixir web server on http://localhost:4000/

Creating a page displaying ejabberd information

Let’s get started writing a Phoenix basic page that display ejabberd information.

In your project, edit the file web/router.ex and add a reference to a /ejabberd page in the my_app scope:

get "/ejabberd", EjabberdController, :index

The scope “/” block of our router.ex file should now look like this.

   scope "/", MyApp do
     pipe_through :browser # Use the default browser stack
     get "/", PageController, :index
     get "/ejabberd", EjabberdController, :index

Let’s then create the file web/controllers/ejabberd_controller.ex:

defmodule MyApp.EjabberdController do
  use MyApp.Web, :controller
  # This is used to import the jid record structure from ejabberd:
  require Record
  Record.defrecord :jid, Record.extract(:jid, from: "deps/ejabberd/include/jlib.hrl")
  plug :action
  def index(conn, _params) do
    # get online jid, parse and extract the user part.
    online_users = :ejabberd_sm.connected_users
                      |> &(jid(:jlib.string_to_jid(&1), :user))    
    render conn, "index.html", users: online_users

The code doing the heavy duty job the one getting online user by JID and extracting the username. This is a couple of lines of code:

   # get online jid, parse and extract the user part.
   online_users = :ejabberd_sm.connected_users
                     |> &(jid(:jlib.string_to_jid(&1), :user))    

We do not need anything fancy in our Phoenix view module and we will use default view placeholder web/views/ejabberd_view.ex:

defmodule MyApp.EjabberdView do
  use MyApp.Web, :view

Note: I could have put some data conversion code in the view code, but as the code is short, I preferred to have all the relevant ejabberd related code in one place.

Finally, we need the template for the page, named web/templates/ejabberd/index.html.eex:

<div class="jumbotron">
  <h2>Hello World, ejabberd meets Phoenix !</h2>

  <h3>Here is the list of online users:</h3>
  < %= for user <- @users do %>
  <p>< %= user %></p>
  < % end %>

After starting the Phoenix server (iex -S mix phoenix.server) and connecting to the server using your XMPP client, you should see a page like the following:



Here you are. This is all for this tutorial. You should now have environment properly set to start developing amazing ejabberd and XMPP powered web applications.

As you have seen, in a matter of minutes, you were able to create a powerful web app integrating ejabberd XMPP framework. By merging Phoenix and ejabberd, a whole new set of applications can emerge. We are eager to see what amazing apps you will build with it.

Special thanks to Sonny Scroggin (@scrogson) for the discussion and inspiration for this tutorial and video :)


by Mickaël Rémond at April 14, 2015 14:59

Paris ejabberd meetup #2 is tomorrow !

Our second Paris ejabberd meetup will take place tomorrow, april 15th, in ProcessOne office.

We will talk about ejabberd latest features and share our vision for ejabberd future. You are also very welcome to join to introduce your project.

You can register on Paris ejabberd Meetup page.

See you there !


by Mickaël Rémond at April 14, 2015 10:13

April 11, 2015

Ignite Realtime Blog

Announcing Openfire 3.10.0 Release Candidate

The Ignite Realtime Community is pleased to announce a release candidate build of the upcoming 3.10.0 release.  A lot of work has gone into this RC since the beta release a few months back and with your help testing, we are hoping to turn around a full 3.10.0 release very soon!  Here are some of the highlights since the beta:


  • OF-885 : Use non-blocking, async IO for BOSH connections
  • OF-893: Fix mutual authentication for BOSH
  • OF-869: Update Jetty to version 9.2
  • OF-877: BOSH connector does not properly restart after configuration change


For those of you that track our progress on Github, we are starting a new approach for development going forward.  An Openfire 3.10 branch has been created and the hope is that we will not have feature creep in this branch, but instead focus on stability and be able to make point releases when the situation warrants.  In the past, Openfire's point releases (ie 3.9.0 to 3.9.1) was a mixture of bug fixes and new features.  The new features will appear in other branches with an eye toward a future 3.11 or 4.0 release!  We are always looking for more folks to help develop Openfire, so please send us those pull requests and stop by our XMPP MUC room to say hi.


So please test this RC and report issues you find in the Openfire Support ForumDo not report issues by commenting on this blog post please!


Here is a listing of download links and md5sums for this release.  You can find these also on our beta download page.




ddf2fc93ad0a5c01e9f41860aeac90ad openfire_3.10.0.rc_all.deb


Happy testing!

by Ignite Realtime Blog ( at April 11, 2015 02:48

April 10, 2015

yaxim DNS Issues

Currently, the service is experiencing connectivity problems (“remote-server-not-found” or “connection-timeout” on server-to-server links, “Unable to resolve” on clients) due to a DNS problem.

To support DNSSEC, we are moving the and domains to a different set of nameservers. It looks like the old nameservers for stopped resolving the domain before the 72h transition period was over; a support ticked has been opened for this. Please bear with us (or flush your resolver cache) until the issue has been fixed.

April 10, 2015 15:11

April 09, 2015


ejabberd Meetups: From San Francisco to Paris

Thank you all for joining us for our first meetup in San Francisco !

ejabberd stickers

Here are the slides of the talks given during ejabberd San Francisco Meetup in march 2015.

A vision for ejabberd

This is Mickaël Rémond presentation on latest achievements and progress made on ejabberd during the last few months. He then shared his vision about the next steps to bring ejabberd XMPP platform to the next level.

Archipel project introduction

This is slide deck for talk given by Archipel Project Team, with Nicolas Ochem as speaker. It introduces the concept behind Archipel, a solution to manage and supervise virtual machines based on XMPP.

Nicolas Ochem presenting Archipel

Second ejabberd Meetup in Paris

For those who can join us at Paris ejabberd meetup #2 on april 2015, 15th, we will follow up on ejabberd features and roadmap.

You can register on Paris Meetup page.

See you there !

by Mickaël Rémond at April 09, 2015 13:59

April 07, 2015


10 Day Challenge: Build a mobile social network

Scoping the features

We’ve already had a few conversations about what Project Isizwe wants to achieve.

We are helping them create the backend messaging for ‘WiFi Chat’. Wifi-Chat is a localised social network which allows the Government to have real-time conversations with citizens and opens up the opportunity to meet and chat online.

There are a few ways to think about how we plan the features in a limited time span:

  • perfect code, but nothing shipped
  • completely hacked code, but shipped
  • perfect code, with some working features and the rest on a road map

We decided on option 3.

So we sat down with the Isizwe team to talk through the launch features and are now working to get them written.


In terms of helping the end-user, we came up with the following features:

  • status sharing (similar to twitter),
  • Buddycloud channels for different conversations,
  • users will be able to create their own profile on WiFi Chat and upload an avatar (pic),
  • government will be able to create Chat Channels for any relevant discussion topic that they would like,
  • users will be able to join these Chat Channels and provide real-time feedback,
  • government will be able to create individual channels for each District, Municipality, City or Town under which multiple chat discussions will be ongoing.

(our working document)

Wifi-Chat’s features are interesting because we’re having to design it for very low-end devices. We also have to account for some users that might not have used such a service before. This shows up in the little design elements: a “hamburger menu” is replaced with just text saying “menu”. We’ll find out more on Monday when we meet some future users.

In other news, we’re staying at a lion farm, eating lots of biltong and enjoying the weather.


You can follow our code at and infrastructure at

by mizarf at April 07, 2015 11:32

April 02, 2015

Fanout Blog

Realtime API design guide

New to the subject of realtime APIs? This article is the place to start! We'll discuss the most common design approaches and their pros/cons, as well as link to the documentation of 16 public realtime APIs that you can use for inspiration.


by justin at April 02, 2015 16:53

March 31, 2015


R16.3: Multi-Master Directory, XMPP Archive/Search & ACP127 support

We’re pleased to announce the availability of Isode’s latest release, R16.3, which can be downloaded now from our website. R16.3 is a major Isode release which adds new capabilities across the entire Isode product range, including:


We’ve introduced a multi-master capability to M-Vault, complementing the single-master approach to replication defined in the X.500 protocols around which M-Vault was developed. M-Vault is the first directory to offer both multi-master and X.500.


M-Link gains a new Archive Server for archive of all messages (including 1:1 chat, MUC and PubSub). XMPP clients can access archives using Message Archive Management (MAM) as defined in XEP-0313. M-Link also gains three new web applications:

  1. Message Archive Management, allowing browser-based access to information in the archive.
  2. Statistics, a lightweight monitoring alternative to the M-Link Console GUI.
  3. Forms Discovery and Publishing, for end-user publishing and display of FDP forms.
M-Link Statistics Web App

M-Link Statistics Web App


We’ve added gateway support for text based organisational message protocols, which we’re collectively describing as “ACP127”. The first release of this capability supports ACP127 and DOI 103S, a popular US variant, and enables conversion with STANAG 4406 (compliant to STANAG 4406 Annex D) and SMTP (following the MMHS over SMTP extensions).

In addition we’ve made extensive improvements to MConsole and M-Link Console to support the new M-Switch and M-Link family capabilities. For a full run-down of new capabilities in R16.3, please see the Product Release page. We’ll be publishing further blog posts over the coming weeks focusing on some of the new R16.3 capabilities.

by Will Sheward at March 31, 2015 11:30

March 29, 2015

Ignite Realtime Blog

Smack 4.1.0 released

The Ignite Realtime community is very happy and proud to announce the release of Smack 4.1.0, our open source XMPP client library. Since Smack 4.1 is not binary compatible with Smack 4.0, i.e. it is not a drop-in replacement, make sure to have a look at the "Smack 4.1 Readme and Upgrade Guide".


Smack 4.1 marks a milestone in the development history of Smack, as its obsoletes aSmack, the build environment formerly required to port Smack to Android. Starting with 4.1, Smack is able to run natively and unmodified on Android.


A further release highlight, among many others, is the support for XEP-198: Stream Management. Note that like every new big feature, Stream Management is disabled by default.


The full changelog can be found at, the javadoc is available accessible via and the documentation available at


We would like to thank everyone who provided feedback, bug reports and contributed. The developers and contributors for the 4.1.0 release, since 4.0.0 are:


$ git shortlog -sn 4.0.0..4.1.0

   631  Florian Schmaus

     4  Vyacheslav Blinov

     3  Anno van Vliet

     3  Daniele Ricci

     2  Georg Lukas

     2  Júlio Cesar Bueno Cotta

     2  lucastucchi

     2  vito-c

     1  Abmar Barros

     1  Anno

     1  Chris Deering

     1  Christoph Fiehe

     1  Gilles Cornu

     1  Gligor Selimovic

     1  Jae Jang

     1  Luke GB

     1  atsykholyas


The signed tag used to upload the 4.1.0 artifacts to Maven Central points to 4bb8aea2815ceaab4224d1e2c3d80ba70c1f3803. As always, Smack 4.1.0 is available via Maven Central.


Now go ahead and implement a open source XMPP client with Smack. Be it for Android or one of the many platforms supported by Java. But even more importantly, provide feedback and help to improve Smack. We try our best to make Smack one of the best, stable and reliable open source libraries for XMPP, but it's far from being perfect. Join #smack (freenode) and discuss with us how Smack could be improved.


Happy Hacking.

by Ignite Realtime Blog ( at March 29, 2015 14:23

March 26, 2015


10 Day Challenge: Build a mobile social network

Tomorrow morning some of the Buddycloud team departs from Berlin, Germany, for Johannesburg, South Africa.

We’re excited to build a production-ready mobile social network for Project Isizwe, including user and group communication: backend, frontend, message synchronisation in just 10 days. This is amazingly fast and we’re up against a very tight schedule.



Project Isizwe provides free WiFi to township residents and has 500K users on their free wifi service. Now they want to help their users communicate, help and share information with each other. And more…  

Project Isizwe identified a big problem with how their users are being ignored by the government. They noticed two things:

  • there is no effective forum for feedback and debate between residents and the Government and,
  • the younger residents don’t feel they are heard through traditional government channels.

For example, younger residents never attend town-hall meetings and this leads to their voice being lost in the decision making.

The Project Isizwe team designed a solution called Wifi Chat and asked Buddycloud to help them with in-app messaging and social infrastructure to power this.


Wifi Chat will provide a real-time, secure and easy to use set of channels and site for informing citizens of new developments or topics and receiving feedback, input and comments.

Because messaging is really important to Project Isizwe’s strategy, they wanted to build wifi-chat as open source using open standards. This will enable their developers  to extend the Buddycloud to new in-house apps. For example, various city Governments could integrate their own communication channels into one service.

They had us at “open and extensible” and we offered to jump in and help and learn about their requirements.

Deciding to use a ready-made backend like Buddycloud has immediately saved at least a year of development time. That means our time in SA can be used to just spin-up a ready-made Buddycloud stack on their network and leaves us free to focus on developing the frontend.

And so to the frontend: we’re up against some interesting challenges:

  • lots of low end devices
  • web only

To give you an idea of the devices we’re dealing with here’s a selection:

Phone modelShareOSVersionScreen size
Huawei Y220-U0011.3%Android2.3320x480
Samsung GT-S5280 Galaxy Star4.5%Android4.1.2240x320
Vodafone VF685 Smart Kicka4.3%Android4.4320x480
Nokia Lumia 5204.2%Windows Phone8@2_240x400
Samsung GT-S5301 Galaxy Pocket Plus3.7%Android4240x320
ZTE V7953.2%Android2.3320x480
BlackBerry Z102.8%BlackBerry10@2_384x640

This week we’ve been thinking about how to best create a realtime messaging solution on resource constrained devices. We’ve been going backwards and forwards on Angular, Backbone and other Javascript frameworks to work out what will best suit this project and enable us to ship in 10 days.

We’re going to work some magic

For quick spin-up of the backend, we’ll be using the Buddycloud-vm project to generate and orchestrate new server images for testing and production servers.

For the next 10 days we’ll be posting a daily development report covering the the technical challenges. You can start following our code progress starting on Monday as we push to

Felix has already started working his interface magic and we’ll be posting more images as they fly off his machine.

See you on Monday!

by imaginator at March 26, 2015 19:43