💾 Archived View for soviet.circumlunar.space › pjvm › log › 000010-svhop.gmi captured on 2024-08-31 at 12:11:53. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-02-05)

-=-=-=-=-=-=-

announcing svhop

by pjvm

17-08-2023

log entry #5 (#7 overall)

svhop is a new piece of software. Its name stands for: simple virtual hosts for oneliner protocols. If you have a super-server and multiple server programs - that speak, for example, the gemini protocol - designed to run under that super-server, svhop lets you dispatch incoming requests to different server programs depending on the hostname in the request.

A super-server is a program that sits between the server program and the client. It handles incoming connections and for every connection, it invokes the actual server. This server program then doesn't need to know about IP addresses or ports, it doesn't need to do TCP nor potentially TLS; the server program itself just reads the request from its standard input and sends a response to its standard output.

I like the idea of a super-server: only one programmer has to deal with the complex interface, which is reduced to a simple, universal one for the authors of server software. Most importantly for svhop, other programs can easily be put inbetween the super-server and the server, for example to perform transformations on either the input or the output - or to decide based on the input which server program should even be run.

Combine that with the simplicity of gemini, and all sorts of things become almost easy. All svhop really needs to do is parse the hostname from a URL.

This is my first real public software project. I'm kind of anxious: the code is probably awful, maybe there is a terrible flaw that I've overlooked... Catastrophising aside, I do think there is some real value in this project: it offers a simple way to host both a static capsule and an interactive app on the same server, listening to the same port.

And that for something that was technically written in a single day! (This is a lie by omission, of course. Writing a piece of software is only half the work. Correcting my many mistakes to make it actually work was done on the second day.)

Anyway, I would be surprised if anyone else than me ends up using it. If you make use of svhop for something, I would love to hear about it!

svhop's git repository is at Codeberg:

https://codeberg.org/pjvm/svhop

log index

main page (with contact info)

PS: You may note that in my previous log post I was talking about a software project I was working on. svhop is not that project, clearly: the project I was talking about uses client certificates, which svhop doesn't have anything to do with. Rather, svhop is an offshoot of that larger project.

the previous post, "phones, queueing theory and a software project"