Planet Jabber

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

December 10, 2017

Remko Tronçon

Universal/Isomorphic React on a Go backend

React’s standard flow is to start with an empty HTML template from the server, and populate the DOM entirely on the client. Letting React pre-render the initial HTML for your app on the server before the client takes over has some advantages, though: it lets slower (mobile) clients load your app much faster, and it’s good for SEO for search engines that don’t support JavaScript. Since you have to run React on the server to do this, you need a JavaScript-able backend, which is why such Universal (a.k.a. Isomorphic) apps are mostly built with Node.js backends. However, you can create universal React apps with other languages too, including Go. In this post, I’ll walk through an example of a universal React app running on a Google App Engine Standard Go backend (which is slightly more constrained than a regular Go server).

Continue reading post

by Remko Tronçon at December 10, 2017 23:00

December 09, 2017

Monal IM

Testing a new server

Set up a new prosody server at xmpp.monal.im today. The DNS is still propagating but it should be up everywhere soon.  SSL certs via lets encrypt. If want to add me, I am anu@monal.im .  This doubles as the push server right now as well, where I hope to test APNS.

by Anu at December 09, 2017 20:00

December 08, 2017

Monal IM

Testers wanted for Monal 3

I am looking for testers for Monal 3 on iOS. Specifically I am looking for users with access to an XMPP server with push support. If you are interested, email me info@monal.im .

 

by Anu at December 08, 2017 23:01

Ignite Realtime Blog

Openfire 4.2.1 Release

@akrherz wrote:

The Ignite Realtime Community is thrilled to announce the availability of Openfire 4.2.1. But wait, you may wonder why Openfire 4.2.0 was not announced nor blogged about. The answer is that after a soft release of Openfire 4.2.0, we noticed a number of folks hitting a database schema issue that would cause logins to fail. We decided to turn around a fix for that issue and now fully announce the new release.

So what has changed with Openfire 4.2? A lot! Some highlights:

  • XEP-0237 Roster Versioning
  • Server to Server (s2s) is more robust
  • The websocket functionality, previously in a plugin, was merged into core
  • The Admin Console now has a Pub-Sub administration interface
  • You can now manually test a Server to Server connection on the Admin Console
  • XEP-0198 Client Resumption is now available
  • A lot of polish and new handy functionality was added to the Admin Console
  • Openfire plugin loading is much more robust

The changelog denotes the full listing of Jira issues addressed in this release and 4.2.0.

Here is a listing of sha1sum values for the release binaries, which can be found on our download page.

a038d417784f6d623014ba88013407f3d36792ac  openfire-4.2.1-1.i686.rpm
6c8886834b9b7d2ce6144d7ce23d3e47bbff91bd  openfire-4.2.1-1.noarch.rpm
34bb23661c77b27a37572532fa23a0f8c6459015  openfire-4.2.1-1.x86_64.rpm
8a66b230323a9231dc2aca6ae7288186e56d5315  openfire_4.2.1_all.deb
bcf543c65c1bf22da8c05413646230f30a60b378  openfire_4_2_1_bundledJRE.exe
947ef8ee8c08c527d1c3932bec7ea580b3c08956  openfire_4_2_1_bundledJRE_x64.exe
a4ec386f9eb6cf4078b505ec57d007c799853034  openfire_4_2_1.dmg
922bb44ed7b72b75d781f1091978cb4759575112  openfire_4_2_1.exe
750524d79a18e8c6c38702f980dec961fa102f82  openfire_4_2_1.tar.gz
6d04e462bc7a5b39701d7dd1538c5508bdeff339  openfire_4_2_1_x64.exe
00b6a27057bac2b26ba6084b6606ca1ee449fc18  openfire_4_2_1.zip
e918dfbfcd91d6f0562d20aa0600266db5f855e7  openfire_src_4_2_1.tar.gz
7e82909a7e9a55ed71483b054e61d0ec95b0cccf  openfire_src_4_2_1.zip

Please let us know of any troubles you find by either visiting our webchat or creating posts in our Discourse Openfire Dev Forum. Thanks for using Openfire!

Posts: 2

Participants: 2

Read full topic

by @akrherz daryl herzmann at December 08, 2017 19:59

December 07, 2017

ProcessOne

Movim migrates its official server to ejabberd

Movim is a distributed social networking platform founded in 2010. It can be accessed using existing XMPP clients and Jabber accounts, and is a free and open source software licensed under the AGPL.

With version 0.12 released in October, Movim migrated its official server to ejabberd. Before, they were using Metronome, a Prosody fork. Today, we are chatting with Timothée Jaussoin, the founder of Movim, about this very complex migration.

Marek Foss: I understand your previous setup used Metronome. What was the initial advantage of it?

Timothée Jaussoin: We migrated to Metronome a couple of years ago from ejabberd, because it was the only “light” server back then that was able to offer a proper Pubsub implementation. It was, in fact, developed in partnership with the Jappix project (XMPP social network) that was also using Pubsub. ejabberd back then was quite heavy to run, and had crashes as well as bugs in the Pubsub component.

MF: What caused your decision to migrate back to ejabberd?

TJ: I chose to move back to ejabberd, because Metronome was getting outdated and Prosody was not “Pubsub ready”. Metronome development stalled, which left us with open bugs and no implementation for the new things that were coming to XMPP (for example MAM).

MF: Indeed, ejabberd is now receiving regular monthly updates, with fixes and new features. How long did it take to prepare for the migration?

TJ: The migration took several months, because the migration script “prosody2ejabberd” (that works also for Metronome) was incomplete. With the help of Holger Weiß, Evgeny Khramtsov and especially Christophe Romain, we worked on it for weeks to be sure that all the important information were migrated from the Metronome flat files to the ejabberd databases (Mnesia or SQL). Note that the scripts can import Pubsub nodes as well as MUC and accounts.

MF: And how long did the actual migration take?

TJ: After performing the proper backups, the migration took a weekend. I found a final issue in the script that was a bit difficult to figure out (wrong order of the imported items for the Pubsub nodes). With that resolved, everything went quickly.

MF: Now that the migration is complete, what other benefits of ejabberd do you see apart from the ability to connect many simultaneous users you mentioned in your announcement?

TJ: We now have a proper packaging for our Linux distribution – Debian, which certainly makes it easier to maintain. There’s also an improved scalability and more stable CPU and memory consumption, which helps to predict hardware requirements. Last but not least, with a reactive and dedicated team like ProcessOne, which is always here to help finding and fixing bugs and implementing new features (like the missing pieces of the Pubsub extension), we now have a backend that can be relied on in the long term.

