This article was initially published in French, and it got some interest, so we started to translate the whole series in English. If you can read French, you can follow the whole series there: http://www.goffi.org/tag/parlons_xmppThe translation to English was done thanks to: Poulet , Éfrit , Paco , mbarbarosa , Weyfonk and Chteufleur . The whole series is under CC By-SA , and any help would be appreciated to help with the translation of next articles.(Follow the corresponding link to read the previous episodes).
In the software development field, and much in the libre software, group’s discussions are really common, mostly with IRC (Internet Relay chat).
This venerable protocol do what we ask it and XMPP is strongly inspired by it. Let’s see that closely.
Group’s discussions used nowadays are called MUC (Multi-User Chat) and are defined by XEP-0045. This one standardizes and extends the first solution called Groupchat. As all that comes from IRC, I’ll explain as they come the major differences between them.
It is possible to acces a chat room located on any server from any server (again, while it is not explicitly prohibited). Chat rooms do, as the users, have a jid, which has the pattern chat_room_name@service. For example, that of Salut à Toi is firstname.lastname@example.org: “sat” is the chat room’s name, “chat.jabberfr.org” the service.
The resource is used for occupants of the chat room: email@example.com/goffi corresponds to the occupant “goffi” in the chat room firstname.lastname@example.org. Ah little detail that I forgot in previous articles: everything is unicode in XMPP, including jid. So you can use arabic or russian nickname. But beware: some unicode characters are strongly similar, therefore it is possible to get 2 words graphically similar mixed up, we name it “homoglyphs”. For example “ｇοｆｆⅰ” looks like “goffi” but it uses different characters. This issue is mentioned in a unicode technical report: http://www.unicode.org/reports/tr36/. Also, do not rely exclusively on a nickname to identify someone (espcially that it is possible that it can be reused by someone else between two sessions).
The nickname is linked to the chat room and not to the service. You can have a nick “toto” in a chat room and “titi” in another one, and someone else can have “titi” on a third chat room. This is a big difference with IRC where we have only one nickname on a server that will be used in every chat room (channel on IRC).
To go in or go out a chat room, or to change nickname, we send an available (or not) presence directly to email@example.com/desired_nick, but this is normaly managed by your client.
It is also possible to write directly to all chat room’s occupants (under the hood this is a “groupchat” message that is sent to the chat room’s bare jid), or to have a private chat with a member (we write to the full jid of the recipient).
A chat room can be public or hidden (it will not appear in the chat room list), not anonymous or semi-anonymous (in the first case everyone can see the occupant’s real jid, in the second case only moderators and administrators can), persistent or temporary, open or accessible only by white list or can be protected by password, moderated or not.
All those parameters are normally defined at the creation of the chat room, or they can be modified after with the suitable option of your client (on Gajim: right click on chat room tab => Manage Room => Configure Room). According to the service you use, you can configure more or less things, for example limit the occupant’s maximal number.
A feature often implemented is the history or “back log”: when you get in a chat room, the service sends you the last X messages, allowing you to understand the context of the current conversation.
Also, if a public archive of the chat room is kept (we say “logged” chat room), the service must warn you (it’s mandatory in the XEP), this is another good point compared to IRC. For sure, one has to remember that anyone in the room can keep a log and could publish it without your consent.
So far, so good, but a great strength of IRC is its simplicity: no need to create an account, you just have to pick a nick (unique), with a server, and that’s it! So, you won’t be disapointed, XMPP has exactly the same thing with connections called “anonymous”. No anonymity in terms of Tor here, but rather the possibility to get a temporary account, with a jid more or less random, for the connection time. This comes built-in but it must often be explicitly enabled in the server configuration, and most of the time, anonymous connections are limited to the local network, no communication with other servers (to avoid spam).
If you want to chat as with IRC in a simple and intuitive way, and if you like the console, I would strongly recommend Poezio which is an excellent XMPP client that is easy to use: initially, without changing the configuration, you will be anonymously connected to the MUC service of Poezio. It is inspired by Irssi/Weechat and use the same commands (and more generally those of IRC). Below the welcome message, without changing the configuration, we see the anonymous jid assigned for the session time.
Well this episode is long enough, but I am not finished with MUC, therefore we will talk about it next time, probably with transports.
After about 3 months yet another GSOC has come to an end. This is the part of the program that I am sure almost every accepted student would feel sad about. End of those weekly meetings, end of those long chats with your mentors, and a lot more fun.
So my project was about adding support for Link Local (read Serverless) messaging (an XMPP Extension – 174) to Smack’s API. Though I didn’t complete everything that was expected as a part of my proposal but the basic implementation of this API is ready and working. Using the current API you can establish an XMPPLLConnection that is capable of announcing its presence over a local network and able to receive incoming connections and then communicate over a TCP connection. This was verified with the help of Gajim (an XMPP client for linux.) I made a video that demonstrates this process and shows messages being received over a Link Local Connection with the help of my API.
Even though officially the program has come to an end, I will actively contributing to Smack in future and will extend the current functionality to what I had written in my proposal, along side my Mentor Florian Schmaus.
Finally, the Google Summer of Code 2015 concluded. Over 1,000 students - including myself - used the summer to develop amazing open-source software, making our daily life better.DNSSEC for minidns
I successfully finished my project, to include support DNSSEC in minidns, a popular DNS client library for Java with support for Android. Just to summarize my previous posts, here is a list of things developed during the summer:
To ensure correctness of all features, I also added a lot of unit tests to minidns. Due to this I was able to find some relevant bugs in minidns. Unfortunately, some of the optionally desired features did not make it into usable state until today. I will further work on adding the following after this years GSoC:
I’d like to say a warm thank you, to everyone involved with the organisation of the GSoC at XSF (which acted as my host organization) or supported me at my project. This includes, but is not limited to:
Storing momentary data for Sensor Devices by a node that sends back History data stored by the Logger.Work
With this I conclude the modules made in ‘Prototyping IoT Tools’ Project for GSoC 2015. Will focus a little on Code Clean up and tutorials for the same.
Next monday is the soft pencils down date and the firm pencils down is scheduled for next friday.
I completed the support for DANE and did further testing. With DANE support being added, we can finally start adding DNSSEC and DANE to applications. Hooray.
The list of open TODOs:
Hopefully the first three points will be finished until monday, allowing me to focus on tests on documentation the last four days (as suggested by Google).
This version is an important milestone because it’s the first version which is written solely for Java 8!
In particular that means, it leverages many of the new Java 8 goodies, most notably the new Date/Time API, Functional Interfaces (e.g. Predicate) and Lambda Expressions and paves the way for future improvements (e.g. Stream API) to keep the library modern.
The legacy Date API (java.util.Date/Calendar/TimeZone) has been replaced by the new java.time package, i.e. Instant, OffsetDateTime and ZoneOffset.
Event Listeners have been replaced by java.util.function.Consumer, which really saved a lot of similar interfaces and thanks to lambdas there isn’t even a syntactical difference.New Features A special release highlight is the support for the Jabber Component Protocol, which allows you to write External Components for an XMPP server. So the library isn’t exclusively usable for client development anymore, but now also for server component development! More about that in a future blog post.
Further new features are:
The updated documentation can be found here.
Support for XEP-0198: Stream Management is nearly done, but still needs some polishing, so it’s postponed to the next version.
Thanks for everybody who provided feedback and bug reports! I’m happy to hear more from you!
Logging momentary Data of a Sensor device using another resource of the same Jid.Work
A newcomer's introduction and journey into to the world of XMPP.
Helpful for beginners who are just starting to use XMPP.
For last couple of weeks I have been working on the XMPPLLConnection and Stream management. I have learned about Java NIO (read Non-Blocking I/O). Successfully implemented it in some test tasks given by my mentor and also implemented it to an extent in my project source code.
I have been testing my code for incoming connection requests with the help of Gajim on a VM. However there seems to be a problem with Gajim (This is what I have felt after trying some things suggested by David and Florian on the IRC channel #smack.) Whenever I get a Socket connection request from Gajim I send back a Stream Open packet to it but it immediately Resets the TCP connection by sending an RST packet. I have so far checked that there are no firewalls turned on for my network, I have made sure that the StreamOpen stanza is being written to the stream and is being sent to Gajim’s IP from which the request comes in.
All the above investigation was done with the help of WireShark.
However it fails to establish a TCP connection for some reason. I am still trying to figure out what’s going on.
We have started preparing our Advanced Erlang ejabberd Workshop that will take place on the 17th of november 2015 in Paris.
The main focus of the workshop will be to showcase the use of ejabberd for broadcasting messages and alerts. The goal is to demonstrate that you can truly unlock the power of XMPP by implementing more than one-to-one messaging.Session 1: Building advanced broadcast messaging service with XMPP and ejabberd
Talk 1: ejabberd State of the art to implement one-to-many chat services (Mickaël Rémond)
I will be presenting all the methods available in ejabberd and XMPP to build large scale groupchat system that meet the challenge of modern messaging. In a world where browser-based chat and mobile messaging applications are the dominant clients for large XMPP networks, building groupchat system on top of XMPP is not as straightforward as it should be. However, XMPP and ejabberd have adapted themselves to these new requirements.
The talk will cover and compare various XMPP extensions that are used today for distribution one-to-many messages:
I will then explore a conversation-based, presence-less approach to enable group discussion in ejabberd and XMPP. This will be an opportunity to present our work-in-progress extension to enable Skype or WhatsApp like group conversations.
Talk 2: Broadcasting with XMPP PubSub. Building efficient and scalable message broadcast services (Christophe Romain and Jérôme Sautret)
The goal will give you a broad overview of ejabberd PubSub extensible implementation. It will explains how you can benefit from the multiple plugins available to configure a scalable Pubsub deployment for your own specific needs.
This talk will be also a good opportunity to give an overview of ejabberd PubSub API and introduce participants to PubSub plugin development.
Talk 1: Managing large scale ejabberd infrastructures: Dealing with operational challenges (Christophe Romain)
The talk will present experimental technics to push Erlang application deployment further. It will shows in the specific case of ejabberd how you can use those methods to manage and upgrade large scale XMPP services without downtime.
The workshop will take place in Paris on November 17th, 2015. You can join us for a fixed affordable price of 100 euros (exc. VAT). You can register on Eventbrite: ejabberd Workshop – November 2015.
A question which comes up very often is the following:
Can I use MatriX with Unity 3d?
Of course you can. Many of our customers are using it with great success in their Unity projects.
Unity is based on Mono. MatriX is designed for cross platform and works on all major .NET platforms, including Mono.
Many Unity developers have some problems to get started with MatriX on Unity.
This post should be a small tutorial and address some of the issues you may be facing during your Unity development.
1) Download the correct MatriX dll (Mono build). MatriX builds are not universal, which means you need to download and reference the MatriX library for Mono.
The Mono build can be found at the latest binary downloads here:
when you browse to MatriX => Mono
2) The System.Xml.Linq.dll seems to be not a standard Unity reference. Download it as well and add it to your assets. Otherwise Unity may throw an exception when you run your project.
3) Depending on your Unity version you may get compiler errors on iOS. When you use the latest Unity version this should be no problem. On older Unity versions this problem is related to obfuscation. To resolve this please contact us directly.
4) The iOS stripping feature causes problems. It does not work when reflection gets used. The core Xml serializing engine in MatriX is build on reflection using a factory pattern. You either have to remove stripping from your complete project, or exclude the MatriX classes.
Here is an example of a linker.xml file excluding all MatriX classes:
It looks like disabling all stripping in Unity is not enough and the linker.xml file above must exist.
5) Some of our users reported that connecting to an XMPP server does not work inside the Unity editor because of some networking problems of the IDE. When the code gets executed or published on a device it works fine. This is a restriction of Unity and not related to MatriX.
If you run into any other problems please contact us directly. We do our best to solve them.
Ludovic Dubost, XWiki founder, explains what he has learned in more than 10 years running his company. Mickaël and Ludovic discuss what it is like to be both a programmer and a founder. Ludovic discuss what you have to do to stay relevant in a quickly evolving and highly competitive environment.
We hope you will enjoy this open discussion between two programmers, Open Source product builders and company founders.