I want to be notified immediately when one of the backend servers behind my HAProxy instance goes down. HAProxy offers alerting functionality, but only via SMTP: when a backend goes down it sends an email to a list of recipients via an SMTP server you provide. Unfortunately, email isn’t an ideal mechanism for real-time notification, and I don’t have an SMTP server accessible from my HAProxy instance. In this post, I’ll show my setup of HAProxy posting its alerts to a Slack channel and the Pushover push notification service, using smtp-http-proxy and AWS Lambda.
Here's the changelog:
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.
You can get the latest Mono build from NuGet here:
2) MatriX requires System.Xml.Linq.dll. Make sure that you reference System.Xml.Linq in your project 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 link.xml file excluding all MatriX classes:
It looks like disabling all stripping in Unity is not enough and the link.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.
Welcome to the 13th issue of our newsletter. Here are the links we found interesting in July:Go’s March to Low-latency GC
Twitch uses Go for many of their busiest systems. Its simplicity, safety, performance, and readability make it a good tool for the problems they encounter with serving live video and chat to millions of users.XMPP : Swiss Army Knife for Internet of Things (IoT)
IoT communication is complex and varied, and XMPP is a great candidate for an application-layer protocol. Developers can use it in IoT for communication among devices and their corresponding servers and users in the cloud.MITTO
Mitto is a worldwide IoT SIM card for connected devices. It wants to make your IoT projects more about the actual project and (much) less about figuring out cellular carriers and connectivity.Fighting XMPP Abuse and Spam with ejabberd
In this video, Mickaël Rémond explains the features, options and API that can be used to protect ejabberd servers from spam and various other types of attacks. The video was recorded at ejabberd Advanced Erlang Workshop in Paris.XMPP Mobile groupchat: Introducing MUC Subscription
We are announcing MUC Subscription, a new experimental feature in ejabberd that makes group conversations in XMPP work seamlessly with mobile clients.Open Source Contribution: XMPP Module for React Native
Working with React Native, a relatively new mobile app development framework has overall been a great experience. However, one of the common complaints of developers about react native has been the lack of off-the-shelf libs/modules for certain use-cases e.g. XMPP.Read and Write to Devices With Converse.js
This tutorial is about using Converse.js to read values and write values to devices, and also retrieve history of fields.New Jabber/XMPP Client for iOS
Intercambio is a Jabber/XMPP client for iOS. It is open source and you are welcome helping to improve it and shape it to your needs.
A customer of mine asked for a WebRTC based, self hosted solution. So I started investigating and stumbled upon the great Otalk IM Client. Unfortunately it has not been maintained for a while. I decided to go with it nonetheless. I updated dependencies as required to make them work with latest stable NPM (3.x) and Node.js (6.x) as applicable and fixed bugs all along the way. Check out my fork if you are interested! Feedback would be very welcome. I think it makes for a very good starting point if you were about to create your own WebRTC solution. Or maybe even just a regular chat client.
We are proud to introduce our new ejabberd release, ejabberd 16.06. As usual it includes many bug fixes, but also several improvements.
The big improvement in this release is a new Access Control List (ACL) infrastructure. ACL rules are used in ejabberd config file to define fine-grained access to ejabberd features.
In ejabberd 16.06, the ACL configuration has been much improved to make it both simpler to use and easier to read. Moreover, ACL and access rules are not mandatory anymore when configuring access restrictions for a feature or a module: You can just inline the user, for example, making small configuration much easier to setup properly.
To make you even more comfortable, our new code is still supporting the old syntax and you can mix old and new syntax. It means that you can still use your existing configuration file and that you can migrate incrementally, as needed.The new ACL syntax
New access rule will look like this:access_rules: my_access: - allow: admins - deny: blocked - allow: - user: "email@example.com" - ip: "18.104.22.168/32" - allow: moderators
This is an example definition for my_access rule. It is composed of four groups. They are evaluated from top to bottom order. the first with all listed acl rules evaluated as true is used as result. If none of them matches, evaluation fallback to default value deny. Above definition can be parsed as: if user belongs to ACL definition admins, return allow, if not, and user belongs to ACL definition blocked, return deny. otherwise for user “firstname.lastname@example.org” when connected from ip: “22.214.171.124” return allow, and for users in ACL definition moderators return allow as well, in all other cases return deny.
We can see in this example two new additions that were introduced in this rewrite:
You can use any rule that is allowed inside acl: sections (like user, server, resource, user_glob, etc.) and one additional rule that is allowed only inside access_rules: section, acl: NameOfACL that will look for definition of NameOfAcl inside acl: section and use it for matching. If you have only one ACL rule name to use you can use short form - allow: acl_rule, additionally - allow: all or - deny: all can be shorted still to - allow and ‘- deny`.
Shapers can also be specified using new syntax, but they now go into shaper_rules: section and they look like that:shaper_rules: my_shaper: - 100: admin - 10: all
Rules defined in access: section will use old syntax, and work as before, so you don’t need to update your old config, to adapt it to that change.
At last, one can define module specific access rules directly in modules configuration section, this is simpler to understand when reading configuration.
Let’s get a simple example of the changes. With previous ACL implementation, one could have this:acl: bad_servers: ip: - "XXX.XXX.XXX.XXX/32" admin: user: - "aleksey": "localhost" access: muc_admin: admin: allow muc_create: local: allow muc: all: allow s2s: bad_servers: deny all: allow c2s_shaper: admin: none all: normal modules: mod_muc: access: muc access_create: muc_create access_persistent: muc_create access_admin: muc_admin
Which can be translated to this since ejabberd 16.06 with new ACL implementation:acl: admin: user: "aleksey@localhost" access_rules: s2s: - deny: - ip: "XXX.XXX.XXX.XXX/32" - allow c2s_shaper: - none: admin - normal modules: mod_muc: access: - allow access_create: - allow: local access_persistent: - allow: local access_admin: - allow: admin
Shorter and clearer. Please also note that you can use the JID literally as a string. The previous awkward username: domain syntax can go away.Changes
This is a selection of the most relevant changes:Config
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 that you’ve found a bug, please search or fill a bug report on Github.
Those of you keeping an eye on the Swift or Isode Twitter accounts will have noticed that a beta release of the new Swift 4.0 is now available for download.
Swift 4.0 includes a number of important functional changes compared to Swift 3.0 as well as a significant change to the look and feel of the product.
The main changes are listed in the changelog but there are two big changes that you’ll notice immediately on launching this Swift beta:Better Chat Monitoring
Swift already makes it very easy to monitor events in multiple chat rooms through the use of keyword highlighting rules. In response to requests from a number of users we’ve supplemented this with the addition of a “trellis” layout option, allowing multiple chats and rooms to be tiled instead of being exclusively displayed as tabs within a single window.
This new option (Change Layout from the View menu) allows the user to define the number and arrangement of tiles to be displayed simultaneously and then move chats or rooms into an appropriate position. The trellis layout option and the existing tabbed layout option can be flexibly combined.New Chat Design
We’ve introduced a new, cleaner chat design which we believe will enable users (especially in MUC rooms) to keep better track of their own contributions to conversations allows for better display of message receipts and better indication of unread messages.
The Swift 4.0 beta is available for Windows, MAC OS X, Ubuntu & Debian Linux. Please email (email@example.com) or tweet (@swift_im) any feedback you have to help us further improve Swift.
I've just uploaded Smack 4.1.8 and 4.2.0-beta2 to Maven Central.
Smack 4.1.8 fixes a few minor issues and is expected to be the last release of the 4.1 branch. As always, Smack releases with the same major and minor version numbers are drop in replacements. Ideally you just need to change a single variable somewhere in your build system.
Smack 4.2.0-beta2 is the latest beta of Smack's current development branch. Notable additions include support for XEP-0313: Message Archive Management (MAM) and the IoT XEP series.
We are announcing today MUC Subscription, a new experimental feature in ejabberd that make group conversations in XMPP work seamlessly with mobile clients.
Today, a large proportion of XMPP chat projects are targeting both mobile, focusing on Whatsapp-like group conversations. Developers of such projects had been deeply frustrated because it was not possible to easily implement this feature on top of XMPP group chat features.
The main issue with XMPP group chat is that it is bound to user presence. Group chat in XMPP is based on XEP-0045: Multi-User Chat. It was designed to replicate IRC-like chat room, at a time where mobile internet connections were very rare. As a result, the protocol is based on presence. You join a room when you want to participate. You leave it when you are done.
On mobile, presence is almost irrelevant. You are always somewhat loosely reachable. However, your application may not run all the time because, to save battery life, mobile operating systems will hibernate your application when you are not actively using it. Mobile applications are supposed to be reachable through push notification services as they have generally no open TCP connection to the server in background state.
From XMPP point of view, it means that when the application is asleep, the XMPP client is not online. When it is not online, the user cannot be a participant in any chat room. He does not get messages nor notifications and thus misses events in the chat room.
Moreover, every time the user gets online, he has to rejoin all his ongoing conversations (MUC rooms). This is very consuming in terms of battery life and bandwidth.
Several workarounds had been tried by developers:
However, none of this approach did prove to be an easy straightforward solution to the problem. It did not work very well in the sense that these work-around are not totally transparent and affect several parts of your client development.MIX to the rescue
There is a work-in-progress at the XMPP Standard Foundation (XSF) that aims to build a full rework of the Multi-User Chat specification, taking the requirement to avoid relying on presence into account.
The specification is called XEP-0369: Mediated Information eXchange (MIX). ejabberd already implements the draft since a few months and we are actively working on it and supported the effort.
However, this is a work-in-progress that will take time before being fully usable as a Multi-User Chat replacement.
As we wanted to solve the problem today, for all XMPP developers, we decided to explore a path in-between. We developed a smaller, less ambitious extension, that solves the issues developers are facing to implement mobile group chat today. We are still committed to MIX implementation and we think our proposed extension will please mobile developers and help us channel feedback to the XSF to build future proof MIX specification.Introducing MUC Sub
So, what is MUC Sub about and how is it designed ?
The goal of MUC Sub is to try to rely as much as possible on existing MUC specification, while making the smallest possible change that make mobile group conversation client easy.
We found that we only missed a few components. To play well with mobile, we just need to add the ability to send and receive messages to a room without having to send presence to the room. More generally we have to allow other type of interactions with the room (like configuration changes for example or kick and ban) without having to send presence to it to become a participant.
Basically, you need to be able to have a permanent subscription to a given room to receive the events. That subscription should grant you the right to send message and interact with the room. The name of our extension come from that simple idea: Add subscription feature to Multi-User Chat, hence MUC Sub.
We found we can put all the pieces together by reusing existing XMPP protocol components:
After writing a draft specification and a working implementation, we are very happy with the result: We have a working MUC Sub implementation that enables mobile group conversations. And we did all this by leveraging existing MUC specification and staying compliant with it.
The draft protocol is published on ejabberd documentation site: MUC Sub Draft
ejabberd main repository contains the code for MUC Sub. You can find it on Github: ejabberd.
The feature is enabled by default. To use it, just make sure you set the new parameter “Allow subscription” in the room on which you want to use it.Next steps
We suggest, you can read the draft document we wrote, use the implementation and develop a mobile client.
Please, while you do so, send us your feedback about your success and troubles implementing your mobile group conversations.
MUC Sub is already available in ejabberd Community Edition repository and is going to be available as an experimental feature in ejabberd 16.07.
It will also be deployed as an experimental feature for ejabberd SaaS platform during the Summer. We are planning to test it as soon as possible with existing customers that are already willing to use it in production.
We hope you will like the approach and develop great new mobile clients thanks to ejabberd and MUC Sub !
In this video, Mickaël Rémond explains the features, options and API that can be used to protect ejabberd servers from spam and various other types of attacks.
The video was recorded at ejabberd Advanced Erlang Workshop in Paris.
You can watch the full talk online:
You can also download the slides: Fighting XMPP abuse and spam with ejabberd.
I spent the day learning more about how tvOS and the focus engine work. I’ve further improved the UI for TVPortal. I think the details screen is final, the recordings screen is almost done and playback screen is done. This has been an interesting project and quite educational. I haven’t really dabbled in media streaming in a while.
Starting with b91978dcc4ae partial support for the IoT XEPs was added to Smack. The XEPs consists, amongst other XEPs, of
The XEPs are in experimental state, which means changes to them are possible.
Smack does currently only support a partial set of the mechanisms specified, especially when it comes to Data and Control. For example only boolean and integer values can be read and written But support for more data types can be easily added.
The development of the API was sponsored by Clayster.
Clayster creates technology to secure trust in the transactions between physical and digital entities, and strives to be that generic foundation for your physical assets digital life.
Clayster has an IoT discovery and provisioning platform supporting XEP-0347 and XEP-0324. The platform is available for those who are interested to explore XMPP and IoT further. If you don't want to run your own infrastructure, Clayster is able to provide an XMPP Server and the discovery/provisioning platform for you. Feel free to reach out to rikard at clayster.com if you are interested to learn more about using XMPP for your next IoT project. www.clayster.com