MF: Do you think ejabberd will help you in Movim’s growth?

TJ: ejabberd will definitely help! Even if I see ejabberd more as a tool that needs integration and tuning to create a proper platform, ejabberd seems to be the more serious solution to build proper messaging systems using the XMPP protocol.

MF: You also created an ejabberd Movim config that you use, so other Movim instances should also use ejabberd – am I right?

TJ: Yes, ejabberd is the recommended server to use with Movim, even if we are still working with the Prosody team to have a good compatibility with the project in the future. Prosody is used a lot for small self-hosted servers, where Movim could also be installed next to it. The configuration on our Wiki is indeed here to help administrators to setup properly an ejabberd server to make it work with Movim.

MF: Cool! So Movim is not only distributed, but also cross-platform, and compatible with both big and small servers. Thanks for the chat, Timothée, and good luck to you and the rest of the Movim team!

TJ: Thank you.

To learn more about this project, check out the website at Movim.eu and the source code available on GitHub.

We encourage all projects that are open source, use functional programming and XMPP solutions. At ProcessOne, the developers behind ejabberd and experts in Erlang, Elixir and Go, we want to hear & chat about your project that uses these technologies – Learn about Go and ProcessOne!

by Marek Foss at December 07, 2017 19:21

Monal IM

Ten Years of Monal

If you  look at the top of some files you will notice the year they were made is 2008. I realized today that come the new year, it will be 10 years since I began to write Monal (then called SworIM).  All of this came up after a conversation at brunch one day with my brother about how our fancy new iPhone 3G didn’t have a better messaging ability and the only way we could message was by email.  We could use text but SMS cost money in those days.

Back in the magical year of 2008, the iPhone was on its first iteration. iPhone OS 2 was coming out (it wasn’t called iOS until later). iMessage was not going to be a thing for at least 3 more years, whats app didn’t exist. Push notifications didn’t exist and there were no 3rd party multi tasking capabilities on the iPhone. In fact, the most popular messaging client was AIM, which stupidly disconnected every time you closed the app.  Initially Monal supported both AIM and XMPP because people (including myself) used AIM a ton back then.

Much of the code for Monal is actually based on the API introduced in iOS4. With the removal of VOIP sockets, it looks like APNS push and side by side multi tasking (iPad) is the only way that Monal will multitask going forward.  Additionally, I going to focus on keeping the code as modern as possible. I have been very conservative with changes to support as many older iOS versions as possible,  the App Store has the ability to retrieve the last compatible version now  so older OS versions will still have a functioning client. This should improve stability and make changes easier.  Additionally, iOS updates do not cost money anymore so its not unreasonable to expect everyone to update.

In fact, there are some screens that are exactly the same from 10 years ago.

 

Something that’s been long over due is a new icon.  I’ve been tinkering with the idea for a while and decided to try it out yesterday.  This is the first iteration on the new icon. I would love feedback — esp since I made it myself based on vectors of the old one, so it’s hardly the most professional looking thing.  The SVG is here is you want to play with it. I think we can all agree the new icon looks better in the post iOS 7 world. 

by Anu at December 07, 2017 14:27

December 05, 2017

Monal IM

Storyboards and Google

I’m currently working on a feature branch that will  be merged into develop when complete.  If you are curious to see whats going on look here:

https://github.com/anurodhp/Monal/tree/ios11-iPhoneX

The storyboard board migration is almost complete and with that side by side multi tasking. For iPad users, this should be a major improvement.  Additionally, dropbox and google login broke due to changes in the API. I am working on restoring both of those as well. Google for iOS is almost complete and will be followed by OSX soon .

I am currently testing side by side :

 

by Anu at December 05, 2017 19:22

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.

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 05, 2017 12:26

December 04, 2017

Tarun Gupta (GSoC 2017)

Wrap-Up

Hello all,

This was indeed an exciting summer. During this summer, I initially implemented the elements along with their parsers and serializers, required to implement the MIX features. Then I implemented a MIX Registry to keep track of channels joined by a client, and sync the same information with their rosters. This Registry is responsible for returning an object of the joined channel, which can be used for various features like setting nick for the channel, sending messages, etc. Finally. I implemented basic functionalities for MIX in Swiften, along with a MIX Example client and MIX Mock Server to respond to clients. Let me explain the features I have added as part of GSoC'17 along with examples:

1.) Client querying MIX service for hosted channels: This allows my client to query server for hosted channels.

2.) Client querying for publish-subscribe nodes supported by MIX channel: This allows my client to query server for supported standard nodes for a MIX channel.

3. Client joining a channel hosted on MIX domain: Client then published its already joined channels and sends a request to channel service to join.
./Swiften/Examples/MIXListAndJoin/MIXListAndJoin another@example.com/some mixtest2 example.com
Connecting...Connected
Request list of channels.
List of rooms at example.com
1. coven - coven@example.com

Request supported nodes for MIX channel: coven@example.com
Nodes supported by channel coven@example.com
1. urn:xmpp:mix:nodes:participants
2. urn:xmpp:mix:nodes:messages
3. urn:xmpp:mix:nodes:presence
4. urn:xmpp:mix:nodes:jidmap

Already Joined channels:
No channels already joined.

Successfully joined channel coven@example.com
[warning] Swiften/MIX/MIXRegistry.cpp:40 joinChannel: Channel already joined: coven@example.com
In the example above, user with JID another@example.com/some initially connects to server and request list of channels, followed by supported nodes for MIX channel.
  • urn:xmpp:mix:nodes:participants: holds information about all participants of the channel along with their nick.
  • urn:xmpp:mix:nodes:messages: holds all messages sent to the channel.
  • urn:xmpp:mix:nodes:presence: holds presence status for all clients of the channel.
  • urn:xmpp:mix:nodes:jidmap: holds mapping information from client's real JID to proxy JID.
The warning in above example indicates a use case where user tries to join an already joined channel.

4.) Join Sync: This is an interesting and much required feature, which allows different clients of the same user to sync already joined channels and other information.
./Swiften/Examples/MIXListAndJoin/MIXListAndJoin another@example.com/someelse mixtest2 example.com
Connecting...Connected
Request list of channels.
List of rooms at example.com
1. coven - coven@example.com

Request supported nodes for MIX channel: coven@example.com
Nodes supported by channel coven@example.com
1. urn:xmpp:mix:nodes:participants
2. urn:xmpp:mix:nodes:messages
3. urn:xmpp:mix:nodes:presence
4. urn:xmpp:mix:nodes:jidmap

Already Joined channels:
1. coven - coven@example.com

[warning] Swiften/MIX/MIXRegistry.cpp:40 joinChannel: Channel already joined: coven@example.com
In the example above, same user another@example.com tries to connect to server with JID another@example.com/someelse initially connects to server and client successfully indicates already joined channels and yet another warning when user tries to join an already joined channel.

5.) Retrieve Participants of Joined channel: This allows a client to retrieve the list of participants of the joined channel. This however, only returns proxy JIDs of the participants along with their nicks, if set by user.

6.) Real JID lookup of participants: This allows a client to lookup participants proxy JID in the channel and retrieve its real JID. Right now, the present client only offers join as a simple join with subscriptions, however for join with preferences, if user have jid-hidden preference for its JID Visibility, then this will still return participants proxy JID.

7.) Sending/Receiving Messages: The client can now send messages to the channel, which will be forwarded to all online clients and a replicated message will be sent to sender with same submission ID as the ID of message sent.

Client I
./Swiften/Examples/MIXListAndJoin/MIXListAndJoin another@example.com/some mixtest2 example.com
Connecting...Connected
Request list of channels.
List of rooms at example.com
1. coven - coven@example.com

Request supported nodes for MIX channel: coven@example.com
Nodes supported by channel coven@example.com
1. urn:xmpp:mix:nodes:participants
2. urn:xmpp:mix:nodes:messages
3. urn:xmpp:mix:nodes:presence
4. urn:xmpp:mix:nodes:jidmap

Already Joined channels:
No channels already joined.

Successfully joined channel coven@example.com
[warning] Swiften/MIX/MIXRegistry.cpp:40 joinChannel: Channel already joined: coven@example.com

Participants of channel coven@example.com
1. 99ba30b1-0d0a-4739-95ad-fc1eb3c12a49#coven@example.com

Lookup of participant in channel coven@example.com
1. 99ba30b1-0d0a-4739-95ad-fc1eb3c12a49#coven@example.com - another@example.com

[ coven@example.com ] : Hello, I am here! some
Client II
./Swiften/Examples/MIXListAndJoin/MIXListAndJoin some@example.com/some mixtest example.com
Connecting...Connected
Request list of channels.
List of rooms at example.com
1. coven - coven@example.com

Request supported nodes for MIX channel: coven@example.com
Nodes supported by channel coven@example.com
1. urn:xmpp:mix:nodes:participants
2. urn:xmpp:mix:nodes:messages
3. urn:xmpp:mix:nodes:presence
4. urn:xmpp:mix:nodes:jidmap

Already Joined channels:
No channels already joined.

Successfully joined channel coven@example.com
[warning] Swiften/MIX/MIXRegistry.cpp:40 joinChannel: Channel already joined: coven@example.com

Participants of channel coven@example.com
1. c0a202ff-adce-4a07-8d90-577b4e986321#coven@example.com
2. 99ba30b1-0d0a-4739-95ad-fc1eb3c12a49#coven@example.com

Lookup of participant in channel coven@example.com
1. 99ba30b1-0d0a-4739-95ad-fc1eb3c12a49#coven@example.com - another@example.com
2. c0a202ff-adce-4a07-8d90-577b4e986321#coven@example.com - some@example.com
Above two examples shows client I joining, retrieving participant list (only himself for now), and lookup of real JIDs of participants. Then client II connects, repeats the same procedure as client I, and sends a message Hello, I am here! some to channel, which is forwarded to client I. Client II simply ignores the replicated message, however it can still be useful to correlate the message with the submitted message.

8.) Setting Nick for joined channel: The client can set its nick for joined channels. If there is a nick conflict, an error payload will be returned with ErrorPayload:Condition:Conflict.

9.) Presence updates: With this client can now receive presence of all participants of the channel, as well as updated its  own presence. Client can go offline, and indicate its unavailability to other clients and similarly come online again. When a client joins a new channel or comes online after being online, channel presence of all participants is pushed to the client. 

Client I
./Swiften/Examples/MIXListAndJoin/MIXListAndJoin some@example.com/someelse mixtest example.com
Connecting...Connected
Request list of channels.
List of rooms at example.com
1. coven - coven@example.com

Request supported nodes for MIX channel: coven@example.com
Nodes supported by channel coven@example.com
1. urn:xmpp:mix:nodes:participants
2. urn:xmpp:mix:nodes:messages
3. urn:xmpp:mix:nodes:presence
4. urn:xmpp:mix:nodes:jidmap

Already Joined channels:
No channels already joined.


Successfully joined channel coven@example.com
[warning] Swiften/MIX/MIXRegistry.cpp:38 joinChannel: Channel already joined: coven@example.com

Nick Assigned: some

Participants of channel coven@example.com
1. 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com Nick: [some]

Lookup of participant in channel coven@example.com
1. 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com - some@example.com

Client is now online

[ coven@example.com ] : fff754f9-a050-48ad-87d8-3178fab98774#coven@example.com is available
[ coven@example.com ] : Hello, I am here! yetanother
[ coven@example.com ] : 8cb2cef7-37d6-47f4-9af4-42796043bb33#coven@example.com is now unavailable
[ coven@example.com ] : 8cb2cef7-37d6-47f4-9af4-42796043bb33#coven@example.com is available
[ coven@example.com ] : Hello, I am here! another

Client II
./Swiften/Examples/MIXListAndJoin/MIXListAndJoin yetanother@example.com/someelse mixtest example.com
Connecting...Connected
Request list of channels.
List of rooms at example.com
1. coven - coven@example.com

Request supported nodes for MIX channel: coven@example.com
Nodes supported by channel coven@example.com
1. urn:xmpp:mix:nodes:participants
2. urn:xmpp:mix:nodes:messages
3. urn:xmpp:mix:nodes:presence
4. urn:xmpp:mix:nodes:jidmap

Already Joined channels:
No channels already joined.


Successfully joined channel coven@example.com
[warning] Swiften/MIX/MIXRegistry.cpp:38 joinChannel: Channel already joined: coven@example.com

[ coven@example.com ] : 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com is available
Nick Assigned: yetanother

Participants of channel coven@example.com
1. fff754f9-a050-48ad-87d8-3178fab98774#coven@example.com Nick: [yetanother]
2. 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com Nick: [some]

