Announcing Synapse 0.9.0 and Matrix Angular SDK 0.6.6!

We have pushed out a new release of both Synapse, our reference server implementation, and matrix-angular-sdk, our reference webclient implementation!

The major new feature in Synapse is that you can now run Synapse backed by a PostgreSQL database. This increases performance and allows Synapse to scale much better! This, as well as various performance related bug fixes, should make things much snappier than before. Of course, you can still run SQLite; it’s up to you what you want to use.

In the webclient you can now change or reset your password – we have had this feature requested a few times (although honestly I’m surprised it hasn’t been mentioned even more – maybe people are just better than me at remembering/managing their passwords) so this should be a welcome addition! We also fixed a memory leak in Angular, so again expect better performance!

Finally, we have done some work on improving the Application Service API, making it more reliable and secure. Please see the upgrade notes as well as the full changelog below.

Changes in Synapse v0.9.0:

General:

  • Add support for using a PostgreSQL database instead of SQLite. See postgres.rst for details.
  • Add password change and reset APIs. See Registration in the spec.
  • Fix memory leak due to not releasing stale notifiers – SYN-339.
  • Fix race in caches that occasionally caused some presence updates to be dropped – SYN-369.
  • Check server name has not changed on restart.
  • Add a sample systemd unit file and a logger configuration in contrib/systemd. Contributed Ivan Shapovalov.

Federation:

  • Add key distribution mechanisms for fetching public keys of unavailable remote home servers. See Retrieving Server Keys in the spec.

Configuration:

  • Add support for multiple config files.
  • Add support for dictionaries in config files.
  • Remove support for specifying config options on the command line, except for:
    • –daemonize – Daemonize the home server.
    • –manhole – Turn on the twisted telnet manhole service on the given port.
    • –database-path – The path to a sqlite database to use.
    • –verbose – The verbosity level.
    • –log-file – File to log to.
    • –log-config – Python logging config file.
    • –enable-registration – Enable registration for new users.

Application services:

  • Reliably retry sending of events from Synapse to application services, as per Application Services spec.
  • Application services can no longer register via the /register API, instead their configuration should be saved to a file and listed in the synapse app_service_config_files config option. The AS configuration file has the same format as the old /register request. See application_services.rst for more information.

Changes in Matrix Angular SDK 0.6.6:

Features:

  • Add password change and reset feature using v2_alpha APIs.

Bug fixes:

  • Fix memory leak caused by not removing a watcher on the root scope.

Silicon Milkroundabout

Just a quick note to say thanks to everyone who came to talk to us at SMR9 yesterday. SMR is a great way for developers looking for jobs and startups needing engineers to have a chat.

We had a very busy day with plenty of people interested in Matrix and eager to join the team. We received a lot of CVs and will get back to you – but in the meantime please check out our code and come say hi in the Matrix HQ room, using any of these Matrix clients!

dave

If you missed SMR, or just generally is interested in working for Matrix.org – please feel free to send your CV to us – we need all kinds of developers, with skills ranging from backend and frontend to mobile development!

Matrix at Fluent

This week, Matrix is visiting San Francisco for Fluent, a web development conference over three days, with events ranging from 2-day training sessions to 10-min showcase presentations.

fluent

I had the opportunity to participate in the latter: Tuesday’s Solutions Showcase in the Community Lounge. The presentation was recorded, here is the video and slides.

I also had a 30-min in-depth talk earlier today, where I went through a case study of adding Matrix to your existing app (slides). After evaluating options, we decided to use the flux-chat example by Facebook – it’s a basic chat application that uses their internal message dispatcher and showcases how a React/Flux app works.

The code for the original example can be found here, and the complete diff of changes necessary to integrate it with Matrix – using the matrix-js-sdk – can be found here (thanks to Matthew for yet another late-night hack!). I think it’s very cool to see how easily their chat example can be turned into a Matrix client, albeit a fairly basic one! Here is an online version if you want to try it out!

flux-chat-org flux-chat-matrix
The original flux-chat and the Matrix-enabled flux-chat

If you have any questions or comments, we are still at Fluent – you can catch us in the exhibition hall in booth #208 – or virtually, as always, in #matrix:matrix.org!

