Cable Protocol Comparison

Comparing a project against others is difficult.

There are selection and favoritism biases, reams of documentation to process while contending with a lack of foundational knowledge for a given project, and time pressures.

More importantly, all projects have their own specific nuances and reasons of existence. The act of comparing necessarily erases these essential qualities. At the same time, a comparison can be a useful tool to help new people orient themselves using past experiences.

The possibility space of comparisons we could make is… quite large. We have elected to limit the comparison to 1) established protocols, 2) in use today, and 3) focusing on the same domain: chat. We have also chosen to focus on projects with openly available implementations and code.

We try to compare Cable to other projects using a set of criteria that are of foundational importance to our project, while at the same time we hope the criteria themselves are, mostly, intelligible without a specialized background.

Make note, however, that all of the mentioned projects are good, useful, and valuable in their own rights. As are projects we haven’t listed in this comparison for the previously mentioned reasons or due to our lack of knowledge about them.

Any misrepresentations of other protocols are good-natured mistakes and we want to address and fix any such issues, please reach out if you find any!

This comparison was part of a grant milestone focused on documentation. The grant itself was part of NGI Assure, a fund established by NLnet.

One last note before you go on reading this comparison:

You may benefit from reading about the background and considerations driving the choices made behind Cable’s design as a protocol: Introduction to Cable for the interested person.

Because the design choices strongly influence this comparison.

Comparison at a glance

The meaning of each column is described in detail in the next section, which itself is followed by a section performing a one-by-one comparison treating each project according to the different criteria.

Note: In this table’s first couple of rows we compare Cable against our old approach, called Cabal-HC in this comparison. HC is short for hypercore—the technology stack we built on when starting out with that implementation back in 2018.

Name Binary vs Text Peer-to-peer or server Clear specifications Implementability Single core implementation Organizational form Has delete Group vs individual
Cable Binary Peer-to-peer Yes High No Volunteer-driven project Yes Group
Cabal-HC (our old protocol!) Text (JSON) Peer-to-peer No Low Yes (Nodejs) Volunteer-driven project No Group
XMPP Text Server mainly (p2p via extension) Yes High No Ecosystem around IETF standard No (yes via extension) Individual (group via extension)
IRC Text Server Yes High No ecosystem around IETF standard No Group (per-channel only)
Matrix Text (JSON) Server Yes Low No Commercial with venture funding Yes (no, for some data) [1] Group (per-channel mainly)
SimplexChat Text (JSON) Server Yes Medium Yes (Haskell) Commercial with venture funding Yes Group & individual
DeltaChat Text Server Yes Medium Yes (Rust) Grant-driven volunteer project Yes & No* Group & individual
Briar Binary Peer-to-peer Yes Medium Yes (Java) Company with grants Yes Individual-centric with group invites (contact-book based)
cwtch Binary Server (peer-to-peer 1-on-1 connections possible via Tor) No Low Yes (Golang) Non-profit, Canada No? (but defaults to not store conversation history) Group & individual (contact-book based)
Signal Binary Server Yes Low Yes (Rust) Non-profit, USA Yes Group (per-channel only)

Summary

In Cable, we’ve tried to combine the best parts of how the older protocols worked (high implementability) with the insights and usefulness of newer projects: group chat paradigms have changed since the 1980s, peer-to-peer is a strong architectural choice if possible to support, and delete is an important feature for many reasons.

This is represented in no better place than in the most relevant comparison: between Cable and our previous implementation of the same idea, Cabal-HC.

Comparison criteria

Each criterium has a set of guiding questions, which frame it as one or more questions, and a motivation describing its inclusion and perceived importance. In the next few paragraphs we excavate the meaning of each before going into our comparison proper.

Text or binary communication

Guiding question:

“Does the protocol use text-encoded messages for communication or does it encode its messages as binary payloads?”

Why we care about the distinction:

Passing binary data is more efficient and uses less data than if the exchange uses a text representation. In certain cases, binary is also easier to implement (the order of bytes is necessarily both ordered and specified) than text-based communication. Finally, JSON-specific formats can be difficult to implement across programming language boundaries depending on whether it is canonicalized.

Peer-to-peer or server-based topology

Guiding question:

“Is the network topology’s central concept device-centric (peer to peer) or server-centric?”

Why we care about the distinction:

This criteria is about whether you can feasibly run a full node on any device (peer-to-peer) or if you need other project-specific infrastructure to exist and run (server-based) in order to communicate.