Lookup of participant in channel coven@example.com
1. 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com - some@example.com
2. fff754f9-a050-48ad-87d8-3178fab98774#coven@example.com - yetanother@example.com

Client is now online

[ coven@example.com ] : 8cb2cef7-37d6-47f4-9af4-42796043bb33#coven@example.com is now unavailable
[ coven@example.com ] : 8cb2cef7-37d6-47f4-9af4-42796043bb33#coven@example.com is available
[ coven@example.com ] : Hello, I am here! another
Client III
./Swiften/Examples/MIXListAndJoin/MIXListAndJoin another@example.com/someelse mixtest example.com
Connecting...Connected
Request list of channels.
List of rooms at example.com
1. coven - coven@example.com

Request supported nodes for MIX channel: coven@example.com
Nodes supported by channel coven@example.com
1. urn:xmpp:mix:nodes:participants
2. urn:xmpp:mix:nodes:messages
3. urn:xmpp:mix:nodes:presence
4. urn:xmpp:mix:nodes:jidmap

Already Joined channels:
No channels already joined.


Successfully joined channel coven@example.com
[warning] Swiften/MIX/MIXRegistry.cpp:38 joinChannel: Channel already joined: coven@example.com

[ coven@example.com ] : fff754f9-a050-48ad-87d8-3178fab98774#coven@example.com is available
[ coven@example.com ] : 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com is available
Nick Assigned: another

Participants of channel coven@example.com
1. 8cb2cef7-37d6-47f4-9af4-42796043bb33#coven@example.com Nick: [another]
2. fff754f9-a050-48ad-87d8-3178fab98774#coven@example.com Nick: [yetanother]
3. 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com Nick: [some]

Lookup of participant in channel coven@example.com
1. 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com - some@example.com
2. fff754f9-a050-48ad-87d8-3178fab98774#coven@example.com - yetanother@example.com
3. 8cb2cef7-37d6-47f4-9af4-42796043bb33#coven@example.com - another@example.com

Client is going offline

Client is now online

[ coven@example.com ] : fff754f9-a050-48ad-87d8-3178fab98774#coven@example.com is available
[ coven@example.com ] : 0b8f6eb8-f42e-4ad8-b059-7052224790dc#coven@example.com is available
In above examples, client I joins first, sets its nick and indicates itself to be online. Then it just wait for message/presence updates from other clients. Then client II joins, receive presence status of client I on successful join, and sends a message which is received by client I (only other online client). Then client III joins, sets its nick, receive presence status of client I and client II on successful join, and then goes offline. As it goes offline, client I and II now receive presence updates indicating that client III is now unavailable. Then client III comes online again after 3 seconds and receive full presence updates from channel. Finally, it sends a message to channel, which will be received by client I and II. When clients go offline, neither they will receive any message nor any presence updates.

Challenges/RoadBlocks:

I would also like to include what challenges and progress struggles I faced while working on this project:

  • Firstly, the major challenge I faced was unavailability of a working MIX server. If a working MIX server was available, checking my client implementation could have been a lot easier. This forced me to write a mock server using limber framework, which could mock the responses of an actual server. This wasn't originally planned as per the proposal, but was an immediate requirement.
  • Secondly, having worked on implementing MIX features till last week of July, we had a major design change for our MIX implementation in first week of August. Initially the MIXImpl was handling all channel requests, however as per advice from mentors, I created a MIX Registry class which took care of joining / leaving channels and provide instances of MIXImpl for the joined channel. So in essence, the MIXImpl class will now only handle methods for one joined channel. This is indeed a very efficient design, and also allows syncing of roster across different clients of same  user.
I would like to thank my mentors Edwin, Tobias and Kevin for successfully guiding me through this project. I would like to continue working on this project after GSoC as a lot of new features could be added and also integration of MIX in Swift.

That's all for now :)

by Tarun Gupta (noreply@blogger.com) at December 04, 2017 14:54

Monal IM

I’m back

I’m sure you have noticed that there hasn’t been an update to Monal in almost a year. I’ve been incredibly busy and haven’t had the free time to work on this project.  Development has restarted again and  I hope to put out an update soon.  There are certain things that I will focus on in this next update and depending how it goes may be one of the biggest updates since Monal 2.

Code Modernization

Much of the Monal code was written for iOS 2 in 2008.  I have adapated it to work with changes in recent updates but it is in severe need of a clean up.  Part of my hesitance to adopt every new feature has been to support older OS versions.  I have decided to focus on iOS 9 and up.   This will reduce the scope of work, testing, and allow quicker changes.

Storyboards

I never adopted storyboards when they came out in iOS6.  Storyboards do a lot of nice things for you but they have certain downsides for code reuse.  Apple has done a lot to improve it in the last half decade, and for graphically simple Apps like Monal however, they are perfect.  Using a storyboard to handle the presentation will allow me to focus on the backend XMPP code more than fiddling with the UI for various screen sizes.

Multi tasking

Storyboards will allow me to quickly deploy side by side multi tasking that came with iOS9. This is even more important now because of multitasking changes in iOS10.

The VoIP socket I used to multitask is deprecated and appears to be done. I will be deploying a server on AWS to handle APNS push notifications.  This will require adding push modules to your XMPP server  but should have much better reliability than the older approach — one of the reasons apple got rid of it after 6 years.  This is also one of the primary source of crashes in the App.

XMPP Parser

There as a bunch of bugs in my XMPP parser. PArt of the reason for that is I do not use the streaming parser introduced in iOS5. This is much further along the way but will likely result in a major rewrite of the XMPP code.

Continuous Integration

The improvement to Xcode Server in Xcode 9 means that I can reliably run tests now on commit.  I am setting up Prosody, Openfire and jabberd servers that I can test all the basic XMPP functanility on with every commit. This should reduce surprises post release.

 

by Anu at December 04, 2017 13:30

November 29, 2017

Peter Saint-Andre

Jabber.org Account Experiment

In early August I started an experiment to once again offer accounts at the Jabber.org messaging service, where we had turned off account creation several years ago. Given that today is my "Jabiversary" (it was 18 years ago that I first posted to the JDEV discussion list!), I figured I'd end the experiment today and report on the results. My two goals with the experiment were (1) to see if people still want Jabber.org accounts and (2) to informally poll people about donating money to help us run the service, which has been absolutely free since 1999 (e.g., we might use funds to purchase new equipment or pay for individuals to fix bugs, create new features, maintain our infrastructure, offer customer support, etc.). On both counts I would say the experiment was a qualified success: I received over 1000 account requests in 4 months and at least 30% of respondents said they would be happy to donate (some even sent me cash in the mail or payments via PayPal). Based on these results, I am encouraged to move forward with opening up automated account creation again (probably in early 2018) and with establishing a formal organization (e.g., a non-profit or cooperative) to run the service so that we can open a bank account and accept donations. Stay tuned for more details on both fronts! (Oh, and if you really really need an account between now and early 2018, I can still create one for you manually.)...

