Distributed, Open Source Chat With Vector And Matrix

When it comes to chat, you have many choices. Facebook Messenger, Google Talk, Whatsapp, Kik, and Slack are all viable options. However, all of these choices are proprietary, and require you to use servers that you can’t run yourself. They’re highly centralized, closed source tools.

In the open source world, IRC has been the go to solution for chat for many years, and for good reason. Anyone can run a server, there’s many clients, and it’s built on open standards. But IRC comes from a pre-mobile world, and relies on clients to maintain persistent connections to the server. It’s not the best experience on a phone.

Matrix.org and Vector.im aim to be a modern solution to chat. Matrix is a standard for passing messages around, and Vector is a chat solution built on top, with support for iOS, Android, and your browser.

What makes this solution different is the concept of Homeservers. A Homeserver manages messages for users, recording them when they are received and providing them to users when they connect. Homeservers also “federate” to communicate amongst each other. This means anyone can run a Homeserver and connect it to the greater network of Matrix, providing a distributed approach to building a chat network.

Under the hood, Matrix is just HTTP. You send messages into the network with POST requests, and receive new messages by polling with GET requests. This means no persistent connections are required, which is perfect for mobile and low power devices.

On the topic of devices, Matrix is designed for general purpose messaging, not just chat. It should be pretty simple to connect hardware up to Matrix, which would provide a simple way to get data in and out of connected devices. Since it’s all HTTP, a device based on the ESP8266 could hop into your chat room with relative ease.

Matrix and Vector are very much in beta, but are definitely usable and worth a try. To get started, you can create an account on Vector.im and start chatting. We’re awaiting some of the features in the works, including end-to-end encryption, and hope to see some future hacks talking to the Matrix infrastructure.