As for why we think that matters: peer-to-peer projects can, and often are, facilitated by companion server infrastructure or relays, but, at their core they can function without them (such as in scenarios with serious network infrastructure degradation or failure). The opposite does not hold true for server-based projects as they have essential roles, importance, and/or functionality assigned to their server component. Moreover, additional infrastructural and architectural requirements impact project implementability.

Ideally, peer-to-peer projects lowers the barrier for a project to continue existing as any user can start using the project and provide availability through having the program open without need of additional expertise or specialization. BitTorrent is a good example of what the paradigm can accomplish in terms of project lifespan, resilience, and relevance.

Clear specification:

Guiding questions:

Why we care about the distinction:

The existence and availability of clear specifications affects both the Implementability and Single core implementation criteria. It makes it easier to grow the ecosystem around the protocol and the pool of stakeholders, interested parties, and developers.

Having clear specifications gives a protocol additional life in the event that its originators move on to other things, making interested parties and stakeholders legitimate candidates as new project stewards, and enables rediscovery of the project should it should fall into temporary obscurity.

Implementability:

Guiding questions:

Why we care about the distinction:

Implementability is affected by having a clear and complete protocol documentation, care taken during the design phase to avoid encoding incidental platform details and eccentricities, as well as making tradeoffs that constrain accidental complexity while still allowing for essential complexity.

Implementability has an effect on project lifespan by overall impacting its resilience. It is more difficult to onboard potential developers to a project with low implementability as the protocol knowledge may be contained within individual developers rather than externalized in documentation. The tradeoffs that affect implementability may similarly affect comprehending the system’s parts and how they combine into a whole.

Projects with high implementability have the potential to be implemented using techniques and languages with high power efficiency, giving new purpose to old devices.

Single core implementation

Guiding question:

“Is the protocol mainly implemented by a single core implementation?”

Why we care about the distinction:

This criteria acts as a measure of protocol implementability. By »core implementation» is meant an implementation that can functionally act as a stand-in replacement for the reference implementation.

Low complexity protocols tend to have many implementations that can interoperate, ensuring the project’s survival into the future by spreading development across many stakeholders.

Organizational form

Guiding questions:

“Does the project require dedicated and continual funding to exist? What kind? Does the organizational form impose a hierarchy imposed between developers and users?”

Why we care about the distinction:

All things considered equal, a volunteer project is paradoxically less sensitive to project economical shocks than a commercially run project. »Paradoxically» because volunteer projects can often be identified by their lack of funds.

If a commercial company fails to raise funds, that can often be the end of that project due to bankruptcy proceedings.

People engaged in volunteer projects derive value from other avenues such as satisfaction, curiosity, experience, comradery. Receiving donations can be a boost and a welcome bonus—especially for dealing with useful/necessary but onerous tasks—but is often not an existential concern as financial concerns were not a core consideration when getting involved.

Volunteer projects also function as an organic environment for interested developers to test out a project and potentially become more involved and contributing to the project on some level. This can be contrasted with the budget- and rule-based hiring systems of companies, and the hierarchy and conflicts which arise over time between company management, paid staff, and eager volunteer contributors.

Delete

Guiding questions:

“Can you delete your own posts? Can you prevent storing posts you don’t want to store?”

Why we care about the distinction:

We think it’s important for users to have the ability to, as far as possible, remove content they themselves authored and which they no longer want to be shared. Information once shared is very difficult (impossible?) to verifiably retract, but steps in this direction towards “damage mitigation” are still useful, in particular for scenarios of accidental information sharing. In a phrase, arbitrary message revocation is what we are looking to determine if the compared protocols support.

This criteria falls in line with, and supports, the “right to be forgotten”.

Group-centric or individual-centric

Guiding questions:

“How is data access structured in terms of the protocol? Is it group centric like messages in a group chat, or individual-centric like in the 1-on-1 instant messaging paradigm?”

Why we care about the distinction:

All other factors being the same, a project that services group chat but which was originally designed for a 1-on-1 paradigm will have a higher degree of friction during implementation and use compared to projects designed for group chat from the ground-up. Additionally, any project that supports a group-centric approach can also be used as a 2 (or 1!) person chat.

Comparisons one-by-one

Cable

Cabal-HC

XMPP (Extensible Messaging and Presence Protocol)

IRC (Internet Relay Chat)

Matrix

SimpleX Chat

Delta Chat

Briar

cwtch

Signal

Notes