November 29, 2017 00:00

November 28, 2017

Swift Blog

Swift 4.0-rc3: Now available

A new release candidate for Swift 4.0 is now available for download.

Swift 4.0-rc3 can now be downloaded from our releases page and includes the Dutch and German translations updates made since 4.0-rc2.

With this release we provide a new binary package, an AppImage for 64-bit Linux systems. This works on CentOS, Ubuntu, Debian and most other Linux distributions. It’s a single file binary package, including Swift and all its dependencies. Simply download it and mark it executable (chmod +x) to run it.

We encourage everyone to download the new build and try it out, and give us feedback to help us further improve Swift as we move toward a final release candidate.

November 28, 2017 00:00

November 27, 2017

Tigase Blog

Tigase Messenger for Android v3.0 Released

Tigase Messenger for Android v3.0 has been released! Please review the change notes below to see what has changed since our last public release.

There are lots of new features available in this version. Please consult the documentation for more information on new features.

by Daniel at November 27, 2017 20:06

Tigase Messenger for iOS v2.0 Released

Tigase Messenger for iOS v2.0 has been released! Please review the change notes below to see what has changed since our last public release.

There are lots of new features available in this version. Please consult the documentation for more information on new features.

by Daniel at November 27, 2017 19:32

Ignite Realtime Blog

Smack 4.2.2 released

@Flow wrote:

Smack 4.2.2 was tagged and released recently to Maven Central.

We like to thank everyone who contributed to this release. This not only includes the various contributors shown below, but also everyone who reported an issue or suggested an improvement.

$ git shortlog -sn 4.2.1..4.2.2                                                                                                                                           >> ~/data/code/smack
    39  Florian Schmaus
     5  Ingo Bauersachs
     2  Dmitry Deshevoy
     2  damencho
     2  vanitasvitae
     1  iachimoe

The list of fixed bugs can be found in the Smack 4.2.2 changelog. Or have a look at the github comparison of the 4.2.1..4.2.2 tags.

Posts: 1

Participants: 1

Read full topic

by @Flow Florian Schmaus at November 27, 2017 09:30

November 26, 2017

Arnaud Joset

Using sat-pubsub, a great pubsub component

In the continuity with the previous post about jp, the following article present sat_pubsub, a XMPP Publish-Subscribe (Pubsub) Service Component, build for the need of the « Salut à Toi » project.

Salut à toi (SàT) 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.

sat_pubsub allows us to use our own up-to-date persistent pubsub service.

This article is composed of several sections

Why sat_pubsub ?

There are three main reasons to use sat_pubsub.

First, the XMPP servers come with variable pubsub support. Using an external component allows users to benefits constant features independent of the XMPP server or provider.

Secondly, sat_pubub is the only free (libre) implementation that support Pubsub MAM (Message Archive Management). It allows one to research a pubsub node. This feature is used to research blog post in the database.

Thirdly, sat_pubsub is used to test new functionalities like the ability to restrict blog post to specific group of contacts (think about circles on Google+). 1.

Let's install it !

This section describes the installation process of sat_pubsub in a python virtualenv. Unfortunately, I have encountered difficulties to install twisted, a dependency of SàT, in a virtualenv with pip because my production machine has no compiler. I managed to avoid the problem by installing python2-twisted (the distribution package) then the virtualenv was created with the option --system-site-packages to give it access to the system packages. Thereafter, it is possible to install sat_tmp, a small python module that monkey patch wokkel, a dependency of sat_pubsub.

$ sudo apt-get install python2-twisted
[...]
$ hg clone http://repos.goffi.org/sat_tmp
$ cd sat_tmp/
$ virtualenv env -ppython2.7 --system-site-packages
$ source env/bin/activate
(env)$  python2 setup.py install
(env)$ cd ../
(env)$ hg clone https://repos.goffi.org/sat_pubsub
(env)$ cd sat_pubsub
(env)$ python2 setup.py install

Setup the database

According to the official documentation, we need to create the database and install the SQL schema.

$ sudo -u postgres createuser -d -P `whoami`
$ createdb pubsub
$ psql pubsub < sat_pubsub/db/pubsub.sql

Configure Prosody

In order to use sat_pubsub, we need to declare it in our prosody config file. Once again, the information is available in the documentation. Two files need to be modified:

  • /etc/prosody/prosody.cfg.lua
[...]
modules_enabled = {
    [...]
    "delegation";
    "privilege";
}
[...]
  • /etc/prosody/conf.avail/your_domain.cfg.lua

This file defines the domain configuration of your XMPP server.

This is a copy of the configuration for the agayon server. The pubsub component is available at the address pubsub.agayon.be. The following configuration:

  • enables pubsub MAM,
  • uses the component for microblogging activity,
  • announces the pubsub nodes and items in disco requests,
  • lets the component access the roster and presence informations (used for PEP).
VirtualHost "agayon.be"
    enabled = true
    [...]
    privileged_entities = {

            ["pubsub.agayon.be"] = {
            roster = "get";
            message = "outgoing";
            presence = "roster";
            },
       }
    delegations = {
                ["urn:xmpp:mam:1"] = {
                        filtering = {"node"};
                        jid = "pubsub.agayon.be";
                },
                 ["http://jabber.org/protocol/pubsub"] = {
                        jid = "pubsub.agayon.be";
                 },
                 ["http://jabber.org/protocol/pubsub#owner"] = {
                        jid = "pubsub.agayon.be";
                 },
                 ["https://salut-a-toi/protocol/schema:0"] = {
                        jid = "pubsub.agayon.be";
                 },
                 ["http://jabber.org/protocol/disco#items:*"] = {
                        jid = "pubsub.agayon.be";
                 },
            }


Component "pubsub.agayon.be"
        component_secret = "shared_secret"
        modules_enabled = {"delegation", "privilege"}

Launch

(env)$ twistd  sat_pubsub  --jid=pubsub.agayon.be --secret=shared_secret --rhost=127.0.0.1 \
--rport=5347 --backend=pgsql --dbuser=user --dbpass=pass_psql --dbname=pubsub --dbhost=localhost --dbport=5432

