symlink | misc | Gale

Gale was an instant messaging system originating from Caltech, somewhat of a competitor to MIT's Zephyr, and contemporary terms rather similar to ActivityPub in its user experience.

See also: journal post on my old site

At its core, Gale is a simple pub/sub protocol where clients subscribe to various topics, with little to no distinction between direct and group messages. To receive public chat messages, one subscribes to pub@ofb.net; to receive personal IMs, one subscribes to their own address smith@example.com.

Locations are scoped to a domain – Gale supports a topology similar to XMPP (or to some extent EFnet-style IRC), where each domain has its own galed server to which local clients connect, and which exchanges messages with other servers. Client subscriptions to locations on foreign domains are also proxied through the client's local galed.

The local parts of an address are hierarchical, similar to "plus addresses" in email – subscribing to a location implicitly includes messages sent to dot-separated "sub-locations", such as pub.tv.fox@example.com.

User interface

The default interface of Gale is modelled after write or wall. It doesn't come with an all-purpose client; instead, one runs gsub in a terminal to subscribe to locations, which then forks into background so that Gale messages will be received in a very similar way to write messages. To post a message, one uses gsend.

$ gsub -e test@example.com
! 2013-01-18 17:51:37 gsub notice: skipping default subscriptions
! 2013-01-18 17:51:37 gsub notice: subscription: "test@example.com"
! 2013-01-18 17:51:38 gsub notice: connected to gale.example.com
(gsub forks to background)
$
$ echo "Hello world!" | gsend test@example.com
$
(gsub running in background receives the message)
------------------------------------------------------------------------------
To: test@example.com
Hello world!
                       -- john@example.com (John Smith) 2013-01-18 17:51:45 --

There were a few other clients, such as Ginsu (a full-screen terminal client written in Haskell) and Fugu (a graphical Tk-based client that looks every bit like Twitter or Mastodon clients today).

Structure

There are no join/leave notifications when someone subscribes, so there's no way to know who's reading messages posted to a public location. However, Gale does implement a presence system for users – when a client such as gsub starts, it sends a status announcement to a public location _gale.notice.[user]@[domain to which anyone else can subscribe.

All messages are signed, and private messages are encrypted – every user has an RSA keypair, which can be requested by posting a message to a well-known address at the user's domain, where the gdomain daemon will respond with the user's public key. Clients like gsub will automatically request the sender's public key upon receiving a message (building up a local cache in /etc/gale), while gsend will try to request the recipient's public key for encryption – this is practically the only thing that distinguishes direct IMs from public posts.

For key verification Gale implements a hierarchical system where user keys are signed by the domain's key, which is then signed by the parent domain's key, and ultimately all TLD keys (such as the one for com) are signed by a single ROOT key, which throughout Gale's lifetime was managed by Gale's original developer (egnor). The keys themselves were RSA-768, which is insufficient today, but was just barely within secure bounds up until Gale's demise.


Overall, Gale is a rather elegant (in the Unix sense) system that ought to have received a lot more attention than it has.

Unfortunately it did not see much use outside of its original ex-Caltech circle. The largest public hub, pub at @ofb.net, saw maybe a dozen users until the OFB №.3 server's crash in 2017 (whereupon its community migrated to a more modern chat platform). The source code of Gale, imported from CVS to Git, is available from here.