
A plug for the Spartan protocol
Note
This article is about Spartan, the HTTP-like Internet protocol for document browsing, and not the sporting event or the ancient Greek culture.
About five years ago I posted my views on the relatively-new Gemini protocol. More recently, I posted on what had changed in the last five years. In that later article I alluded briefly to the Spartan protocol, originally published by Michael Lazar. Gemini, Spartan, and others aim to create an alternative, “small” web that is immune to commercial exploitation.
Other than HTTP itself, which continues to have a place in the small web world, Gemini is probably the most widely used of the alternative protocols. Gemini has mandatory TLS encryption, which means that servers can use client certificates to authenticate users. In fact, they have to: Gemini provides no other method of authentication.
Spartan is similar to Gemini, and expects that most data transfers will be of Gemtext documents – the same basic document format that Gemini uses. The main difference is that Spartan is not encrypted. This means that, unlike Gemini, it’s not really suitable for any application where the user needs to be authenticated. However, for straightforward document retrieval it potentially scores over Gemini: the lack of encryption means it’s faster, and demands fewer resources.
Given the current low levels of load on any of the small-web protocols, resources are unlikely to be a problem right now, except in two situations, both of which I endorse.
First, Spartan is accessible – with the right adapters – to retro-computing enthusiasts. If you can simulate an TCP connection using a serial interface – and we have many ways to do that – you can browse Spartan sites/capsules using a CP/M program on an 8-bit microcomputer. There’s no realistic way to do this using Gemini, because of the requirement for TLS.
Second, many people run their Gemini capsules on throw-away hardware, or on cheap virtual private servers in the cloud. These services are only affordable when they offer low memory, storage, and CPU resources. Such environments not only lack the resources to run a heavy server process, they often lack the resources to install and run sophisticated build tools, too.
So, in order to experiment with Spartan on my VPS, I wrote my own Spartan server program. The source code is on GitHub. It’s written in C, and needs nothing but a C compiler to build. At runtime, it shouldn’t ever use more than about 1Mb of RAM. In my experiments it’s much faster than Gemini, using the same hardware and the same documents, simply because there’s no encryption/decryption overhead.
I’ve tried to make the server application secure and robust but, in all other respects, it’s very limited. It wouldn’t be suitable for a shared host, or for any application with high load. But high load is unlikely to be a problem any time soon.
So now you can read my ramblings using a Spartan client:
as well as a Gemini client:
It’s the same content, just different protocols. Since many clients that support Gemini support Spartan as well, you can see for yourself whether the Spartan version is faster.
While there are a number of free-of-charge, public Gemini hosts, I don’t know of any public Spartan hosts, free or otherwise. So I guess that, right now, Spartan will only be of interest to people running their own servers. If you are running your own server, there’s little extra work involved in hosting Spartan alongside Gemini, since they favour the same document formats: you can use the same document root for both servers.
Of course you’re welcome to use my Spartan server application, but there are plenty of alternatives if you need more sophistication.
I have to stress that Spartan is of no use for any application that requires encryption, or a way to identify users. However, the small web isn’t a “dark web”, and there’s very little content that needs to be browsed secretly.
I don’t know if Spartan will catch on; it’s been around for a few years and there hasn’t been a lot of uptake. Still, it’s worth considering.
Have you posted something in response to this page?
Feel free to send a webmention
to notify me, giving the URL of the blog or page that refers to
this one.