Let's use it !

Once prosody is restarted, the component is accessible through any XMPP client. See the following example with jp.

$ jp info disco pubsub.agayon.be -c
Features:

http://jabber.org/protocol/disco#items
http://jabber.org/protocol/pubsub#auto-create
http://jabber.org/protocol/pubsub#config-node
http://jabber.org/protocol/pubsub#create-nodes
http://jabber.org/protocol/pubsub#delete-any
http://jabber.org/protocol/pubsub#delete-nodes
http://jabber.org/protocol/pubsub#groupblog
http://jabber.org/protocol/pubsub#instant-nodes
http://jabber.org/protocol/pubsub#item-ids
http://jabber.org/protocol/pubsub#meta-data
http://jabber.org/protocol/pubsub#outcast-affiliation
http://jabber.org/protocol/pubsub#persistent-items
http://jabber.org/protocol/pubsub#publish
http://jabber.org/protocol/pubsub#publish-options
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-affiliations
http://jabber.org/protocol/pubsub#retrieve-default
http://jabber.org/protocol/pubsub#retrieve-items
http://jabber.org/protocol/pubsub#retrieve-subscriptions
http://jabber.org/protocol/pubsub#subscribe
https://salut-a-toi/protocol/schema:0
jabber:iq:version
urn:xmpp:mam:1
--
Identities:

Salut à Toi pubsub service (pubsub/service)
--
Items:

[pubsub.agayon.be]
[pubsub.agayon.be, urn:xmpp:microblog:0:comments/4e69cb98-104a-4022-b086-dfe8b9d36eeb]

The following commands are used to create a node, subscribe to it and edit an item (see the previous article).

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

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

About Agayon XMPP service

All the tests described in this blog are realized on the Agayon.be XMPP service. It is not opened for registration but having this field of experimentation is great to learn, practice and question the potential uses of XMPP. I use it with several accounts, depending on my use:

Most moderns XEPs are enabled in order to provide an up-to-date experience: PEP, Carbon, Stream Management, persistent pubsub, MAM, SRV records over TLS (useful to pass blocking WiFi accesses), etc.

Future of SàT

In a near future, the SàT project will make great announcements about new uses of pubsub. I hope this article will make you want to install sat_pubsub and experiment with nodes, data and notifications.

Stay tuned !

Links

  1. See the following blog post for more information.

by Arnaud at November 26, 2017 19:00

Peter Saint-Andre

Joining Mozilla

I'm overjoyed to announce that I'm joining Mozilla, makers of the Firefox web browser. I've been using Mozilla software since Milestone 8 of the original browser release in July of 1999, so this feels like coming home. More important, Mozilla's mission of defending the open web is completely consistent with my own commitment to open source and open standards (as demonstrated through my work on Jabber/XMPP and IETF standards for the past 18 years). I have deep respect for what the Mozilla team has accomplished, both architecturally and organizationally, and I'm extremely excited about helping to make Mozilla an even stronger force for good in the world!...

November 26, 2017 00:00

November 23, 2017

ProcessOne

ejabberd 17.11 – Happy Birthday ejabberd !

Happy birthday ejabberd !

Ejabberd has been the leading choice to serve reliable XMPP domains for 15 years, and we are happy to announce yet another great new version of your favorite server.

This version includes great new features from Google Summer of Code, many improvements and a lot of bug fixes. By the way, ejabberd is “Compliance Suite 2018” compatible now (see XEP-0387) !

New features

ACME Support

Google Summer of Code 2017 was a big success for ejabberd project. In this context, Konstantinos Kallas contributed support for the “Let’s Encrypt” ACME protocol, which is now part of ejabberd. The code was reviewed and improved by ejabberd team to ensure we meet the same standard of quality you are used to.

The objective of the ACME protocol is to make it possible to automatically obtain trusted certificates, without any human intervention. So, the main functionality of the implementation is acquiring and managing the aforementioned certificates.

All details are available on pull request #1959 on github.

Many thanks to Konstantinos Kallas for contributing this great feature ! Thanks to Evgeny Khramtsov for being the ProcessOne mentor.

Introduce ‘certfiles’ global option

The option is supposed to replace existing options ‘c2s_certfile’, ‘s2s_certfile’ and ‘domain_certfile’. The option accepts a list of file paths (optionally with wildcards “*”) containing either PEM certificates or PEM private keys. At startup, ejabberd sorts the certificates, finds matching private keys and rebuilds full certificates chains which can be used by fast_tls driver.

Example:

certfiles:
  - "/etc/letsencrypt/live/example.org/*.pem"
  - "/etc/letsencrypt/live/example.com/*.pem"

Allow writing custom modules in own path

In ejabberdctl.cfg, add this parameter to EJABBERD_OPTS

external_beams /path/to/ebin

