Planet Jabber

January 04, 2018

Fanout Blog

The Edge is Nothing Without the Fog

Edge computing is hot right now. The growing maturity of IoT networks ranging from industrial to VR applications means that there’s an enormous amount of discussion around moving from the cloud to the edge (from us as well). But edge computing is only the first step.

...

by daniel at January 04, 2018 14:40

January 03, 2018

Peter Saint-Andre

Scales and Modes and Tetrachords, Oh My!

In preparation for recording my arrangements of music by Yes for solo electric bass, I've started taking music lessons with Mark Stefaniw, a fine bassist in the Denver area. Under Mark's tutelage I've been digging into music theory, which is both fascinating and enlightening (especially given my many years of musical learning at the surface)....

January 03, 2018 00:00

January 01, 2018

Arnaud Joset

Errol: XMPP Automatic file sender

Errol is a file sender that rely on inotify. It can be used to watch a directory and automatically transfers the new files (or modified ones) with XMPP.

The origins

Errol find its origin in tasks I am doing for a small association, "Les compagnons du CEP", a joint buying organization who sells wines. I manage their ERP, the excellent Odoo. One of these tasks is the generation of their price list from an Excel spreadsheet (yeah, I know). I designed this process with a LaTeX generator written in python because I am fluent with it since 10 years. As I did not want to install a LaTeX distribution on the production server, the logical decision was to delocalize this task on another machine. The user uploads his excel file on a webpage, the file is saved in a "watched" directory and its transfer is triggered on the second machine with XMPP. The generation of the latex document and its compilation is performed with LaTeX and the resulting PDF is sent back to the server. The PDF is therefore available for download.

Why Errol?

In the fictional universe of Harry Potter, Errol is the Weasley family's owl. It is quite old and awkward. One could says the same about XMPP but Errol is quite useful, XMPP is too :-). Errol is a great grey owl. (see pictures)

photo credit: blurred.ca https://www.flickr.com/photos/blurredca/10527590684/ Photo credit: blurred.ca, Great Grey Owl


Howto

Prerequisites

Errol needs the following requirements:

  • A system supporting inotify (Linux).
  • an XMPP (jabber) account supporting the following XEPs: Stream Management, Publish-Subscribe, Multi-User Chat
  • A PubSub service where the nodes can be set as open. The node name is defined in the configuration file. I personally use sat_pubsub. A PubSub component developed for the project Salut à Toi.
  • A Multi-User Chat because not all XMPP accounts support PubSub. For now, some information are still shared through MUC messages. This behavior could change in the future.
  • The latest (dev) version of Slixmpp.

You can use your own XMPP server or choose a XMPP service among the following list.

Create the PubSub node

This step is optional if you already have a write access on the pubsub node. The following example use jp, the Salut à  Toi command-line interface but slixmpp or sleekxmpp can be used.

$ jp pubsub node create -f publish_model open be.agayon.errol:0 -s pubsub.agayon.be -c

The node name be.agayon.errol:0 is recommended in order to identify the functionality.

As an example, there are the node options on the service pubsub.agayon.be:

$ jp pubsub node info be.agayon.errol:0 -s pubsub.agayon.be
persist_items: True
deliver_payloads: True
serial_ids: False
publish_model: open
access_model: open
send_last_published_item: on_sub

If your server supports Personal Eventing Protocol(PEP) or if you do not want to use the generic PubSub service of your server, you can use your jid.

$ jp pubsub node create -f publish_model open be.agayon.errol:0 -s info@agayon.be -c

Tests

You can test your setup with the examples scripts of slixmpp.

Example:

./s5b_file_sender.py -j jid@example.org -p pass -r john@example.org -f /path/to/file.txt 

See the scripts for more information.

Getting started with Errol

First you need to clone the repository. Errol needs the following dependencies:

Installing

You can easily install errol with pip:

$ pip install errol

Note: errol can be installed in a virtualenv.

You can also clone the git repository:

$ git clone https://gitlab.com/jnanar/errol.git
$ cd errol
$ python3 setup.py install

On Archlinux:

A PKGBUILD will be available soon.

Configuration

You need to provide information about the XMPP account.

$ cat config.example.ini

[XMPP]
pubsub=pubsub.example.org
node=be.agayon.errol:0
room=chat@chat.example.org
jid=jid@example.org/errol
password=pass
ressource_receiver=-receiver
ressource_sender=-
nick_sender=example_sender
nick_receiver=example_receiver
receiver=jid@example.org/errol-receiver
  • jid : the jabber account
  • password: the xmpp password
  • pubsub: the PubSub server (publish activity)
  • room: the MUC (chatroom) where errol display information.

The files will be sent by jid@example.org/errol-0 and received by jid@example.org/errol-receiver . The nicks are the usernames used on the MUC.

Flying

Photo credit: Wisconsin Department of Natural Resources https://www.flickr.com/photos/widnr/ Photo credit: Wisconsin Department of Natural Resources, Great Grey Owl at Mauston

Once installed, Errol can be launched in a terminal.

