Cover photo

Farcaster is a better match for SpaceX than X.

(Or, "How Farcaster hubs sync")

Let's talk about hubs and how they sync.

The Farcaster network is a network of hubs that exchange messages between them. Each hub holds the entire "global state": every cast, reaction, follow, every user's profile data, everything.

The farcaster app you are using, only has to connect to one of the hubs to read and post messages. Then this hub syncs with the rest of the network and every other hub receives your activity.

Hubs exchange messages between them in two ways:

  1. The first one, is practically real-time: The hub that receives a message uses a protocol called gossipsub and sends the message to the hubs it's connected to, then they do the same and in just a few seconds all hubs have received the message.

  2. The second is an out-of-band sync. This one is slower and only happens every few minutes (or whenever it's feasible, more on this later). During the out-of-band sync, two hubs practically compare their databases, and exchange deltas in order to get to the same status (exchange deltas to reach the same state).

If you are interested, there is a video describing the concept in more detail.


This model has a number of advantages:

  • It's developer friendly, because a developer can have a full copy of the network, locally, to work with

  • It's decentralized and censorship resistant because there's no single point of entry to the network

  • It's very resilient because you can take away any number of hubs (a recent count of Farcaster hubs brings them to ~150) and if there is at least one left, spawn new ones and reconstruct the network as if nothing happened.

These characteristics make Farcaster ideal for a number of environments where other social networks (centralized or federated) would fail.

When the office ISP went down

Imagine you are at work, using Farcaster by connecting to the office Farcaster hub that runs locally, and you are using a Farcaster client that connects directly to the hub [*]. At some point, your ISP goes down.

Here is what happens during the period you have lost connection to the rest of the Internet:

  1. You continue to have access to everything that was posted on Farcaster up to the moment the Internet connection went down.

  2. You can also cast, like, recast, follow and unfollow as if nothing changed.

  3. You can also see new casts and reactions from your colleagues that use the same hub, and you can reply and react to their casts.

The most important thing that changes during the period the ISP is down, is that you don't see any activity that happens outside your office (your office farcaster hub). But as soon as the ISP is up again, your hub will connect to the other hubs, it will propagate any activity that happened (in the office) during downtime, and receive all activity that happened outside your hub!

There are a few things that wouldn't work while the ISP is down:

  1. Any Farcaster activity that requires an onchain transaction, such as creating new accounts, approving and removing signers, or purchasing storage units.

  2. Of course, any content referenced or embedded in casts will not be available, such as images -but that's not Farcaster's problem and if someone really wanted to, they could fix it by using a caching proxy or something similar.

Social media on the Mars colony

One of the challenges a crew of a future the Mars colony will have to overcome is staying connected with Earth. Radio signals take 4-22 minutes to get from Earth to Mars, and it will take as much for a response to come back. There's not much we can do about this, unless we find a way for the radio signals to travel faster than light.

One more problem is that the available bandwidth is nothing compared to what we are used on terrestrial communications. I expect that all available bandwidth, will be used to support the operations of the station, and to exchange asynchronous messages between the station crew and Earth command center and their families.

One thing is for sure: The Mars crew will not be able to use X/Twitter, because it's built on HTTP, a synchronous protocol. However, our astronauts could use Farcaster!

An other cool thing is that Earth-March syncing could also be performed entirely off-line: Every mission to Mars could also carry a Earth-synced hub, that would sync with Mars when it gets there and every mission from Mars to Earth could carry the Mars state back to Earth.

Astronauts will have full access to everything discussed on Farcaster on Earth, interact between them, share their thoughts, and when their hub syncs with Earth, we will all be able to see their activity, react to it, etc., and vice versa.

We may have to create an FIP to introduce some small changes to support the Mars colony use case, but I'm optimistic that space settlers count as qDAUs and it will get the full support of the devs.

So, yes: Farcaster is a better match for SpaceX than X!

[*] A small note on Farcaster clients connecting directly to hubs. Today, most Farcaster clients depend on a backend hosted by the developer or a third party. These backends take a lot of the load that otherwise a client would have to do, like hosting a database that can be easily queried. These clients will not work without connection to this backend. However, it's 100% feasible to create a client that connects directly to a Farcaster hub, or even have a local installation of the backend required.

Collect this post to permanently own it.
Purple Submarine logo
Subscribe to Purple Submarine and never miss a post.
  • Loading comments...