Then, all beams /path/to/ebin/*.beam will be known by ejabberd_config at startup. This makes ejabberd able to load your own modules. So you can embed ejabberd as a dependency to your Elixir project, or manage your own backend modules, without messing with ejabberd installation.

Use new API for IQ routing

Functions ejabberd_local:route_iq/2,3 are now deprecated: ejabberd_router:route_iq/2,3,4 should be used instead.

Improvements

Build with host dependencies

Building ejabberd takes care of runtime dependencies, and some of them are even needed in order to build ejabberd. For several packaging systems, a package is not allowed to handles dependencies by itself. This makes ejabberd hard to package and maintain on these systems.

Configuring ejabberd with option ‘–enable-system-deps’ help to use hosts libraries to build ejabberd, and avoid ejabberd to handle dependencies by itself. This option has been improved to cover most needs and fix pending issues. Packagers should really have a look at this option to simplify packaging when needed.

PubSub

We are preparing work to improve the PEP implementation in ejabberd. In that regards we already fixed few glitches and improved XEP-0163 coverage.

We also added support of SQL export, to ease migration of your existing PubSub database from Mnesia to an SQL backend.

At last, we fixed the use of historical ‘hometree’ plugin, which now allows to propagate publications in the nodes tree to cover simple needs around nodes hierarchy.

Database

As an experimental feature, if you compile from sources with option ‘–enable-new-sql-schema’, an extra server_host columns will be used in your SQL tables. This feature allows to use the same database for all your vhosts. See ‘ejabberdctl update_sql’ command to update your sql schema in order to try this feature.

Upgrade

If you’re upgrading from a previous version, you must follow the instructions. More details in documentation, see upgrade notes.

Changes

Admin

  • Omit “ProtectSystem” option from systemd unit
  • Log warnings for c2s/s2s certfile option
  • Log a message when a user gets registered
  • ejabberdctl: Fix ‘read’ syntax for non-bash shells
  • Fix renew_certificates ejabberdctl command
  • Unregister commands when stopping node only if it’s last one
  • Halt ejabberd if the top supervisor fails to start

Build

  • Avoid badarg error when running get-deps before ./configure has created src/ejabberd.app
  • Fix sed invocation that was incompatible with FreeBSD’s sed
  • Makefile.in: Fix “make clean && make”
  • Improve –enable-system-deps
  • Install binaries with 755 permissions
  • Install eimp binary with +x attribute
  • Remove find-outdated-deps script, we have better replacement for it

Databases

  • Allow export command regardless of the configured db_type
  • Add SQL_INSERT macro and update SQL queries to use server_host field
  • Update SQL archive index to match mysql.sql
  • mod_muc: Use correct table field name in sql query

MAM

  • Always strip stanza IDs
  • Announce support for stanza IDs
  • Don’t store from ‘sm_receive_packet’ hook
  • Fix mod_mam reloading
  • Ignore non-message stanzas earlier
  • Improve handling of forked messages
  • Make sure a stanza ID is always added
  • Make sure archived message isn’t bounced
  • Prepare version 0.6.1 of XEP-0313 (MAM) support

MUC

  • Properly store subject element
  • Resend presences and history if presence possesses x MUC element
  • Send presence-unavailable when expulsing a participant
  • Add mucsub event for subscribers list changes
  • Optimize muc subscriptions handling
  • Show real jid in mucsub subscription change events

PubSub

  • Add basic PubSub meta-data support
  • Rewrite pubsub export to sql
  • Cleanup tree requests, rename pubsub_node.type to pubsub_node.plugin
  • Fix select_type race on plugin_init
  • Implement parentnodes seek for hometree
  • Delete cached item on node removal
  • Fix delete item from unregistered user
  • Cleanup pubsub subscriptions quering, fix pep case
  • PEP services must send notifications to the account owner

Push

  • Avoid notification duplicates
  • Add support for SQL storage
  • Add export from Mnesia database to SQL file
  • Don’t store xdata() in Mnesia table
  • Simplify backend interface

Miscelanea

  • Mix _xmpp-server and _xmpps-server SRV records (XEP-0368)
  • HTTP: Don’t crash when Host header is missing
  • HTTP fileserver: Accept routes in Host header and map them to vhosts
  • mod_register_web: Better handle mobile devices in CSS
  • mod_stream_mgmt: Improve logging on timeout
  • mod_stream_mgmt: Increase ‘max_ack_queue’ default
  • Updated Catalan, Chinese, Czech, French, Galician, German, Greek, Hebrew, Russian, Spanish translations
  • WebAdmin: Don’t include CSS, javascript and image data directly in the code

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 November 23, 2017 11:09

November 21, 2017

Erlang Solutions

How to set up MongooseICE (ICE/TURN/STUN server)

The new version of our messaging platform, MongooseIM 2.1.0 has been recently released. MongooseIM 2.1.0, as a stronger platform for better chat experience is all about quality and building trust in the consistency and performance of our solution. It introduces tools and improvements making access to MongooseIM features easier.

This tutorial will take you through the details of MongooseICE - help your ops deploy and your devs build a STUN and TURN server for NAT traversal and stream relay. This “How To” will help you keep your infrastructure coherent and perfectly integrated, in order to deliver new features faster and with more confidence over time.

Introduction

Who is this document for?

This tutorial presents our TURN/STUN server in action. You get to see how to set up and configure MongooseICE and examine a system utilising its many talents.

Are you in need of an application requiring NAT traversal? Want to see how a TURN and STUN server would handle it? Or maybe you just like to tinker with interesting technologies and experience setting them up first hand?

If that’s the case, this tutorial is for you.

What is the end result of this tutorial?

At the end of the tutorial you will have a working environment with two peers, one sending a live video to another. The peer-to-peer communication will not be obstructed by any NATs that may occur in the background. The live video stream is only an example here - there are many possible use cases for peer-to-peer communication with NAT traversal. We chose to build an example application that shows video streaming, because it’s vivid, catchy and fun.

What do I need to begin?

Before you begin you have to prepare an environment for setting up the components used in this tutorial. Here’s a list of things you’ll need:

  1. One Android phone (or at least an Android emulator). The video player in this tutorial is available only as an Android application.
  2. RaspberryPi or any other device that is able to run Elixir code. Oh, and also has ffmpeg installed. We are going to use use RaspberryPi 3, to give this tutorial a hint of IoT.
  3. At least one machine with a public IPv4 address. It is necessary, because both MongooseIM and MongooseICE servers need to be accessible by all devices that are used in this demo system. You could use a private, local IP address, but then you would need to ensure that your phone and the RaspberryPi are behind some kind of a NAT relative to this IP address.

Note: the demo will probably work without the NAT, but then there is no point in setting up a TURN server.

We are going to use 2 VPS (Virtual Private Server) that are located somewhere far far away, both having public IPv4 address. Let’s say MongooseICE is bound to 1.1.1.1, and MongooseIM to 2.2.2.2.

General architecture of the environment built with this tutorial

This is the architecture of the system we are building:

As we know by now, MongooseIM is bound to 2.2.2.2/myxmpp.com and MongooseICE to 1.1.1.1. We also have a RaspberryPi that is connected to a private network (so is behind some NAT) and an Android phone that is connected to an LTE network and also is behind the carrier’s NAT.

ICE notes

The end result of this tutorial not only uses MongooseICE and [MongooseIM] servers but also uses custom version of Mangosta-Android and [DemoStreamerICE]. Both projects are custom modified and custom made respectively in order to showcase the video streaming using the data relay capabilities provided by MongooseICE. The streaming itself, along with the signalling protocol, were prepared only for the case of this demo and are not a part of the platform. Those components exist only to visualize what can be achieved with MongooseICE and what can be built on top of it.

Setting up MongooseIM (signalling)

The ICE is nothing without signalling. The signalling protocol itself can be designed specifically for the application that is being deployed or can be implemented based on some standards, e.g. Jingle. Here, we chose to implement the simplest signalling possible, i.e. sending relay addresses via XMPP messages. No matter if we decide to go with this approach or with Jingle, we can use the MongooseIM XMPP server as a transport layer for the signalling. In order to enable signalling we need an instance of MongooseIM running with the simplest configuration, since the only thing we need from it is to provide us with means to communicate between two peers.

Configuration

You can find MongooseIM installation instructions on this page. Once you have cloned the repository and compiled the project, you need to modify the ejabberd.cfg config file (you can find this file at $REPO/_build/prod/rel/mongooseim/etc/ejabberd.cfg, where $REPO is a top-level directory of cloned repo). You can use this configuration file and modify the relevant part:

%%%% ICE DEMO %%%%
{hosts, ["localhost", "myxmpp.com"] }.

This sets the virtual hostname of the XMPP server, so that you can register users in this domain. After that, you can start MongooseIM with

$REPO/_build/prod/rel/mongooseim/bin/mongooseimctl start

Users

After we finish setting up [MongooseIM], we need to register some users. For this demo we need two users: movie@myxmpp.com and phone@myxmpp.com, for RaspberryPi and the Android phone respectively. In order to do that, type:

$REPO/_build/prod/rel/mongooseim/bin/mongooseimctl register phone myxmpp.com xmpp_password
$REPO/_build/prod/rel/mongooseim/bin/mongooseimctl register movie myxmpp.com xmpp_password

on the machine that has [MongooseIM] installed.

As you can see here, we have created those two users, both with the password xmpp_password for simplicity.

Setting up MongooseICE (TURN/STUN server)

Now, since [MongooseIM] handles the signalling, we need the TURN relay and the STUN server to send peer-to-peer data. For that we are going to use the star of this tutorial - MongooseICE.

How to get and configure

The whole documentation that describes all options and deployment methods, can be found on the project’s github page. Let’s get to it! (this command assumes that we are on the server for MongooseICE and that it has Docker installed):

docker run -it --net=host -e "MONGOOSEICE_UDP_RELAY_IP=1.1.1.1" -e "MONGOOSEICE_STUN_SECRET=secret" -e "MONGOOSEICE_UDP_REALM=myrelay" mongooseim/mongooseice:0.4.0

This command starts the MongooseICE server in the Docker container, attaching its virtual network interface to the network interface of the host machine the Docker deamon is running on. There are three important configuration options we have to set via environment variables:

  • MONGOOSEICE_UDP_RELAY_IP - This is the IP address that MongooseICE provides data relay on. This should be set to public IPv4 address.
  • MONGOOSEICE_STUN_SECRET - This is a secret password that TURN clients need to provide to connect to this server.
  • MONGOOSEICE_UDP_REALM - This is just a name for your TURN relay.

And that’s it! MongooseICE is now ready to roll!

Setting up Mangosta-Android

How to get and install

The source code of the video-stream-demo-enabled Mangosta-Android can be found on the ice_demo_kt branch. If you want to tinker with it and compile it yourself, you can do that. All you need is Android Studio 2.3+. The compilation is pretty straightforward, so I’m not going to explain it here. If you are interested in how it works, most of the code is in the inaka.com.mangosta.videostream package. If you don’t want to compile this application from source, you can just install this .apk on your phone and that’s it.

How to configure

Right after you start Mangosta-Android for the first time, you will need to login to your XMPP server. In order to do that, just enter the JID you have created for the phone (phone@myxmpp.com), the password (xmpp_password) and the server address (2.2.2.2 or myxmpp.com if you’ve set up the domain to actually point to this IP address), and then confirm by clicking “Enter”.

After we log in, we can start setting up the connection to the MongooseICE server we set up before. The process is shown on the screenshots below.

Mangosta_ICE_settings Mangosta test ICE connection Mangosta save ICE settings

On the “Configure ICE” screen we have to set up 5 fields:

  1. TURN server address - IPv4 address of our MongooseICE
  2. TURN Server port - since we did not set the port while configuring MongooseICE it uses a default one - 3478
  3. TURN Realm - Realm name we have set via MONGOOSEICE_UDP_REALM variable. In our case it’s “myrelay”.
  4. TURN username - Current version of MongooseICE ignores this, so you may leave it as is.
  5. TURN password - The password that we have set via MONGOOSEICE_STUN_SECRET variable. In our case it’s “secret

And that would be all. Now you can click “TEST CONNECTION” to, well…, test the connection. If everything works, you can “SAVE” the settings. Now your Mangosta-Android is ready to play streamed video, but we still need the source…

Setting up RaspberryPi

Let’s configure the video source now. In our case it will be a RaspberryPi with Elixir and ffmpeg installed running our ICE demo application.

The software

For this demo we provide a simple XMPP client that also is able to send live video stream using ffmpeg whenever other peer asks for it via XMPP. This client is written in Elixir, so we can run it from source quite easily.

How to get and configure

You can get the client’s sources here. For now we only need to run it, so let’s get to it (on our RaspberryPi):

git clone https://github.com/esl/ice_demo.git
cd ice_demo
mix deps.get
iex -S mix

After a while we should get into Elixir shell. In order to enable the streamer, we need to start it, providing some configuration options (in the Elixir shell):

opts = [
  jid: "movie@myxmpp.com",
  password: "xmpp_password",
  host: "myxmpp.com",
  turn_addr: "1.1.1.1:3784"
  turn_username: "username",
  turn_secret: "secret",
  video_file: "/home/pi/sintel.h264"
]
ICEDemo.start_movie(opts)

The first 3 options are all about connecting to the XMPP server - we use “movie@myxmpp.com” user that we created earlier. Next 3 options are about connecting to the MongooseICE server. Those are similar to ones we set in Mangosta-Android. The last one points to the video file that will be streamed on request. This file has to be raw, H.264-encoded, video-only file. If you are not sure how to get one, you can just use [this one]https://drive.google.com/file/d/0B48g-HBQ5xpxeVlUSks2bVRlLTQ/view) (pre-rendered Sintel, OpenBlender project). With this configuration, out RaspberryPi is ready to stream!

[### The end result

Playing the video

Now we finally can get out phone and start streaming the video! In order to do that, we have to click the “New video stream” button as shown on the screenshoots below, enter the JID of the RaspberryPi and confirm with the “Stream!” button.

  1. Mangosta start streaming
  2. Mangosta start streaming
  3. Mangosta start streaming

Hopefully, now you can see the video on your own mobile device.

Participate!

Share your biggest pain points in your journey through app and business building, so that we can work together on how to solve them efficiently.

  1. Subscribe to our newsletter
  2. Read our “Boost your engine of growth with chat and social value”
  3. Star us on GitHub and follow us on Twitter

November 21, 2017 11:51