44 thoughts on “Distributed, Open Source Chat With Vector And Matrix

    1. It doesn’t have to be better. I don’t understand why people always say, “But we have X, we don’t need Y!”. Well yeah, sure, we don’t. And we have cars that run on fossil fuels, so why should we need flying cars that run on sustainable fuels? Oh, right, because we actually care about innovation. Great discoveries and inventions were never created because someone was content with what we already have. They came about because these people wanted something more, for better or worse. So unless you’re willing to contribute something of use to either XMPP or Matrix/Vector, or even some other alternative, maybe you should find something better to do with your time.

      TL:DR; We already have a ton of complainers like you in this world, so we don’t need any more of you, do we now?

      1. Did you miss the “how is this better” part? If it isn’t better it’s not innovation. I have no idea if this system is better, but what I do know is that you just completely ignored the question to fling some worthless vitriol at a stranger on the internet.

        TL:DR; We already have a ton of flamers who don’t read questions in this world, so we don’t need any more of you, do we now?

        1. I think their idea of better can be summed up as they use json :P a crass generalisation but so far yeah that seems to be the major difference between them.

          1. The major difference is that in Matrix, history is shared between all the participating servers. No single server instance controls or owns the conversation. If my server goes down, the room continues on all the other ones.

            It’s like the difference between git and subversion.

            It’s nothing whatsoever to do with JSON v. XML. Matrix just happens to use JSON+HTTP by default, although you can switch that for whatever transport you like.

        2. I apologize if I sounded hostile, but it just irks me when people immediately jump to the “we already have…” line, without giving these sorts of things time to mature and grow. You are correct in saying that I didn’t answer the original question; this is because I can’t really answer a loaded question like that in a reasonable way. Everything has tradeoffs, between Vector/Matrix, XMPP, IRC, or any other protocol within the same domain. All I was trying to say is that pushing away a new idea/potential innovation is not really good for us as a society, IMO.

          TL:DR; Sorry for the flames. Still, let’s give the thing some time to breathe and grow, maybe it’ll turn out to be something really good.

      1. Really though it just seems like another one of those things where we re-implement low level functionality by wrapping it up in HTTP. Similar to how everyone went crazy-go-nuts over WebSockets ™ (R) (patent pending), even though IT’S JUST RE-IMPLEMENTING TCP SOCKETS OVER A TCP SOCKET. Way to go, guys. Really pushing the boundaries of technology.

        Everything the Web is trying to do today in Javascript was already done by Java 15 years ago. Mozilla just really, really likes reinventing wheels by building them out of wheels.

        1. That always reinvent everything virus (sometimes even before having understood “the original”) really is ugly and there’s no cure against the NIH syndrome yet!

          Imagine what would happen to email if it were reinvented every few months… email would turn de facto unusable because of that fragmentation into different services.

          Interoperability made the internet… without interoperability, the internet only is a carrier for lots of parallel worlds (PISS – public isolated silly subnets?)…

          1. This comment is deeply unintentionally ironic, given the whole point of Matrix is to provide interoperability between all the other protocols and silos (IRC, Slack, XMPP, SIP, whatever) in order to get back to the ideals of the internet.

    2. Valid question. Also, developing an IRC server which stores messages for a while for sending them at re-connect time should be possible.

      But that’s modern times. Everybody tries to reinvent the wheel in a very isolated fashion, fueled by a very few success stories like WhatsApp. I wonder how long it takes to turn this kind of attitude around. Messenger based on Email? Whoops, one can connect to millions of users immediately. Enhanced IRC? Yikes, build upon thousands of already existing chat rooms with millions of users. Valid especially for tasks like messaging, where having a large network is THE most crucial point.

        1. That would be pto.im. All the negative comments here seem to be missing the point that Matrix isn’t an attempt to reinvent the wheel but to glue together existing wheels which otherwise can’t talk to one another.

  1. I’m just now getting old enough to see ideas get reimplemented, and it’s very interesting. I learned about IRC after having used a variety of other chat services, but then saw the parallels — slack, for example, seems to draw a lot of ideas from IRC.

    I see a lot of similarities to what little I know of modern IRC here as well — if my memory serves, it’s typical for people set up bots which sit on their home computer (“homeserver”) and just listen on their favorite channels (“federate”), and from there the meatspace user accesses the logs with their (often at least partially home-spun) method of choice. There’s your distributed network with a “local base server” you control handling the information which you care to see.

    This is not to disparage the work that’s been done here — as an avid ownCloud user, I appreciate the value in a pre-prepared drop-in-and-go package, and this looks to be a bit more polished than what little I’ve seen of IRC’s support elsewhere (e.g. apps, “smooth”/”modern” applications). I enjoy seeing so many variations of a similar set of ideas and what trade-offs each variation/iteration chooses to make.

  2. So matrix is funded by amdocs:

    Amdocs is a publicly listed NYSE company that also acts a spy-arm for the Israeli state, Isarel’s military, Israel’s government, and most troubling of all, for Israeli’s intelligence service Mossad;

    Amdocs handles almost all telephone and data telecom subscriber accounts for most American and Canadian service providers (including wireless, cable, ISP, etc), thus they have unfettered access to all records typically available to the NSA, CIA, FBI, etc;

    Israel’s Mossad have placed spies on US soil under the guise of Amdocs employees at various US and Canadian offices working out of Amdocs’ offices under the illusion of Amdocs employees;

    Amdocs shares any and all US & Canadian subscriber data with Israel’s government and various spying entities;

    China and other countries have kicked out Amdocs and their garbage billing software because of these illicit activities;

    China’s Huawei Technologies has been the subject of unnecessary fear-mongering but in reality Amdocs is a far bigger national security threat to us than any other corporate entity combined;

    The CIA, CSIS, FBI, RCMP and the rest have known of Amdocs’ nefarious ways for a while but have not acted in fear of jeopardizing diplomatic relations;

    Amdocs spying for the Israeli regime is an act that is patently evident and documented in a widespread manner;

    Amdocs is well-known to offer kickback incentives (eg, monetary sums, material gifts, prostitutes, etc) to Managers, Directors, VPs and other stakeholders at various global telcos so that they continue to renew Amdocs license;

    Russia, China, India and other economic superpowers have KICKED OUT this shell company out of their countries; when will we grow a pair do likewise before they hurt us in unimaginable ways?

    1. Whilst most of the Matrix core team happen to have day jobs with Amdocs in London and Rennes, this is no different to Linux kernel developers happening to have day jobs at Intel. Matrix is an 100% open source project, all Apache licensed, and you can audit and check all the code yourself and run your own server.

      Xenophobic fearmongering like this is completely misguided, insulting, and depressing.

      1. You’re comparing Intel employees to the Mossad? Really, employees from a world-class semico working on an operating system kernel is equivalent to an Israeli intelligence contractor being in the back pockets of the open source community, major telcos and the surveillance apparatus of world governments is equivalent?

        Stating objective facts about this is xenophobic fearmongering? Right, because we’re only talking about Israel, aren’t we? As though it’s the only nefarious party in this conversation. Let me guess, if I don’t want JIDF rifling through my private affairs that must mean I’m an antisemite with something to hide.

        False equivalence, false dichotomy, misdirection … you’re the one who’s misguided. We get it, the Jewish state has a martyr complex. I try to be sensitive to that but it’s no excuse for the psychological maneuvering I see here. He’s stating objective, relevant, verifiable facts and feels obligated to pass them along and should be commended for that.

        Just because we have access to open source code doesn’t mean we have the analysis resources to harden said code against the kind of exploits an intelligence agent would plant nor does it mean anyone would listen if we could, that efforts wouldn’t be made to cover it up or that the patch would ever get merged in. The best an open source developer can hope for is usually that their own fork will get popular. There’s nothing wrong with pointing any of this out. Alerting us to the potenial for evesdropping is all that he feels obligated to contribute. Anyone wary of the surveillance state would be right to avoid using Matrix for the aforementioned reasons. You know this already so I don’t need to explain your own motivations to you which should be obvious to anyone else.

        1. I do not want to acknowledge this comment with a response, but just in case someone else has the misfortune of subsequently reading this bile and taking it seriously:

          – The Matrix spec and implementations shipped by the Matrix.org team do not contain any eavesdropping backdoors. We can’t speak for others’ implementations but haven’t seen any problems there either.
          – All privacy from eavesdropping is provided by the Olm cryptographic ratchet (https://matrix.org/git/olm), an independent implementation we wrote of the Double (Axolotl) ratchet pioneered by Open Whisper Systems.
          – We are in the process of getting Olm publicly audited by a leading independent cryptography firm to prove its trustworthiness.
          – As it happens, all of Matrix so far has been written by folks in the UK and France. Quality contributions are of course welcome from anyone from any country however.
          – Meanwhile there are many independent implementations of Matrix clients and servers which have absolutely no connection to Amdocs at all (eg https://ruma.io)

          To spell it out: Matrix is not a vehicle for any secret government conspiracy, just as HTTP, SMTP, XMPP etc aren’t either.

  3. I don’t know if anything good can come from this “yet another chat system”, but I’m not satisfied with existing chat software either… I miss MSN Messenger so much… Or at least, the client features and add-on system, offline messaging that really worked etc.
    I’ve used Skype ever since MSN Messenger was discontinued, and despite many updates, the client experience is still far from par with MSN. Offline messaging is particularly lacking, losing most messages sent while you were offline… if and when you can really get offline (just checking your e-mail on outlook.com connects you, want it or not…).

  4. “This means no persistent connections are required, which is perfect for mobile and low power devices.” Umm.. doesn’t this also mean lack of push notifications, which is pretty terrible for mobile and low power devices?

  5. Why? We already have NNTP (Usenet news), how is this or IRC better? It seems IRC and mobile guys have forgotten about NNTP which does all this already. It’s distributed. It uses multiple servers. It’s postable. It’s readable. It uses email protocols. It can be moderated or not. The only thing missing is some encryption for private chat rooms.

    1. We haven’t forgotten NNTP. In fact, we used to run a usenet search engine. The difference is:
      * NNTP is very high latency and not exactly suitable for real-time “instant messaging” or VoIP signalling.
      * It’s not really an open federation; you have to find someone to agree to let you into the network.
      * It has no cryptographic integrity of the content (unless you add it the application layer), and likewise no standard end-to-end encryption (unless you layer it on top)
      * Its APIs could be infinitely easier to use.
      * It has no merge resolution algorithms for colliding content.
      * It’s not particularly extensible.

  6. One year later I’m reading your comment and it’s funny. I’ve just setup my federated homeserver and I chat, i call and videocall all the members of my family, everything is end2end encrypted, history on my private vps hosted in my country.
    WhatsApp is the app that have the same functionalities but closed and owned by Google, why should I choose WhatsApp if the alternative is open source, federated, simple….and working flawlessy!!??
    Goodbye

    1. “… WhatsApp is the app that have the same functionalities but closed and owned by Google…”.

      WhatsApp owned by Google! Off to another forum to read reviews and comments by people who know stuff.

Leave a Reply to Martin Demling (@0x6d64)Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.