The Gemini Protocol


Reading time: about 2 minutes

What is Gemini?

Gemini is both a document markup format and an internet protocol for accessing and downloading documents and other files.

The official project website is gemini.circumlunar.space.

Document format

The Gemini format is a plain-text format. The formatting is line-based and the documents are encoded using UTF-8.

Since the document format is simple and lacks recursive features, it can be parsed with a basic state-machine parser.

Network protocol

The Gemini protocol is a simple network protocol that can be used to fetch files from servers. The protocol follows a request-response model, and handles one response per connection. This is similar to HTTP with the Connection: close header.

The protocol uses a TLS connection over TCP. Here’s how a simple exchange looks.

  1. Client establishes connection to the server.
  2. Client sends the requested URL, followed by a newline. gemini://example.com/homepage.
  3. The server responds with a status code and a MIME type, followed by a newline.
  4. Any content received until the connection closes is the response body.

Reception

The project was well-received in Hacker circles; such as Hacker News, the Tildeverse and the Fediverse. A lot of people who are involved with the Gopher protocol have shown interest in the Gemini protocol as well.

Community

The Gemini community, both users and developers, mostly communicate via their mailing list. The mailing list archives are also available on the internet.

Usenet / NNTP newsgroup

On 2021-09-27; Jason Evans, a member of the Usenet Big-8 Management Board, asked the Gemini mailing list members to see if anyone would be interested in an official Gemini newsgroup.

On 2021-10-22, it was decided 1 that comp.infosystems.gemini would be created.

Services

Aside from blogs and personal notes, the Gemini community provides a lot of services over the protocol. Some of those services include search engines, news aggregators, weather reports and discussion forums.

Proxies

Similar to Gopher, Gemini also has multiple proxies that allow the content to be viewed from web browsers. Here are some example links.

Simplicity, or lack thereof

Most aspects of the protocol and the document format are very simple and easy to implement. Despite this, the protocol specification mandates the use of TLS, making stand-alone implementations very difficult. If one is okay with using an external library or wrapper to implement TLS, the rest of the protocol should be quite simple.

Implementations

As Gemini has been designed with implementation simplicity in mind, there is a large number of Client and Server implementations available.

Client implementations

gmni

gmni is a command-line utility to fetch documents over the Gemini protocol. It is developed by Drew DeVault. The source code can be found here.

gmnlm

Server implementations

// TODO: Fill section

Relevant links

History and timeline

// TODO: Fill section

  1. The decision was posted to news.groups.proposals and news.announce.newgroups with the Message-ID skuf22$8di$2@theuse.news.theuse.net on Fri, 22 Oct 2021 10:22:26 EDT. 

Citation

If you find this work useful, please cite it as:
@article{yaltirakligeminiprotocol,
  title   = "The Gemini Protocol",
  author  = "Yaltirakli, Gokberk",
  journal = "gkbrk.com",
  year    = "2024",
  url     = "https://www.gkbrk.com/gemini-protocol"
}
Not using BibTeX? Click here for more citation styles.
IEEE Citation
Gokberk Yaltirakli, "The Gemini Protocol", October, 2024. [Online]. Available: https://www.gkbrk.com/gemini-protocol. [Accessed Oct. 10, 2024].
APA Style
Yaltirakli, G. (2024, October 10). The Gemini Protocol. https://www.gkbrk.com/gemini-protocol
Bluebook Style
Gokberk Yaltirakli, The Gemini Protocol, GKBRK.COM (Oct. 10, 2024), https://www.gkbrk.com/gemini-protocol

Comments

© 2024 Gokberk Yaltirakli