this post was submitted on 21 Apr 2024
51 points (98.1% liked)

Selfhosted

38707 readers
677 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I'm looking into hosting one of these for the first time. From my limited research, XMPP seems to win in every way, which makes me think I must be missing something. Matrix is almost always mentioned as the de-facto standard, but I rarely saw arguments why it is better than XMPP?

Xmpp seems way easier to host, requiring less resources, has many more options for clients, and is simpler and thus easier to manage and reason about when something goes wrong.

So what's the deal?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] -1 points 5 months ago (2 children)

Why is JSON better than XML? It's more modern, sure, but from technical perspective it is not objectively better right? Not something worth switching protocols for.

You mention XMPP has transports as opposed to Matrix bridges. I thought they give you roughly the same outcome. What's the difference?

[–] [email protected] 1 points 5 months ago

The only things JSON has over xml is that it’s easier to write a parser for it and the format is less verbose and less complicated. There are extensions to JSON that can add features that xml has and the JSON spec doesn’t have. Overall the xml spec is bigger and has more features but that also makes it overkill for many of the cases that it would be used in.

[–] [email protected] 0 points 5 months ago (2 children)

Why is JSON better than XML? It's more modern, sure, but from technical perspective it is not objectively better right? Not something worth switching protocols for.

XML is unnecessarily complicated. By trying to cram everything into the spec, it's cumbersome and hard to parse.

You mention XMPP has transports as opposed to Matrix bridges. I thought they give you roughly the same outcome. What's the difference?

The goal is the same, but the way they archive that is different. For transport to work, you need an account on each platform you are using the transport on. It relays the messages through that account by mimicking the client. While bridges work by relaying the messages between rooms and not specific users.

My understanding is limited, so if you are interested, please do your own research.

[–] [email protected] 3 points 5 months ago* (last edited 5 months ago)

Most Matrix bridges to commercial chat systems also require accounts on those networks. That's the only way to make them work on most of these systems.

I guess you are specifically referring to the Matrix to Discord bridge that does work like you describe, but a similar bridge has existed for XMPP to Discord in the past but is currently broken and unmaintained. The currently working XMPP to Discord transport does require you to puppeteer a personal Discord account, but that is rather because of a different focus of the used transport framework than any technical limitation of XMPP in that regard.

[–] [email protected] 0 points 5 months ago (1 children)

cumbersome to parse

Parsers have already existed for so long in every major language. Why need to worry about parsing?

And why need to worry about transports working differently if they achieve the same thing? They seem similarly convenient if I understood what you said correctly

[–] [email protected] 1 points 5 months ago

Additionally, libraries for XMPP exist in most languages, there is a varying degree of completeness, but they all do a good job of hiding XML from the programmer