|
|
Log in / Subscribe / Register

Matrix: a new specification for federated realtime chat

Matrix: a new specification for federated realtime chat

Posted Feb 12, 2015 5:21 UTC (Thu) by wahern (subscriber, #37304)
In reply to: Matrix: a new specification for federated realtime chat by Cyberax
Parent article: Matrix: a new specification for federated realtime chat

It's made around a concept of permanent "associations" between the endpoints (so a server can store messages while endpoints are offline)

Yet Matrix has a similar setup. Clients connect to "home servers", which are relays for receiving and broadcasting message events. Basically store-and-forward. From section 5.1 of the specification:

A "Client" typically represents a human using a web application or mobile app. Clients use the "Client-to-Server" (C-S) API to communicate with their home server, which stores their profile data and their record of the conversations in which they participate.

I'm not saying that I like XMPP. I just don't see how Matrix is really different, except that it's "web scale" because it ditched XML in favor of JSON over HTTP. Plus IRC has received a resurgence of interest (if the interests of the junior engineers at my company are any indication). So I give them bonus points for mashing together HTTP, JSON, and IRC.

FWIW, I definitely prefer JSON over XML, simply because it's simpler, easier to parse, and maps more closely to language data structures, whether in C, Python, or something else. But tell me how Matrix solves the more serious problems which plague XMPP? Namely, the explosion of competing and complex extensions.

Matrix talks about supporting WebRTC and VoIP as a session initiation channel, but the devil is in the details! Matrix works no better than XMPP in this regard.

Matrix strikes me as the answer to the question, "how do you re-invent XMPP, avoiding design-by-committee, incorporating MUC, and making it easier to implement relays in your preferred language."


to post comments

Matrix: a new specification for federated realtime chat

Posted Feb 12, 2015 5:44 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link] (3 responses)

> Yet Matrix has a similar setup. Clients connect to "home servers", which are relays for receiving and broadcasting message events. Basically store-and-forward. From section 5.1 of the specification:
XMPP is missing that distributed _stateless_ store-and-forward support. In XMPP each server has to store all of the state to remember which messages are yet to be sent to other servers while in Matrix servers can simply use an rsync-like protocol.

Matrix can be thought of as a new incarnation of USENET (now with real-time messaging!) rather than IRC.

> FWIW, I definitely prefer JSON over XML, simply because it's simpler, easier to parse, and maps more closely to language data structures, whether in C, Python, or something else. But tell me how Matrix solves the more serious problems which plague XMPP? Namely, the explosion of competing and complex extensions.
Personally, I don't really care about XML vs. JSON - both work perfectly fine and XML is actually better specified (I still miss XML schemas while using JSON, sigh).

The main feature that I like in Matrix is its use of distributed consensus protocols rather than explicit state storage like in XMPP. This single bit of design can do wonders.

Other than that, I agree that it's really early to tell if Matrix can avoid XMPP's pitfalls. But I have some hope and that's more than I can say about XMPP.

Matrix: a new specification for federated realtime chat

Posted Feb 12, 2015 12:50 UTC (Thu) by Arathorn (guest, #101018) [Link]

From my perspective, XMPP is all about message passing, whereas Matrix is all about state synchronisation (yes, I know they're two sides of the same coin, but they are opposite ways of addressing a similar problem). Matrix is basically an global EC DB with open federation and pubsub. A good analogy is that XMPP is like SMTP (with some storage extensions like IMAP), whilst Matrix is like NNTP. It's worth noting that XMPP does have some extensions like Buddycloud and FMUC which do provide decentralised persistent messaging - but with Matrix we wanted to see what'd happen if we just built on plain HTTP/JSON rather than the XMPP stack.

Matrix: a new specification for federated realtime chat

Posted Feb 12, 2015 17:23 UTC (Thu) by jnareb (subscriber, #46500) [Link] (1 responses)

> (I still miss XML schemas while using JSON, sigh)

There is JSON Schema, though

Matrix: a new specification for federated realtime chat

Posted Feb 12, 2015 18:31 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

Yes, and there are several of them. And none of them are standard or even capture the actual practical JSON use.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds