Matrix IS XMPP 2.0.
Matrix IS XMPP 2.0.
The main architectural difference between them is that Matrix provides "eventually-consistent cryptographically secure synchronisation of room state across a global open network of federated servers and services", whereas XMPP just passes messages from point to point (where one of the endpoints may be a multiuser room).
The main practical benefit of Matrix is that multi-user rooms don't have a "home" server; they're distributed across the homeservers of every member of the room. This means that though everyone may have signed up for a room identified as #shitposting:matrix.org, if the matrix.org homeserver goes down, the chat still works. People can't join it until a new name is published for it, but it works for everyone already in it. In XMPP, chats are hosted on a particular server, and if the server a chat is on goes down, the chat goes down.
The main practical benefit of XMPP is that it is much more lightweight than Matrix. Being based on synchronization of room state means that Matrix stores a lot of data, generally all messages and attachments back to when the room was created (or possibly the first time someone on your homeserver joined the room). Apparently it's possible to prune room history, but it's not done by default, and as far as I know, it's not officially supported. It's much easier to control how much data your XMPP server stores.
XMPP is also a simpler protocol, which means there is a wider variety of clients; while there are several vaguely viable Matrix clients, if you're not using Element, you are much more likely to have problems, especially with encrypted rooms. Of course, the flip side of this is that a lot of XMPP clients don't support all the extensions which make modern XMPP useful, either.
Both of them have trouble with multi-device E2EE key management, though Matrix has the edge. But again, if you're not using Element, you are likely to have problems.
So does Matrix. All the other qualities are build on top of that. XMPP also enables e2ee, message synchronisation and an "global open network of federated servers and services".
Back around 2000 getting information on building eventually consistent systems was much harder than it is today, and leaderless versions of that doubly so. Those who worked on it felt like they were inventing half the techniques themselves, had difficulty recruiting (teaching) new people, and eventually burnt out.
If those involved had gotten it to work, it would have just been core infrastructure for eventually consistent ordered events, with UX concepts like "rooms" built on top as common business logic. Or in other words, distributed apps.
- message formatting is a mess
- device management is absent
- iOS apps can't really work with stock xeps
And the list is long, these are just the top problems. Luckily, this will likely change soon.
Please elaborate.
Web client: https://xmpp.redsolution.com/upload/4bddf4f264f5c6577f16551f...
iOS client: https://xmpp.redsolution.com/upload/4bddf4f264f5c6577f16551f...
Message formatting (from web client, but is supported by all, actually): https://xmpp.redsolution.com/upload/4bddf4f264f5c6577f16551f...
Device management. Newly connected device is given a token, with a mechanism to prevent token duplication, and tokens can be revoked, resulting in device disconnection:
https://xmpp.redsolution.com/upload/4bddf4f264f5c6577f16551f...
https://xmpp.redsolution.com/upload/4bddf4f264f5c6577f16551f...
This all is a work in progress, and we're aiming for an iOS version release in december or early next year.
The TL;DR seems to be the concern that Matrix was created by an existing team of folks who worked together (we built VoIP stacks for telcos), and because 50% of the people in the Spec Core Team who define Matrix's direction are from that original team, they have a disproportionate influence over how the protocol develops.
The reality, as far as I can tell, is that we are incorporating the best proposals from across the whole community, wherever they come from, and the protocol is progressing steadily under this open governance model, and folks are constantly experimenting with new features under prefixes, which they propose MSCs (Matrix Spec Changes) for, and then get incorporated into the official spec once they're approved by the Spec Core Team (which requires 75% consensus).
We spent ages setting up https://matrix.org/foundation and trying to enshrine a fair and neutral governance process for the spec, and as far as I can tell it's overall working. The thread linked above gives examples of ways in which the process is working as intended.
This is not how healthy federated networks work.
The question is where to take it from that.
Oh, and Matrix is plenty extensible, for example via custom event types: https://spec.matrix.org/v1.1/client-server-api/#types-of-roo...
(And aside from that, Mattermost doesn't have federation; different instances can not communicate with each other. Although we hope they'll implement Matrix eventually :)
I know, you consider xep structure of XMPP to be a problem, 'because it is hard to orient in it', but in fact it is what makes XMPP so durable and capable to work in a real federated environment.
I can see zero problems with this decisive approach. /s
No, any server instances provided by any vendor
> by a single dominant vendor, whose idea of federation is for everyone to update to the latest version of the spec or fall behind [1].
Server instance provider is not the same as software provider. Of course, you fall behind if you don't update. Time progresses, so does software.
In proper federated networks (email, xmpp), you don't.
What I value with Matrix is progress
Proper federated networks are ones that are already past this initial phase of fast progress and where participants have learned to work with each other.
> and it will always be a one-vendor vehicle.
You are clearly not speaking of Matrix: e.g. Element, Beeper, Dataport
How no progress ends up, can be observed with email and xmpp
> Proper federated networks are ones that are already past this initial phase of fast progress
That's made up by you. I claim proper federated networks are ones where you can fall behind
Please explain why you believe this.
This is the spec: https://spec.matrix.org/latest/
These are the spec change proposals: https://spec.matrix.org/unstable/proposals/
XMPP didn't really pitch any client or server protocol breaking changes.
Since the messages themselves were just addressed XML elements, we were able to do revisions over time, such as the first group chat being replaced by MUC or adding in the ability for XHTML-formatted rich text.
how is it fundamentally flawed, can you elaborate?
I think ideally in a good protocol, the server should not have to parse the content for the messages that are not targetted to itself (only the metadata useful for routing). the XML mess makes it impossible to do that since you have to validate the full document.
At the time I think this page was a good summary of the issues https://about.psyc.eu/XMPP No idea if this is still relevant though.
It's been years since I've looked at. Maybe things are better now.
Of course, smaller messages (à la Matrix) probbably make more sense.
There were ideas to separate out the addressing/routing from the actual messaging, so that servers did not need to process XML and so that messages did not necessarily need to be XML.
There were even some very preliminary ideas on using the servers to potentially negotiate peer connections for arbitrary traffic.
Back in the early 2000s there were a _lot_ of self-hosted Jabber servers though, and there was push-back from early commercial interests on any protocol-breaking changes resetting adoption to zero. This resulted in Jabber 1.0 pretty much becoming the basis of the XMPP RFC, with XMPP adding new authentication techniques and internationalized JIDs.
Later on, there were efforts to establish alternative transports to accomplish some of these alternative transports and forms - HTTP endpoints to poll for messages, JSON mappings of the core messages, etc.
I would argue against PSYC's claims (or would have, back in the day) that the usage of XML in XMPP is not proper, however. Its proper, it just wasn't the best idea.
The presenter was unfamiliar with the protocol, so I had to describe how the xml document was opened when you establish a connection, and how elements keep getting appended to it, and how the "xml document" isn't really completed until you're all done and the connection is terminated.
They looked at me like I had two heads.
To them, XML didn't make any sense at all unless you have the entire document available all at once. After all, how on earth could one ever apply an XSLT transform to it, right!?
Good times.
There is streaming APIs for XML. Just as XSLT 3.0 can do streaming. Saxon has implemented it, for example[1]. I am aware, that you are talking about the past, but also the XML world moves forward, albeit slowly, since the community has gotten much smaller.
[1]: https://www.saxonica.com/html/documentation10/sourcedocs/str...
You'd also have to explicitly turn XML namespace support _off_, since so many systems didn't actually support them. XML defines well-formedness and namespace-well-formedness as two different things, and you didn't want to completely drop communication because the other side was sending a message that didn't meet the more stringent requirement.
Some implementations would figure out ways to incrementally disrupt and extract elements from the DOM - but this would sometimes cause resource leaks due to the design of the W3C DOM itself.
The expat had explicit support for parsing Jabber/XMPP messages very early, and was by far the most often XML component used for making libraries.