The All New Matrix-IRC Application Service

This post has now been edited into a guide – you can find the source in github, and the formatted guide on the matrix.org website!


 

Like a lot of open source projects, we use IRC a lot. Naturally, we also use Matrix to communicate with each other. For some time now we’ve had an IRC bot sitting on specific channels to “bridge” together IRC and Matrix. This bot simply sent IRC messages when it received Matrix messages and vice versa. As we started to rely on it more and more though, we realised that there were things that were impossible for simple client-side bots to do by themselves. This spurred the development of Application Services which I introduced in my previous post. In this blog post, I want to outline some of the features and techniques of the IRC application service which we’ve been working on over the past few weeks.

Features:

  • Specific channel-to-matrix room bridging : This is what the original IRC bot did. You can specify specific channels and specific room IDs, and messages will be bridged.
  • Dynamic channel-to-matrix room bridging : This allows Matrix users to join any channel on an IRC network, rather than being forced to use one of the specific channels configured.
  • Two-way PM support : IRC users can PM the virtual “M-” users and private Matrix rooms will be created. Likewise, Matrix users can invite the virtual “@irc_Nick:domain” user IDs to a room and a PM to the IRC nick will be made.
  • IRC nick changing support : Matrix users are no longer forced to use “M-” nicks and can change them by sending “!nick” messages directly to the bridge.
  • Ident support : This allows usernames to be authenticated for virtual IRC clients, which means IRC bans can be targeted at the Matrix user rather than the entire application service.

The use of the Application Services API means:

  • The bot can reserve user IDs. This prevents humans from registering for @irc_… user IDs which would then clash with the operation of the bot.
  • The bot can reserve room aliases. This prevents humans from register for #irc_… aliases which would then clash with the operation of the bot.
  • The bot can trivially manage hundreds of users. Events are pushed to the application service directly. If you tried to do this as a client-side bot, you would need one event stream connection per virtual user.
  • The bot can lazily create rooms on demand. This means Matrix users can join non-existent room aliases and have the application service quickly track an IRC channel and create a room with that alias, allowing the join request to succeed.

Implementation details:

  • Written in Node.js, designed to be run using forever.
  • Built on the generic matrix-appservice-node framework.
  • Supports sending metrics in statsd format.
  • Uses matrix-appservice-node to provide a standardised interface when writing application services, rather than an explicit web framework (though under the hood matrix-appservice-node is using Express).

At present, the IRC application service is in beta, and is being run on #matrix and #matrix-dev. If you want to give it a go, check it out on Github – it is not currently released on npm. N.B. it requires features from the develop branch of synapse; either run your own synapse off the develop branch or wait a few days for us to release Synapse 0.9.0.

Needless to say, we look forward to this being the first of many full network<->network bridges into Matrix – come chat on #matrix:matrix.org if you’d like to write or run your own! Next up is Lync and XMPP…

Back from the WebRTC and Kranky Geek conferences

This week, Matthew and myself went to the WebRTC conference and its related Kranky Geek event in sunny London.

Matrix at WebRTC conference London 2015

Matrix had a speaker slot in both events; the first talk was “Proposing an open interoperable signalling layer for WebRTC” (slides).

As I was talking to people in the tea-breaks between sessions, I was actually surprised at the amount of people who not only knew about Matrix, but who had been following eagerly since the early days, and had questions about specific features and recent developments!

Later in the day it was time for the Kranky Geek, and the talk then was a bit more technical: “Interoperable HTTP Signalling with Matrix” (slides). The talk included a “dangerous demo” where we made a WebRTC call from our Matrix iOS App to our webclient for the first time – thanks to the OpenWebRTC team for helping us make the demo!

matrix-krankygeek

What’s great about these kind of events is the feedback and discussion following talks; lots of people have relevant experiences and opinions that they are happy to share, and of course questions on how exactly different features actually work.

It’s always great to meet new people and have lots of various discussions. Hopefully we have got a few more people interested in Matrix – we have already seen some new joiners in the #matrix:matrix.org room!

Next up is Fluent in San Francisco next week, where I will be speaking.