$ errol --help
usage: errol [-h] [-e EVENTS] [-f FILE] [-d] -p PATH -c COMMAND

Automatic XMPP file sender and directory watcher

optional arguments:
  -h, --help            show this help message and exit
  -e EVENTS, --events EVENTS
                        Number of events to watch (delete, create modify) in
                        the directory. Once reached, the program stops.
  -f FILE, --file FILE  Config file containing XMPP parameters
  -d, --debug           set logging to DEBUG
  -p PATH, --path PATH  The path watched.
  -c COMMAND, --command COMMAND
                        The executed command: xmpp or watcher

In Hogwarts

If you want to watch the directory /tmp/sender, the following command can be used:

$ errol -f config.example.ini -p /tmp/sender -c watcher

All modified or new files created in the watched location will be sent by XMPP.

In Azkaban

If you want to receive the files, you have to launch Errol with the following command line.

$ errol -f config.example.ini -p /tmp/receiver -c xmpp

All the received files will be stored in the directory defined with the option '-p'.

License

This project is licensed under the GPLv3 - see the LICENSE.txt file for details

Why not X or Y?

Photo credit: Bernard Spragg. NZ https://www.flickr.com/photos/volvob12b/37310719232/ Photo credit: Bernard Spragg. NZ, Great Grey Owl (Strix nebulosa)

There are plenty solutions for this kind of needs. Some of them are more mature. I choose XMPP for several reasons:

  • agayon.be already provides a up-to-date XMPP server with all the needed XEPs enabled.
  • I do not want to open additional port on the client that performs the LaTeX compilation.
  • I wanted to learn to work with XMPP for machine to machine communications and use PubSub notifications (because why not?).

Among the alternatives, I could have build the service on top of:

  • sockets
  • HTTP file transfer
  • REST API
  • SSH and remote commands.
  • rsync
  • ...

Acknowledgments

Photo credit: lasta29, Great grey owl, Osaka Tennoji Zoo https://www.flickr.com/photos/115391424@N05/36873334554/ Photo credit: lasta29, Great grey owl, Osaka Tennoji Zoo

  • The french XMPP community (availaible on sat@chat.jabberfr.org, jabberfr@chat.jabberfr.org, ...)
  • The Slixmpp maintainers Florent Le Coz, Mathieu Pasquet for their nice library.
  • Emmanuel Gil Peyrot (Link mauve) for its reactivity.
  • Goffi from the Salut à Toi project for his explanations and his disponibility.

Links

by Arnaud at January 01, 2018 13:00

December 31, 2017

Monal IM

Notifications Screen

Push notifications have a lot of moving parts. To help people figure out where things may not be working (and to make sure everything is enabled), there is a new push notifications screen.

by Anu at December 31, 2017 18:56

December 30, 2017

Jérôme Poisson

XMPP based tickets and merge requests with SàT

Lot of work has been done in the past months, letting little time to talk about the novelties. Let's have a look at the most recent one.

For Salut à Toi development, we don't want to use proprietary or centralized software and we use Mercurial, so we have been reluctant to use current popular platforms. With the recent improvments of our SàT pubsub component (see https://blog.agayon.be/sat_pubsub.html), and of Libervia, our web frontend, it became clear that our old idea of using XMPP and SàT to handle tickets became close at hand, so we did it.

SàT is now able to handle tickets on top of XMPP, using Pubsub. There are many advantages

  • it's decentralized and federated, no need to have X accounts to use X tickets handlers. You can also import tickets from third party projects (e.g. plugins for your project) into your website.
  • it's standard: we can handle or fetch tickets in third party servers easily, without proprietary API.
  • it's very flexible: any field can be used, and the mechanism can be used for any list (bug tracker, TODO list, shopping list, etc.)
  • being based on SàT, it's usable on any platform
  • it can be used with gateways, allowing to use transparently tickets from other services (think about Gitlab or Github for instance)

The working is based on pubsub with an experimental addition: node schema which allows to specify a form (using data forms) which will be enforced on each item. This way tickets published by third party clients can be checked and validated. Pubsub offers permission mechanisms allowing to have public or private collections of tickets (nodes in pubsub terms). Comments are using the microblog (which really should have been called blog) feature of XMPP.

But that's not all! On top of that an other feature has been implemented: merge requests. The idea is to have a way to propose contributions in a agnostic way, meaning this can be used with Mercurial, Git, or potentially any tool. Once again we enjoy decentralisation here, and we can have contributions between people on different servers.

