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.
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!
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!
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.
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.
Written in Node.js, designed to be run using forever.
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...
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!
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.
This weekend was spent at IDEA-London where the TADHack-mini London hackathon was going on. In total, there were around 18 different projects being hacked on all day Saturday and Sunday morning, before a 5-minute presentation on Sunday afternoon.
Four different projects used Matrix in one way or another: Matrixbot - a robot controlled through standard messages in a Matrix room - done by Scott Barstow and Anders Brownworth (project code and presentation video and picture). Neil Stratford's hack included lighting up his roll of LEDs whenever a push-notification hit his Matrix webclient (picture from the presentation).
The Co-Browsify hack by Žilvinas Račyla and Augustinas Bacvinka allows two people to browse the same webpage, with scrolling events being collected and duplicated to the other browser via Matrix (picture from the presentation). Finally, Matt Williams of Metaswitch created a Project Clearwater/Matrix Gateway which enables Project Clearwater/IMS to set up WebRTC calls with any matrix user (project code and pictures from the presentation) - this is the first time we have had a SIP-to-Matrix call (let alone IMS-to-Matrix) set up!
As TADHack sponsors, Matrix had two Parrot Drones to hand out as prizes, and the winners for best Matrix-related hacks are Matt Williams for the Clearwater/Matrix Gateway - and Scott Barstow and Anders Brownworth for Matrixbot! We are also happy that the other two Matrix-related projects were rewarded with prizes from the other sponsors (full list of winners).
All in all it was a very productive weekend, both in terms of tech and also meeting people. Thanks to everyone who participated and especially those who worked on Matrix-related hacks!
As of 9am tomorrow, somewhere in the depths of East London (and remotely from around the world), a diaspora of elite VoIP/WebRTC/Telco developers will compete to build the most innovative and impressive communications demos at Tadhack Mini London! Dave, Oddvar and myself are going to be there from the core Matrix.org team, both on-site and online (at #matrix:matrix.org, of course) to provide support - especially to everyone who's using Matrix APIs in their solution. And as we mentioned before, we'll even be giving away two Parrot Bebop Drones to the best hacks built using Matrix!
It's not too late to get involved - the more the merrier. We reckon it's going to be a really fun weekend, so look forward to chatting to some of you soon!
Both the recording equipment and the video team volunteers were new this year, so some problems were encountered, which means that our lightning talk video unfortunately was lost. However, our talk in the IoT-devroom is now available:
Heads up that we released Synapse 0.8.1 a little while back, but we've all been too busy writing software to announce it... you know how it goes. Anyway, here are the changes:
Disable registration by default. New users can be added using the included register_new_matrix_user script or by enabling registration in the config.
Add metrics to synapse. To enable metrics use config options enable_metrics and metrics_port.
Fix bug where banning only kicked the user.
Note that first one in particular: if you set up a new install, you won't be able to register new users using the API by default. This means random people on the Internet can't create accounts on your Home Server unless you actually choose to let them. Also, if you were trying to ban users and noticed that didn't work... yeah, we fixed that.
It's competition time! Matrix is sponsoring TADHack-mini London, which is a two-day hackathon with focus on WebRTC technology, happening on April 11 and 12 at IDEA London. We will award a Parrot Bebop Drone (which itself can be hacked via the ARDroneSDK3) to the two best hacks using Matrix, and we can't wait to see what kind of ideas people will come up with!
We strongly encourage anyone to get involved - have a look at our Development Resources (scroll down a bit) and have a think of what you can create within the 16-hour timeframe. The reference Matrix web client already supports WebRTC - you can play with this by registering a user via the matrix.org web client (or you can check out the reference web client and run it on your own box), inviting a user to a 1-1 chat (click on their avatar and "start chat") and then clicking the microphone or video camera icon in the top right to start a voice/video call.
We brainstormed some ideas for further WebRTC/Matrix work in our GSoC (Google Summer of Code) project proposals, for example "Implementing WebRTC support in Mobile apps" and "Multi-way voice and video conferencing". These are very probably too extensive for the 16-hour hackathon, but might provide some ideas for smaller hacks.
We will be at the event to offer mentoring and help, but you can already start thinking about potential hacks - come talk to us in the #matrix:matrix.org room!
Quick heads up that Matrix.org is going to be at Enterprise Connect next week in Orlando. If you're attending and interested in open federation between WebRTC solutions, Enterprise UC, messaging/voip apps, the PSTN etc - then needless to say we'd love to talk to you! Please come seek us out, or drop us an email (firstname at matrix.org) or find us on #matrix:matrix.org to schedule a chat in person.