As a partially-sighted computer scientist, I’m sometimes asked for an opinion on little-known technologies that might seem to make things easier for blind or partially-sighted people. Gopher was an early-1990s alternative to the then-emerging World Wide Web, and some enthusiasts think it must be better because it is text-based. Although Gopher can deliver graphics and other files, it’s usually used for plain-text files and separate lists of links. But there are problems:
After I wrote the above, some Gopher enthusiasts developed a new protocol called Gemini which largely addresses these things. Gemini is UTF-8 compatible and wraps text to the window width. It can also set language tags to help speech synthesisers select the correct pronunciation, although all languages used on the page are listed in the protocol header rather than in the markup, so the synthesiser still has to work out where the use of each language begins and ends (unless they start using Unicode 3.1’s deprecated U+E0001 ‘language tag’ for this). Gemini’s ‘preformatted’ regions can still contain ASCII art, but clients like Ariane/Seren can collapse these regions by default.
Enthusiasts of the original Gopher protocol sometimes point to its being more ‘lightweight’ than Gemini and the Web’s HTTP, because Gopher is “headerless” whereas Gemini carries uncompressed TLS overhead and HTTP adds headers to each transaction. The rest of this page discusses Gopher’s claim of being lightweight.
It may be surprising that adding more headers can save traffic, but it can. Consider, HTTP/1.0 and HTTP/1.1 has:
So the actual traffic-saving advantage of headerless protocols exists only for a one-off access to a single and very small file.
If you do need one-off access to a single very small file and would genuinely benefit from a headerless response, this can also be obtained using:
If you’re typing into a Telnet client by hand on a mobile phone that charges you for every byte, then it’s likely that each keystroke will end up in a separate TCP packet (not to mention the echo), in which case you’d probably be better off either using an off-the-shelf HTTP browser to send the request all at once, or else using a custom port that doesn’t require a request at all (if you don’t mind the information also being available to anyone who runs a port probe, and you don’t need to make too many different types of information available in this way).
A “what is my IP address?” service on port 2 (the Python script has to be written without spaces if you want to inline it into /etc/inetd.conf):
Code:
2 stream tcp nowait nobody /usr/bin/python2 python2 -c i=__import__;a=i('sys');b=i('socket');s=b.fromfd(a.stdin.fileno(),b.AF_INET,b.SOCK_STREAM);s.sendall(s.getpeername()[0]+'\n')
Report uptime and system load on port 3:
3 stream tcp nowait nobody /usr/bin/uptime uptime
Serve a small text file on port 4:
4 stream tcp nowait nobody /bin/cat cat /weather.txt
I won’t go into silly nationalistic squabbles about the Web being invented by a Brit working in Europe whereas Gopher was American—if anyone feels tempted to use Gopher’s general inability to display non-English languages as an anti-American joke, please remember that quite a few Americans were involved in designing Unicode and other multilingual standards, so they’re not all ignorant. There are also potential political points about Gopher having had stricter licensing in its early years, but America isn’t the only place with plenty of lawyers and they did eventually GPL it. But it does seem that the Gopher protocol would fall on technical points alone, and that its enthusiasts would be better off promoting low-bandwidth and “text-friendly” websites, or perhaps using Gemini if they want the thrill of building something simpler than the Web.
All material © Silas S. Brown unless otherwise stated. CJK was a registered trademark of The Research Libraries Group, Inc. and subsequently OCLC, but I believe the trademark has expired. Firefox is a registered trademark of The Mozilla Foundation. Python is a trademark of the Python Software Foundation. Unicode is a registered trademark of Unicode, Inc. in the United States and other countries. Any other trademarks I mentioned without realising are trademarks of their respective holders.
text/gemini;
This content has been proxied by September (3851b).