Matrix and IRC - Mozillians custom client?


#1

Continuing the discussion from Trying out Slack?:

People really like telegram. I’ve just checked it out on a recent trip and I don’t see why we can’t create an IRC client that gives the same UX as telegram. We could even make some Mozillians customizations, like linking to your Mozillians profile if you want, to update your profile picture.

We could use some sort of bouncer or logger to allow people to see what messages they missed.

What are the other technical benefits of Telegram and how would we bring those to an IRC client?

Edit

Clearing up one or two things:

Matrix is not a new communication channel. It will not be set up to
create its own rooms that are exclusively accessed via itself.

Stage 1: It will be connected to IRC. The goal is to make it as
appealing as possible to Telegram users. Not specifically to try to get
people to stop using Telegram, but to try to make IRC appealing to the
types of people who very much prefer Telegram. If we try to connect
Telegram right away then there is less incentive for Telegram users to
help give input on making the Vector client better. People can just use
Telegram.

There are some questions about Telegram that don’t need to be
answered until we think the pilot with IRC is successful. At that point
things could have changed with Telegram for good or for bad. But if it’s
still popular, and if there aren’t any issues raised about connecting it, then we can use Matrix to connect Telegram to IRC.


(Leo McArdle) #2

My question is: do we have the people and time, and is it worth it given that there might be services out there already which satisfy our need?

For what it’s worth, I’ve started making a number of IRC clients in my time, but never quite finished any of them. That’s not down to an innate difficulty with the protocol, but more down to not having the motivation to finish something which I don’t necessarily personally need, especially when IRC seems to be dying.

In this instance the motivation factor might be different, but I don’t want us to be suffering a severe bout of NIH syndrome.

I don’t want to come across as too cynical, but I’m not sure people will be too enthusiastic for a IRC client built for Mozillians. If, on the other hand, this was framed as a Mozilla-built chat application for everybody, which is secure, respects your privacy, implements cryptography for the common person, but which is built upon an established protocol (that being IRC), and is free and open source through and through, then I might feel a bit different…

The ones I see are:

  • History
    • Solved, as you say, by logging past messages and displaying them in the client
  • Push notifications
    • There are various services around for push notifications which could be hooked into on the server side (assuming this is a hosted, web-based IRC client)
  • File sharing
    • Again, we could hook into some other service, host it ourselves, or use the magic of WebRTC (though that wouldn’t work too well with historical uploaded files)
  • Emoji/Stickers
    • Could be achieved by just displaying thumbnails of pictures linked, or some human readable markup (so people connected through IRC conventionally don’t get gobbledygook)
  • Replying to specific messages
    • Possibly not required, but again could be achieved though human readable markup

(Yousef Alam) #3

@ikermitkiller has started working on a UI that’s similar to what we’d want. @leo, is it something we can use for this?

Currently looks like this, but we can tweak it


(Michael Buluma) #4

I like the UI already


(Connor Kirkby) #5

I’ve been making quite a few changes today to Relai. While the way the app looks as a whole hasn’t change massively, I’ve done smaller tweaks throughout to make it ‘better’, such as switching from my own custom header to gaia-header.

In addition to the smaller tweaks, I’ve added a connection page, which is now set as index.html and the chat page has been moved to chat.html. You can switch from the connections page to the chat page by pressing connect, and switching back to the connections page from the chat page is done by pressing the close/disconnect button in the header.

The app isn’t functional right now in any way, and probably won’t be for quite a while as I’m far from knowledgeable in much more than UX and UI, with only basic understanding of actually making things work. All changes have been committed into the repository.


#6

tad came across a really interesting option called Matrix - http://matrix.org/

It integrates with IRC, and provides the function a bouncer would. We have someone from the matrix team hanging out in #communityit if people have questions.

@tad - you could explain in better detail the problems you think matrix solves?


(Matthew) #7

I look after Matrix, and @Kensie invited me to chip in with the pros and cons as we see them:

Matrix pros:

  • Matrix is entirely 100% FOSS (Apache License 2), both servers, clients, client sdks and gateways.
  • You can run your own matrix servers entirely for free.
  • Matrix is more than just an IRC client; it’s actually a new open standard HTTP API for decentralised comms. The big differences with IRC are:
    • Conversation history (scrollback) is a first class citizen, with infinite scrollback/logging available for free on every room
    • Open federation (like email or xmpp); if folks on remote Matrix servers join a room, the history is replicated over both servers such that no single server controls the conversation (signed with a git-like scheme for cryptographic integrity over a directed acyclic graph). Obviously you can also have closed-federation rooms too.
    • End-to-end encryption. We use a variant of the Axolotl cryptographic ratchet to optionally provide better-than-OTR end-to-end crypto as part of the spec.
    • Open standard HTTP API, making it trivial to write clients, bots or slack-style integrations.
    • Support for storing any JSON data in a room; not just text messages, but images, videos, files, etc.
    • Support for WebRTC-based VoIP/video calling (with multiway coming real soon now)
    • Presence, typing notifications, read reports, server-side configurable push notifications, etc.
    • Mobile clients (iOS and Android) as first class citizens.
    • Extensible gateways to other networks - we already have SMS, SIP and so PSTN gateways; meanwhile XMPP, Slack, Lync and other ones are in development. Building a bridge for something like Discourse into Matrix would be really easy and fun, for instance.
  • That said, you can use Matrix as a glorified IRC bouncer if you like. Matrix’s name comes from the fact that it matrixes together different existing communication networks, and for folks like Mozilla (and my workplace as it happens) which live and breathe from IRC driven, the bridging works great.
  • Clientwise there’s a range of clients that talk Matrix - http://matrix.org/blog/try-matrix-now has the list. The most advanced one is http://vector.im, which is converging on slack-style UI/UX. However, all of these are FOSS and Vector in particular is very easily customised and branded via the matrix-react-sdk. So, if Mozilla wanted to use a Moz-branded version of Vector which skinned things to smell and look more like IRC rather than ‘pure’ Matrix, that’s absolutely trivial (a few hour’s work) to do. Meanwhile IRC diehards can still connect to IRC itself.
  • Clientwise we also provide a large range of SDKs, both for wrapping the HTTP APIs and providing reusable UI components. Includes Python, Perl, Android, iOS. The community’s written a bunch of others too (Erlang, Ruby, Lisp, etc).

Matrix cons:

  • It’s still beta. We’ve been dogfooding it since we launched in September 2014 and it’s very usable, but we’re still polishing the specs, the server and the clients.
  • The reference server is written for experimenting with the APIs rather than performance. It’s written in Python/Twisted, and as such is basically single-threaded and doesn’t horizontally scale yet. On the matrix.org server we currently have 25,000 accounts and a few thousand rooms and a few hundred simultaneous users and things work fine, but there’s a lot of HA and performance work we’re doing currently in order to exit beta.
  • There are some thinkos in the v1 API that we’re fixing currently with an upgrade to v2. Specifically, messages can rarely get out of order on bad connections; invitations to join a room don’t give enough info about what you’re being invited to and can’t be rejected; clients can take a while to sync on launch for powerusers; etc. We’re working through these quite aggressively though.

Hopefully this gives a bit more context about what we’re up to. If you want to give it a go, check out the react client at vector.im or perhaps the older clunkier but maturer angularjs client at matrix.org/beta. Meanwhile, you can get a server from http://github.com/matrix-org/synapse, or an IRC bridge from http://github.com/matrix-org/matrix-appservice-irc. Finally, if you were hypothetically customising Vector to brand and reskin it to work nicely with Moz, you’d fork https://github.com/vector-im/vector-web.

All of moznet is now bridged into Matrix, so you can already join anywhere on IRC from Matrix by joining #mozilla_#channelname:matrix.org (e.g. #mozilla_#communityit:matrix.org), and you can catch me there as M-Matthew on IRC or @matthew:matrix.org on Matrix if anyone has any questions.

Quick screenshot of how #communityit appears on Vector, for the record:


(Leo McArdle) #8

In the meeting yesterday it was rightly pointed out that nobody had responded to this topic after @matthew posted, possibly giving the impression that the idea was dead in the water - when that definitely isn’t the case.

I think a few of us have now have had the opportunity to try Matrix and Vector out, and asked @matthew various questions on IRC, and I’m convinced that it’ll go a huge way towards improving out real time communication problems within Mozilla… (cough Telegram cough) …and serve as a great base to build extra, Mozilla-specific (Mozillians integration, for instance), features on.

The next step (which we started in the meeting yesterday) is explicitly stating how it fixes some of the problems which we’ve stated, work which is happening here: https://communityit.etherpad.mozilla.org/matrix


(Matthew) #9

