3 ms·
Modern versions of ejabberd and MongooseIM are much better than earlier versions in regards to scaling. But XMPP is still a mess. If you need to develop a custo
by nivertech 4y ago
Modern versions of ejabberd and MongooseIM are much better than earlier versions in regards to scaling. But XMPP is still a mess. If you need to develop a custom messaging app, it's much better to start from a clean slate, rather than trying to fit your data and interaction models into an XMPP framework. As a transport you can use Websockets, MQTT, and/or GraphQL.
The main problems with the earlier versions of ejabberd were:
1. Using Erlang strings (linked lists of UTF32 codepoints) instead of UTF8 binaries, which led to 16x more RAM use.
2. Over-reliance on Mnesia for session management which is a maintenance nightmare when used in large clusters. Now it can be replaced by Redis or your own DB.
3. Non-scalable default implementations for mod_muc (Multi-User Chat) and mod_pubsub.
4. Absence of built-in mobile push support.
That was before WhatsApp, which later committed upstream many of their scalability improvement to the BEAM VM.
Source: I scaled an old ejabberd cluster to 500K concurrent users, and wrote my own Erlang-based Long-Polling/Websocket Pub/Sub servers and MQTT brokers scaling to 1M concurrent connections per node in a cluster. Also Elixir-based specialized messaging systems.
- phoronixrly 4y ago*) Please refrain from developing custom messaging apps. Please use standard existing protocols. If XMPP is not your jazz, there are others.
- nivertech 4y ago> Please refrain from developing custom messaging apps I fully support this sentiment when talking about consumer messaging apps. I once joined a hackathon where organized asked participants to use 4 different consumer messaging apps, each for a different purpose. It's a mess, not sure if Google's RCS will solve it. Maybe governments need to force interoperability by law. What I meant by "custom" is "industry-specific". One of the first B2B uses for Instant Messaging was in Finance/Trading. There are many industry-specific messaging apps, each answering specific needs and/or compliance/regulation issues. Also in many cases you need a messaging/notification feature for an existing app, and using a full-blown messaging service is an overkill and/or doesn't fit your app. > Please use standard existing protocols. If XMPP is not your jazz, there are others. I did lots of XMPP-based projects. I also developed my own MQTT brokers/gateways. I'm following Matrix development. MQTT is too lightweight for human messaging. Matrix is certainly better than XMPP, but it's not designed to be easily embedded into an existing app. You have to write a bridge which is problematic. Matrix is really a decentralized conversation store rather than a messaging protocol. ... and IRC is too old ;)
- jeroenhd 4y ago> Maybe governments need to force interoperability by law This is what the EU is doing, although I fear for E2EE in cross-app scenarios.