Below is a small video showing an example of merge request. We use jp (SàT's CLI frontend) to send a modification to a server. By default, the backend will try all registered merge requests handlers until it find one which can manage the given repository. There is a small wrapper around the command to do basic operations (notabily creating the data to export), the data and metadata are then formatted and send to the pubsub node. For now, only Mercurial is implemented, but git will definitely follow, and maybe a simple diff based handler for basic cases.

Note : if you want to do a merge request for Salut à Toi on https://bugs.goffi.org, you'll have to use the service pubsub.goffi.org with

jp merge-request set -p pubsub.goffi.org

Of course the feature is new and it's quite rough: it is not yet possible to specify which lines of a patch we comment, or to use rich formatting. This will of course come soon, but if you want to have it faster, well, merge requests are welcome ;)

You can see it on our bug tracker.

For people in Paris, I'll be at Paris Open Source Summit (booth A2, "Salut à Toi") on Wednesday and Thursday. If you want to support the project, we are on Liberapay.

See you soon for an other post on SàT novelties…

by goffi at December 30, 2017 18:01

Monal IM

Mac Offline Contacts

Somehow when I made the Mac client I forgot to enable offline contacts. I was obviously thinking about it because there was a toggle for it in the preferences but for some reason it was never hooked to anything.  Quite an oversight.  One which has been resolved now in the latest beta that will be out today. 

by Anu at December 30, 2017 16:10

December 29, 2017

ProcessOne

ejabberd 17.12

To celebrate a culmination of many efforts in 2017 to make ejabberd the best XMPP server ever, we are happy to announce 17.12 which comes with many improvements and bugfixes.

2017 has been the biggest year ever for ejabberd. Please, send us feedback to help us build an even stronger community and do even better in 2018 !

Happy New Year !

What’s new

SNI for inbound connections

Server Name Indication (SNI for short) is a way for clients to provide a server name for the certificate intended to use for TLS connection. There is a trend to replace STARTTLS (defined in RFC6120) with the new approach defined in XEP-0368 (also known as “Direct-TLS”).
This is where SNI becomes useful: there is no need now to do STARTTLS, instead, a client may directly open a TLS connection to a server and request the server’s certificate via SNI extension.
Such approach makes it possible to multiplex several services on a single port (e.g. having both XMPP and HTTP on port 443) and, for huge deployments, to offload SSL to frontends, such as nginx or haproxy.

Rewrite ejabberd system monitor

Previous version was inefficient making its usage almost pointless, but with a lot of potential. The new verion is based on memsup(3erl) application: the OOM watchdog is only started when total OS memory consumption is more than 80%. A watchdog periodically inspects all running processes and collects statistics about overloaded ones.
If the OOM killer is enabled (with ejabberd option oom_killer: true), all overloaded processes would be killed. By default, OOM killer is enabled. When memory consumption is back to normal, the OOM watchdog is stopped.

Support PubSub v1.14 and OMEMO

Missing features and behaviour has been discussed with users of the Conversations client, to improve support of OMEMO and fix the blocking items.

Improvements

A race in join_cluster has been fixed, inotifywait.exe on Windows has been fixed, ODBC configuration on Windows has been fixed, logger is killed and restarted when it’s overloaded, certificate creation and validation chain has been optimised for faster operation.
Certificates management has been improved and binary installer now provides “ready to use” and pre-configured ones.

Changes

Core

  • Rewrite ejabberd system monitor for efficiency
  • Fix incoming XMPP processing order
  • Use xmpp:try_subtag/2 wherever possible
  • Better process subtag decoding errors
  • Only allow compression after SASL as per XEP-0170
  • Don’t crash on unexpected XML events
  • Fix session mnesia table cleanup
  • Don’t let privacy list prevent local roster update

Encryption

  • Rely on Server Name Indication for incoming Direct-TLS connections
  • Speedup certificate chains creation and validation
  • Log warning on empty wildcard paths
  • Don’t call pkix_is_self_signed/1 too frequently
  • Eat less memory during building certificates graph
  • Avoid infinite loop between self-signed certs
  • Fix function clause on filelib:wildcard/1
  • Use ejabberd_pkix API in mod_sip
  • Move ‘certfile’ based options in a single place

Groupchat

  • Don’t crash on malformed IQ
  • Include x tag in presence errors related to nick change
  • Include 110 status on shutdown
  • Improve muc#roominfo and muc#roomconfig forms
  • mod_mam: Never store MUC messages in user archives

PubSub

  • Fix num_subscribers on node metadata
  • Fix send last items on initial presence
  • Send last PEP items to owner on initial presence
  • Support pubsub#publish-options PRECONDITIONs
  • Add pubsub#multi-items to features list (Support XEP-0060 v1.14)
  • Add missing Nidx building records from sql result
  • Don’t force RSM in get_items when max_items is not provided

Admin

  • Introduce option ‘ca_file’
  • Set executable permission on mac_listener when installing
  • Use /bin/sh as the explicit shell when using su in ejabberdctl.
  • Windows does not have /tmp, fallback to $HOME/conf for ODBC configuration files

Logging

  • Change loglevel of TLS failures
  • Log a warning when a disk is almost full
  • Disable default alarm handler
  • Handle also process_memory_high_watermark alarm
  • Kill and restart lager when it’s overloaded
  • Avoid excessive logging of SQL failures

Commands

  • New muc_online_room_by_regex command
  • Fix race between join_cluster and ejabberd_mnesia
  • Fix commands rooms_unused_list and _destroy
  • send_direct_invitations accepts only user jids
  • ejabberd_sm: Fix get_session_sid/3

SQL

  • Add missing server_host column in pg.new.sql
  • Add new schema for MySQL and Sqlite
  • Fix SQL serialization

Installer

  • MacOS installer is signed. You can now easily install ejabberd on your Mac.

Build

  • Compile sql_pt early
  • Binary installer uses OTP 20.2

Feedback

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.

by Christophe Romain at December 29, 2017 11:41

December 28, 2017

Monal IM

A list of good XMPP servers

I have decided I want to maintain a list of good, free XMPP servers. Primarily as a way of steering people away from Google.  Additionally, assuming the owners of these servers are ok, I’m thinking of including registration links in app.  I think a lot of people — including myself used google talk because it was convenient.  I actually wasn’t sure what server to switch to. I imagine this is even worse for someone new to XMPP. I know many people like to run their own servers, this is intended for everyone else.

To get the list started, servers that I know of. Please let me know if there are others that you recommend. There is also a  more exhaustive list but I am tying to keep this limited to larger, updated servers with carbons, stream resumption and push support and open registration.

https://jabber.hot-chilli.net  ( the server I am currently using)

https://www.jabbim.com

by Anu at December 28, 2017 17:43

The XMPP Standards Foundation

XMPP Summit 22

The XMPP Standards Foundation (XSF) will hold its 22th XMPP Summit in Brussels, Belgium, on Thursday February 1st & Friday 2nd (the two days preceding FOSDEM 2018).

Preparations are well under way. If you're interested in attending, please make yourself known by filling out your details on the wiki page for Summit 22.

If you haven't already, make sure that you're signed up to the Summit mailling list, which is where you can expect most updates to be announced.

See you all there!

by Guus at December 28, 2017 15:15

Monal IM

A new settings screen

For a variety of reasons, I’ve been staying up late at night these days.  This gives me time to do the kind of coding I wouldn’t do normally.  UI work. It’s mindlessly easy and  I find it relaxing like some people find coloring books relaxing. I know it’s an important part of the app but there is always something more technically interesting consuming my time. Except right now, where my mind is pretty shot and tinkering with text, colors and pixels is perfect.  As a result, you will see a lot of UI changes in the next update. May of these things are long overdue.  Below is the new and much more functional settings screen. 

by Anu at December 28, 2017 04:35

December 26, 2017

Monal IM

The wonders of refactoring

As I’ve purged and rewritten  a lot of code recently, I am revisiting things that I implemented in 2009 and then never really looked at again — why fix something that is working?  Cell sizing in a table view used to be a real pain an involved a decent amount of code that calculated the size of various cells using the size of a string for a particular font. Worse still, these string calculations had to be done on the main thread because they used UI elements to compute their size.  It was a lot of code that was replaced entirely by auto layout and  the UITableView’s automatic dimension.  The end product is conversation cells that look a lot more like iMessage:

by Anu at December 26, 2017 04:29

December 25, 2017

Monal IM

iOS Supports inline images

It has been a long time coming. iOS now has inline images.  Like the Mac app, it is running HEAD to see if the link sent over is an image. Improperly configured web servers may not work here. However, this works very nicely with XEP-0363. This is for HTTPS only Monal does not deal with HTTP at all and will pass anything with out SSL over to safari.  This is available in the beta that is going out right now.  Along with inline viewing, there is a nice photo browser you can use to pass the image off to other Apps.

by Anu at December 25, 2017 05:08

December 23, 2017

Monal IM

Showing images by default

When I originally added inline images I had it turned off by default because of privacy concerns. It seems that most people prefer it to be on or don’t even know it is an option.  It seems like inline images and media (images, video, url previews etc. ) are just part of modern chat and they should be on by default.  The option to turn it off will always be there.

by Anu at December 23, 2017 17:00

December 22, 2017

Monal IM

Monal for Mac OS 2 beta 2

I have updated the download link with Beta 2. The most notable fix in this update is the addition of the server features window under the account menu. This works identically to the iOS one.  

by Anu at December 22, 2017 20:10

yaxim

Spam Reduction on yax.im

Jabber spam has become a huge problem over the last one or two years. Spammers register thousands of accounts on hundreds of public servers, and then send masses of messages to real and guessed Jabber addresses. The yax.im server operators are committed to fighting XMPP spam and helping others do so as well. In the last two weeks, yax.im automatically blocked 46996 messages from 14293 different accounts registered on 282 different servers.

Measures

Many public servers have adopted a policy to silently block messages from strangers. This is problematic for two reasons: First, it breaks the expectation of communication - you can’t just send a message to somebody, you first need to ask them to become you friend (and to see their online status). Second, it is not apparent to you when you send a message - you don’t receive a response, and not even an error message. You can only guess whether the message got delivered or not.

The yax.im server is using a custom mod_firewall rule-set to detect and reject spam messages, both from and to accounts on yax.im. If you send a message that does not pass the spam filter, you will receive an error message (“Blocked due to abuse”).

The filter will flag certain automatic messages (like server monitoring notifications) as spam. If you are running a bot on yax.im, please ensure that all users who want to receive such notifications add the bot as their contact.

Furthermore, accounts registered on yax.im for the purpose of sending spam will be terminated immediately, and all accounts registered from the same IP address will be flagged and reviewed.

The rule-set is updated periodically to reflect changes in the spam transmissions. Feel free to contact the server operators to learn more.

Advice to Public Server Operators

If you run a server with public registration, please consider this advice: Don’t do it!

Seriously, running a public server is a time-consuming job, and if you don’t take the time to monitor and disable spammer accounts, you quickly become a liability for the whole XMPP ecosystem by annoying thousands of users (on other servers). It is perfectly fine to run a server for your friends and family, and to invite them individually.

If you insist on running a public server, please take the following measures:

  • Limit and monitor In-Band-Registration
  • Protect account registration with a CAPTCHA, phone number validation or other means that are hard to cheat
  • Throttle the number of messages you accept from local users, especially to non-contacts
  • Provide XEP-0157: Contact Addresses for XMPP Services so that other admins can contact you

Thank you for observing all safety precautions.

December 22, 2017 12:37

Monal IM

Saying farewell to Google Talk

Google talk was great when it came out but has been abandoned by Google.  I’ve been maintaining support because I know a lot of people use it, but I myself will stop using it.  I’m going to try using  an account on the hot chilli server rather than run my own.  I’ve been using these guys for my testing accounts for a long time.  They have a fast, well  maintained prosody server that supports modern specs. I recommend it.   I’m going to use xmpp.monal.im only for testing (this is why s2s connections will fail going forward).  Push.monal.im will be the push server and s2s will continue to work.

You can reach me at: anurodhp@jabb3r.org

by Anu at December 22, 2017 01:01

December 21, 2017

Monal IM

Server Features

Monal hasn’t been very good about showing you what it sees on your server. This results in debugging issues becoming just a shot in the dark. I did add verbose logging to beta versions but that’s not something the average user has any use for.  To rectify that, I am adding new screens that surface what is going on underneath. In addition to the other day’s login status bar notifications, I have added a details button to the server which you can tap on after logging in to see if Monal correctly detects some common, modern XEPs on your server.  I hope to make these screens more detailed but this is a start that I hope is useful 

 

by Anu at December 21, 2017 16:34

December 20, 2017

Peter Saint-Andre

Ceding Our Humanity

Geoff Huston's keynote talk at RIPE 75, "The Death of Transit and Beyond", provides a sobering perspective on the recent evolution of the Internet - and, because so many of our personal, economic, intellectual, and political interactions happen over the Internet these days, on the evolution of society at large. Although Geoff tried to steer clear of alarmism, the picture is not pretty. Extreme concentration of wealth and power has led to a few leviathans controlling an overwhelming percentage of our online life (as of today, Apple, Google, Microsoft, Amazon, Alibaba, Tencent, and Facebook are seven of the eight largest public corporations in the world by market capitalization). Furthermore, as I explained in my talk "The Internet is Dead, Long Live the Internet" three years ago, in large measure these companies make money by tracking everything we do online and then selling those profiles to advertisers and marketers. And it gets worse: unlike the so-called robber barons of the late 19th century Gilded Age, which merely controlled markets for transportation, steel, oil, coal, and other physical goods, in subtle and not-so-subtle ways today's robber barons monitor and increasingly direct our mental and emotional life through the news we learn about, the books we read, the videos we watch, the people we talk with and connect to, and much more....

December 20, 2017 00:00

December 17, 2017

Peter Saint-Andre

A Novel Idea

I've long imagined that the sixth movement in my "eudaimonia suite" of books on the art of living would be about Taoism. However, recently an intriguing ambition came to me: writing a novel about Pyrrho's journey to Central Asia and Northwestern India with Alexander the Great's army and his conversion to skepticism there by early Buddhists (likely in the Gandharan city of Taxila above the Peshawar Valley - a great center of learning at the time). I like the goal of exploring the commonalities among early Taoism, early Buddhism, and Pyrrhonism, as well as Heraclitus and other pre-Socractic philosophers. In essence, this would be a novelization of Christopher Beckwith's thesis from his fascinating book Greek Buddha. Aside from the usual challenges of working through the ideas of a thinker like Nietzsche or Thoreau, there would be new obstacles to overcome here: I don't know Sanskrit or classical Chinese, and I've never written any fiction, not even a short story. Truth be told, I'm not deeply drawn to stories and I rarely read novels. However, a few years ago I read both The Glass Bead Game and Siddhartha by Hermann Hesse, and recently I read When Nietzsche Wept by Irvin Yalom. In so doing, I realized that I enjoy novels of ideas, which have no plot to speak of but make up for it with interesting dialogue and internal discovery. In any case, after I publish Songs of Zarathustra a few weeks from now I'll first finish my translation of the ethical writings of Epicurus and then write an epitome of Aristotle's moral philosophy, so writing a book on ancient Buddhism and skepticism is years away....

December 17, 2017 00:00

December 15, 2017

Monal IM

Mac OS 2.0 Beta 1

You should see a new update (or use the link to the side) .  This update to the Mac app has all the changes happening in iOS and all the associated bug fixes.  I hope HTTP uploads are working better for everyone now.

by Anu at December 15, 2017 16:07

ProcessOne

DotGo 2017 Video: Go for Real Time Streaming Architectures

Mickaël Rémond, ProcessOne CEO, gave a keynote during this year’s dotGo conference on November 6th in Paris. He explained what streaming architectures are and demonstrated the benefits of using Go to build such platforms.

Streaming applications are at the core of realtime information system. With microservices, streaming components are becoming increasingly important.

With the rise of cloud architecture, it is now easier and more elegant to use Go to write realtime high-performance components for streaming architecture than to use traditional tools. If you want to benefit from Go, look no further – ProcessOne specialises in Go software development.

You can watch the full keynote below, and read the slides here:

by Marek Foss at December 15, 2017 10:15

Monal IM

Login Errors

One of the most frustrating things in the past has been trying to figure out why Monal won’t log in.  I have made an effort to surface these errors on the account screen with a small notification on the status bar.    I am passing over any error info I get from the XMPP server and also translating some of the SSL errors to plain English. Part of the reason this hasn’t existed is there are is a very large number of possible SSL errors that don’t have error message stringsin iOS.  Aside from the 4 common ones I’ve written messages for,  I am showing the error code. This can be looked up at OSStatus to see what it means .

 

by Anu at December 15, 2017 04:45

Fanout Blog

WebSockets with AWS Lambda

Fanout Cloud handles long-lived connections, such as HTTP streaming and WebSocket connections, on behalf of API backends. For projects that need to push data at scale, this can be a smart architecture. It also happens to be handy with function-as-a-service backends, such as AWS Lambda, which are not designed to handle long-lived connections on their own. By combining Fanout Cloud and Lambda, you can build serverless realtime applications.

fanout-lambda

Of course, Lambda can integrate with services such as AWS IoT to achieve a similar effect. The difference with Fanout Cloud is that it works at a lower level, giving you access to raw protocol elements. For example, Fanout Cloud enables you to build a Lambda-powered API that supports plain WebSockets, which is not possible with any other service.

To make integration easy, we’ve introduced FaaS libraries for Node.js and Python. Read on to learn how it all works.

...

by justin at December 15, 2017 01:02

December 13, 2017

Monal IM

APNS Pushes work on iOS

I now have APNS pushes working on iOS.  I am not sure this is something that is needed on OSX because of the lack of restrictions on background activity there, however there may be some benefit, given this is how iMessage operates as well.

by Anu at December 13, 2017 13:48

December 11, 2017

Arnaud Joset

JP, a powerful command line interface for Salut-à-Toi

Salut à toi is a unique XMPP client. As its official description says, it's a "multipurpose, multi front-end, free (libre) and decentralized communication tool". It has been actively developed by Jérôme Poisson (Goffi) and Adrien Cossa (Souliane) since 2008. Today, I will focus on the use of "JP", a command-line interface. It can be used to send or receive files directly from a shell, pipe commands to or from XMPP, use XMPP easily in a script and of course play with pubsub nodes.

The following article describes uses of JP. Several of them are availabled in the trunk version of Salut-à-Toi.

Introduction

JP can be used to launch complexes commands in script, for debugging purpose or to explore XMPP services. JP is the command line interface and it connect to the daemon Salut-à-Toi (SàT). You can share the session between the front-ends:

  • JP of course.
  • Primitivus as a console front-end.
  • Livervia, a web based front-end.
  • Sententia an Emacs front-end (WIP).
  • Cagou an original mobile XMPP client based on SàT (WIP).

If you want to send a file easily, discover which services are available on a server, send messages in your scripts, manage your xmpp account, control video player, edit your blog post with your favorite editor, pipe streams, manage your pubsub nodes etc, JP is for you!

Usage

JP can be used as a command line tools or in a small shell environment.

First, we need to configure and launch the daemon sat.

$ sat

Your default profile will be connected. If you have no profile, JP can be used to create one.

$ jp profile create -j my_jid@example.org  -x mypassword profile_name
$ jp profile connect -p profile_name

Your password is saved in the sat settings. You can connect automatically with the option -c. It should be noted that SàT defines a default profile. It can be bypassed with the option -p. 1

$ echo "test message" | jp message send recipient@example.org -p profile_name -c

You can obtain help about a command with the option -h.

$ jp pubsub -h
usage: jp pubsub [-h]
                 {get,delete,edit,subscribe,unsubscribe,subscriptions,node,affiliations,search,hook,uri}
                 ...

positional arguments:
  {get,delete,edit,subscribe,unsubscribe,subscriptions,node,affiliations,search,hook,uri}
    get                 get pubsub item(s)
    delete              delete an item
    edit                edit an existing or new pubsub item
    subscribe           subscribe to a node
    unsubscribe         unsubscribe from a node
    subscriptions       retrieve all subscriptions on a service
    node                node handling
    affiliations        retrieve all affiliations on a service
    search              search items corresponding to filters
    hook                trigger action on Pubsub notifications
    uri                 build URI

optional arguments:
  -h, --help            show this help message and exit

JP is a Swiss army knife. Let's discover its possibilities through a few examples.

Examples

$ jp -h
usage: jp [-h] [--version]
          {file,input,uri,message,event,info,account,param,debug,ad-hoc,ticket,invitation,profile,shell,avatar,pipe,pubsub,bookmarks,roster,identity,blog}
          ...

This software is a command line tool for XMPP.
Get the latest version at http://salut-a-toi.org

optional arguments:
  -h, --help            show this help message and exit
  --version             show programʼs version number and exit

Available commands:
  {file,input,uri,message,event,info,account,param,debug,ad-hoc,ticket,invitation,profile,shell,avatar,pipe,pubsub,bookmarks,roster,identity,blog}
    file                File sending/receiving
    input               launch command with external input
    uri                 XMPP URI parsing/generation
    message             messages handling
    event               event management
    info                Get various pieces of information on entities
    account             XMPP account management
    param               Save/load parameters template
    debug               debugging tools
    ad-hoc              Ad-hoc commands
    ticket              tickets handling
    invitation          invitation of user(s) without XMPP account
    profile             profile commands
    shell               launch jp in shell (REPL) mode
    avatar              avatar uploading/retrieving
    pipe                stream piping through XMPP
    pubsub              PubSub nodes/items management
    bookmarks           manage bookmarks
    roster              Manage an entityʼs roster
    identity            identity management
    blog                blog/microblog management

Send a message

$ echo "Hello World" > filetest
$ jp message send recipient@example.org < filetest

or

$ echo "test  jp" | jp message send recipient@example.org

Send files

The following command allows to send the file file.txt to recipient@example.org.

$ jp file send file.txt recipient@example.org

Receive files

The following command allows to receive a file in the /tmp directory.

$ jp file receive -p agayon --path /tmp

Get information about a server

$ jp info version agayon.be
Client name: Prosody
Client version: 0.10.0
Operating System: Linux

Get disco information

Query a Server

$ jp info disco agayon.be
Features

http://jabber.org/protocol/commands
http://jabber.org/protocol/disco#info
http://jabber.org/protocol/disco#items
http://jabber.org/protocol/pubsub#publish
jabber:iq:last
jabber:iq:private
jabber:iq:roster
jabber:iq:time
jabber:iq:version
msgoffline
urn:xmpp:blocking
urn:xmpp:carbons:1
urn:xmpp:carbons:2
urn:xmpp:http:upload
urn:xmpp:http:upload:0
urn:xmpp:mam:0
urn:xmpp:ping
urn:xmpp:time
vcard-temp

Identities

┌───────┬──────┬─────────────────┐
│catego │ type │ name            │
├┄┄┄┄┄┄┄┼┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┤
│store  │ file │ HTTP File Upload│
│server │ im   │ Prosody         │
│pubsub │ pep  │ Prosody         │
└───────┴──────┴─────────────────┘

Extensions

urn:xmpp:http:upload
    typetext-single
    varmax-file-size
    1048576
urn:xmpp:http:upload:0
    typetext-single
    varmax-file-size
    1048576

Items

┌─────────────────────┬──┬────┐
│entity               │  │ nam│
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┼┄┄┄┄┤
│upload.agayon.be     │  │    │
│pubsub.agayon.be     │  │    │
│auth.agayon.be       │  │    │
│proxy.agayon.be      │  │    │
│sat-pubsub.agayon.be │  │    │
│chat.agayon.be       │  │ bot│
└─────────────────────┴──┴────┘

Query an account

$ jp info disco info@agayon.be
Features

http://jabber.org/protocol/pubsub#publish
urn:xmpp:mam:0
urn:xmpp:mam:1
urn:xmpp:mam:2
urn:xmpp:push:0
urn:xmpp:sid:0

Identities

┌────────┬────────────┬─┐
│categor │ type       │ │
├┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┼┄┤
│pubsub  │ pep        │ │
│account │ registered │ │
└────────┴────────────┴─┘

Manage pubsub nodes

The following examples show how to manage pubsub nodes on the service pubsub.agayon.be.

Create a node

$ jp pubsub node create -s pubsub.agayon.be node_name

Subscribe to a node

$ jp pubsub subscribe -s pubsub.agayon.be node_name

Edit

The edit command allows to edit an item under a node.

$ jp pubsub edit -s pubsub.agayon.be node_name

The default text editor is opened. It is possible to directly edit a XML file. This command is useful for debugging purpose.

If you want to edit a post without having to edit xml directly, use jp blog edit.

As an example, you can try to edit the following xml file.

<entry xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>author@example.com</name>
  </author>
  <generator>JP (SàT)</generator>
  <title>I am a pubsub post !</title>
  <content>This is the content of this great post.</content>
</entry>

Once the file is saved, a notification appears in Gajim. For now, the name of the post is a hash.

pubsub post on Gajim

pubsub post on Gajim

Manage your XMPP Blog

It is possible to manage a post with XMPP. It is based on PEP, a simplified version of pubsub. If your server support PEP, JP can help you to manage this blog easily.

Publish a post

First, you need to define your preferred syntax. In this example, I select markdown. This option can also be set in any other frontend (e.g. Primitivus). Whereafter you can edit a new post with the syntax jp blog edit.

$ jp param set Composition Syntax markdown -p agayon
$ jp blog edit

Your favorite editor open and you can edit your blog post with markdown syntax. When you save and close it, another file open. You can edit your settings:

{
    "allow_comments": "true",
}

You can verify the accessibility of your post with the following command:

$ jp blog get 
content: 
Great test !
Make testing great again !
Yuuuuuuge publication.

It is also possible to modify your last blog post simply with jp blog edit --last-item.

Your blog post are also visible on other clients like Movim (see below) and interfaces like Livervia.

Post on movim

Use jp shell:

In order to ease debugging of services, JP comes with a shell interface. You only need to launch jp shell. You can obtain help by typing ?.

$ jp shell
cmd pubsub
pubsub> ?
Shell commands:
Documented commands (type help <topic>):
========================================
cmd    do    help  shell  use_clear  version
debug  exit  quit  use    verbose    whoami 

Action commands:
positional arguments:
  {get,delete,edit,subscribe,unsubscribe,subscriptions,node,affiliations,search,hook,uri}
    get                 get pubsub item(s)
    delete              delete an item
    edit                edit an existing or new pubsub item
    subscribe           subscribe to a node
    unsubscribe         unsubscribe from a node
    subscriptions       retrieve all subscriptions on a service
    node                node handling
    affiliations        retrieve all affiliations on a service
    search              search items corresponding to filters
    hook                trigger action on Pubsub notifications
    uri                 build URI

Select a command

> cmd pubsub
pubsub> use node urn:xmpp:microblog:0

Navigate into commands

> cmd bookmarks/list
bookmarks/list> -c
... CMD result
bookmarks/list> cmd ..
bookmarks> cmd
>

Example: List bookmarks

$  jp shell
> cmd bookmarks
bookmarks> cmd list
bookmarks/list> ?
Shell commands:
Documented commands (type help <topic>):
========================================
cmd    do    help  shell  use_clear  version
debug  exit  quit  use    verbose    whoami 

Action commands:
optional arguments:
  -h, --help            show this help message and exit
  -p PROFILE, --profile PROFILE
                        Use PROFILE profile key (default: @DEFAULT@)
  --pwd PASSWORD        Password used to connect profile, if necessary
  -c, --connect         Connect the profile before doing anything else
  -l {all,local,private,pubsub}, --location {all,local,private,pubsub}
                        storage location (default: all)
  -t {muc,url}, --type {muc,url}
                        bookmarks type (default: muc)
bookmarks/list> -t muc
private:
    Movim [movim@conference.movim.eu] (*)
    Archlinux - blah blah [archlinux-fr@chat.jabberfr.org]
    bot [bot@chat.agayon.be] (*)

Example: get disco information

> cmd info
info> use jid pubsub.agayon.be 
info> disco
Features

http://jabber.org/protocol/disco#info
http://jabber.org/protocol/disco#items
http://jabber.org/protocol/pubsub
http://jabber.org/protocol/pubsub#create-nodes
http://jabber.org/protocol/pubsub#delete-items
http://jabber.org/protocol/pubsub#delete-nodes
http://jabber.org/protocol/pubsub#instant-nodes
http://jabber.org/protocol/pubsub#item-ids
http://jabber.org/protocol/pubsub#publish
http://jabber.org/protocol/pubsub#publisher-affiliation
http://jabber.org/protocol/pubsub#purge-nodes
http://jabber.org/protocol/pubsub#retract-items
http://jabber.org/protocol/pubsub#retrieve-items
http://jabber.org/protocol/pubsub#retrieve-subscriptions
http://jabber.org/protocol/pubsub#subscribe

Identities

┌───────┬─────────┬───────────────────────┐
│catego │ type    │ name                  │
├┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┤
│pubsub │ service │ Prosody PubSub Service│
└───────┴─────────┴───────────────────────┘

More

Some alternatives

SleekXMPP

SleekXMPP is a xmpp python library. It provide two examples of pubsub clients. The first, pubsub_client.py can manage nodes and the second one, pubsub_events.py, can manage events.

./pubsub_client.py -j jid --password=passwd pubsub.agayon.be create node_name

Gajim

Gajim is a great desktop client. It can be used to post on pubsub nodes too.

pubsub post on Gajim

Movim

Movim is a social network platform based on XMPP. It massively use pubsub to allow users to interact.

Conclusions

Salut-à-Toi is a great XMPP client. JP, its command-line interface, is a powerful tool. It can be useful to debug services, pubsub nodes and play with 'social' capacities of XMPP. It is actively developed and new features are coming. We will be soon able to make todolist or fill a bug ticket on a XMPP based system.

Links

  1. It is possible to use jp profile modify to set the default profile.

by Arnaud at December 11, 2017 15:00