Blizanci
Blizanci is a Gemini server, written in Erlang
Source code on Github
Objectives
- security
- robustness
- spec conformance
- good support for PKI and private content
Other features
- The server can be configured to allow Titan uploads.
- Blizanci allows a community of users who all have certificates signed by a single certificate authority to access private URLs. This separates out the administration of users and authentication from the operation Gemini hosting.
- CGI is supported, as are servlets in general. There is no requirement that CGI scripts generate all their output at once, but it is enforced that responses to Gemini clients are conformant with the protocol.
- There's a set of timeouts to prevent Slow Loris -style attacks.
- Worker pools for CGI and Titan, for rate-limiting
Servlet architecture
Each request gets its own process (in the Erlang sense of lightweight process, not the UNIX sense of process).
For asynchronous content generation, other processes may need to be created. Accordingly, all valid requests are potentially routed (by the aforementioned per-request process) to a servlet. The servlet code works out whether a response can be made available immediately, and if so, the function call to handle the request returns a response that can be encoded and sent to the Gemini user-agent. But in the alternative, the call can return a "defer" message and spawn a new process. The per-request process handler, on seeing the "defer" value, simply waits, and sends nothing to the Gemini user-agent. The spawned servlet process then asynchronously passes messages back to the per-request process.
Servlets are used for:
- CGI (deferred / asynchronous)
- titan (deferred / asynchronous)
- static responses (immediate / synchronous)
Code quality
The code was subjected to a fairly thorough peer review a few years ago, but there has been a good deal of development since.
There are not a lot of unit tests.
Roadmap
Blizanci's current roadmap
Trivia
The name is simply a translation of (one of the senses of) "Gemini" into Serbo-Croatian.
https://twitter.com/ivanhoe011/status/1613464011257040898