💾 Archived View for rawtext.club › ~sloum › geminilist › 004811.gmi captured on 2023-11-14 at 10:31:37. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

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

<-- back to the mailing list

Message boards via e-mail, not Gemini

John Cowan cowan at ccil.org

Mon Jan 11 22:14:50 GMT 2021

- - - - - - - - - - - - - - - - - - - 

On Sun, Jan 10, 2021 at 1:00 AM Rohan Kumar <seirdy at seirdy.one> wrote:

This has been solved on the WWW through Webmentions. It should be
possible to bring this to a Gemini site, though perhaps not using the
Gemini protocol.

This is really a very nice design. Here's my attempt to adapt it to Gemini:

1) Alice mentions Bob's post in a text/gemini document by posting herresponse containing a link line to it.

2) Alice (or a tool that Alice uses) fetches Bob's post and scans it for alink line whose text is (or contains) "Webmentions". If there isn't one,Alice can't proceed. We'll call this the linkage URL. It can be absoluteor relative but can't contain a fragment.

3) Otherwise, Alice takes the linkage URL and appends"source=url1&target=url2" to it in the usual way. That is, prefixed by "?"if there is no query part already, or prefixed by & if there is. Url1 isAlice's post and url2 is Bob's post. There is no need to %-escape eitherof them. Note that this use of parameters is specific to linkage servers.

4) Alice then makes a Gemini request to the extended linkage URL. A 20response means success, but Alice doesn't have to care what is returned(perhaps an empty document or something human readable). The serverreferenced in the linkage URL, which we will call the linkage server,queues up the request for offline processing. This is important, as itmakes DDOSing more or less useless.

5) Alice can then do the same thing for all the other links in her post,and then she doesn't have to worry about it any more.

6) At some future time, the linkage server referred to in Bob's postdequeues a request:

6a) The server does some simple validation (url1 must be different fromurl2, neither url must be "localhost", etc.) and makes sure that url2 is aresource for which it is willing to accept requests. If any of this fails,the request is dropped.

6b) The server makes sure that it hasn't seen this request before (if so,it drops it).

6c) The server fetches Alice's post at url1 to make sure it really doescontain a link line that points to url2. If it gets an error other than52, it can (but doesn't have to) queue up the request to try again. A 52GONE request means don't try again, as Alice has deleted the post.

7) Exactly what happens next depends on how the linkage server works.

7a) The linkage server may notify Bob by email saying "Your post <url2> hasbeen linked from a post at <url1>.

7b) If the linkage server has read/write access to Bob's post (through thefile system, for example, or via sftp), it may create a link line toAlice's post using the first "#" header line in Alice's post as the linktext, and append that line to Bob's post under a header line saying "#Responses". This would leave a permanent record that anyone reading Bob'spost can see.

7c) Or the linkage server can do (as they say on Monty Python) somethingcompletely different.

8) If Alice updates the post, she can repeat the process for any newlyadded links.

9) More advanced client tools and linkage servers can cope with media typesother than text/gemini:

9a) If Bob's post is text/plain, it can be checked for a line saying"Webmentions: " followed by an URL; if Alice's post is text/plain, its bodycan be searched for url2.

9b) If Bob's post is text/html, it can be checked for a link or a elementwhose rel attribute is "webmention"; if Alice's post is text/html, it canbe checked for a link, a, src, or video element whose href or srcattribute is url2.

9c) Linkage servers can be smarter and handle schemes other than gemini,such as http(s), in which case they should follow <https://www.w3.org/TR/webmention/>, or gopher, or whatever.

A nice thing about this design is that Alice and Bob can do everythingpretty much by hand. Alice has to be careful to construct the right URL,but if she messes up, nothing very bad happens. The linkage server is theonly part that has to be smart, and even then it is not all that smart.Queueing up requests can be done by writing each one to a small file in adirectory, and they can be dequeued by reading a file from the directoryand unlinking it when it is processed. Alternatively the Posix batch(1)command can be used to run a command that processes one request.

John Cowan http://vrici.lojban.org/~cowan cowan at ccil.orgAndrew Watt on Microsoft: Never in the field of human computing has somuch been paid by so many to so few! (pace Winston Churchill)-------------- next part --------------An HTML attachment was scrubbed...URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210111/c9093f43/attachment-0001.htm>