Thanks for the heads up, @leo. I’ve scribbled some feedback on https://communityit.etherpad.mozilla.org/matrix. We’d love to help you folks roll out Matrix in earnest and customise Vector etc, so let me know what we can do.


#10

That’s great! I think you basically answered that most of the things we want are possible. I think the next step might be to find some hard-core telegram users and get them to demo Vector, let us know what feels uncomfortable.


(alex_mayorga) #11

¡Hola!

For the brave… https://vector.im/#/room/#mozilla_#communityit:matrix.org

=)


(Rubén Martín) #12

I didn’t have time to test vector and other clients, but this basically will work for a user as IRCCloud works right now?


#13

That is true, but I wouldn’t say that’s the basic summary. The idea for checking out this client is really more about the UX. People dislike IRC because clients are usually not designed for a novice user, hence the appeal of Telegram. But Telegram is incredibly similar to IRC. With the right client, it could be indistinguishable.


(Rubén Martín) #14

I feel people like Telegram because they are already there for other groups and conversations so they don’t have to care about having another app just for other specific case. Same happens with Facebook, people are already there and the effort to use it is zero.


#15

But that’s not always true. People had to sign up for Telegram for some reason, it’s not a very popular app, but it’s popular among Mozillians. So that has to be because of the UX and not because they were already using it. Otherwise they’d just use Facebook. Facebook can do chat pretty much exactly the same way as telegram. Or IRC, many people who use telegram had been using IRC and just didn’t like it as much.


(Rubén Martín) #16

I wouldn’t jump into conclusions that quickly. Telegram IS a very popular app in Europe and Asia, some people use it instead of Whatsapp (it’s free and have a few improvements over whatsapp).


(Tom Farrow) #17

I’m not going to comment on specific tools. Tooling is not my priority for communication (though it should be somebody’s!)

However, I will make this note
Currently, communication is really decentralised. Right now, I have the following text based things on my phone just so I can talk to mozillians.

  • WhatsApp
  • Telegram
  • IRC
  • Skype
  • Facebook Messenger

Then there’s iMessage and SMS which I use 70/30 for personal/mozilla stuff.

Condensing is needed, and here’s the list of requirements that people seem to generally have

  • Free as in Speech
  • Free as in Beer
  • Simple to use, but with some advanced functionality
  • Private messages
  • Groups
  • Not disclose personal info

I know which tool I’d choose to meet all of those requirements. But let’s reverse this discussion and look at the problems, build requirements/MVP, and then how each tool fits in to the requirements

Maybe there’s another thread that I’m missing. This one seems really tool focused. Partially my fault for saying “OOOOH MATRIXXXXXX. SHINY”


#18

Yes, you’re missing another one, this one was specifically for discussing a
Mozillians’ specific IRC client, and we settled on Matrix as our experiment.

We actually did discuss the problems, and the functionality people seem to
like/dislike, which is why when you saw matrix you went “ooooh shiny!”

It checks more than enough of the boxes to be worth trying out, including us
not requiring yet another platform, which is the problem with slack.


(Akshay) #19

I think it’s no longer going to be possible to centralize communications. As long as different apps are popular in different demographics, there’ll be fragmentation. The best we can do is bridge communications. And matrix can probably do that. With that, everyone can continue using what they’re using. (Not to forget FOSS and openness and decentralization)

Matrix vs Telegram, for me

  • As a Telegram user, what I think lead to easy popularity of Telegram is that the contact discovery relies on phone number. This makes it possible for people to figure out when their friends are on Telegram without having to ask. I will go on and say (with no evidence as such) that this single feature is the reason why Telegram became very popular (even among Mozillians). All dinoblah had to do to get drawn into the conversation was join Telegram. A friend (with phone number) would get the notification “dinoblah joined Telegram”. They’d immediately add dinoblah to all relevant groups.

    With matrix, this contact discovery could rely on email address, I guess. (And among mozillians, that might be much more efficient getting new people join conversations).

  • Except the polish, Matrix has everything that Telegram had for me - multi device support, cloud synchronization, large groups.

  • Although replying to messages looks like a small feature, it is a very useful feature in instant messaging where topics drift very fast and your reply becomes confusing if you take more than 30 seconds to type it.

What is definitely going to be useful

  • A matrix integration with Telegram that allows messages to be synced across each other = instant win

#20

@leo - @JLensmeister would like to help with setting up the back-end stuff. We wanted to make sure we had your blessing before letting him go with it. When we were triaging we saw how much stuff is attached to you. :wink: