Hacker News new | ask | show | jobs
by v_paliy 2298 days ago
Thank you. I heard Go language is a good idea for the backend.
1 comments

Well, it is. I am a huge Go fan, but one of the most common XMPP servers (ejabberd) is written in Erlang and I think it probably is an even better choice for that purpose.

However, more important than the implementation language is the protocol you are using. So far, this is probably something you didn't spend much time on since you had just one client and the server was more or less just Firebase. But as soon as you want to allow others to run their own servers (they might want to because they trust only themselves), you need at least some kind of server-to-server (s2s) protocol. If you want other developers to build clients for your network, you will also have to define a client-to-server protocol (c2s).

A well-known standard in this regard is XMPP and another competing is Matrix. XMPP is much older and part of the 'official' standards by the Internet Engineering Task Force, while Matrix is younger and setting a stronger focus on what the server should do.

> A well-known standard in this regard is XMPP and another competing is Matrix. XMPP is much older and part of the 'official' standards by the Internet Engineering Task Force, while Matrix is younger and setting a stronger focus on what the server should do.

It's a bit disingenuous to sell XMPP as a single IETF standard (RFC 6120 only covers core) when it is not. It is many standards known as XEPs (XMPP Extension Protocols) https://xmpp.org/extensions/

They are hugely fragmented and many many clients support some but not others. (Just take a look at the case of E2EE on XMPP), some support OTR, some support OMEMO, some do both, and neither work for other channels like VOIP. If you ever do any kind of federation you're going to want strong E2EE for privacy reasons.

It's also worth noting that the Matrix developers had quite a bit of experience developing XMPP software before they undertook the Matrix project. The specification https://matrix.org/docs/spec is an maintained document with a reference client (Riot) which has helped third party developers with implementation and example.

Thank you for your advice! I'll try to implement it in my future projects.