gemini.git

going-flying.com gemini git repository

summary

tree

log

refs

cc9f5eb75928a256f4a680b759358e4f4b94016a - Matthew Ernisse - 1666912302

new post

view tree

view raw

diff --git a/users/mernisse/articles/30.gmi b/users/mernisse/articles/30.gmi
new file mode 100644
index 0000000..ab8cd7c
--- /dev/null
+++ b/users/mernisse/articles/30.gmi
@@ -0,0 +1,53 @@
+---
+Title: Thinking about threading.
+Date: 10/27/2022 19:00
+
+Several years ago I wanted to have a way to share short thoughts, and found
+items (links, images, and the like) on my website.  Most of the website is
+made up of markdown files that render into HTML and while this isn't
+difficult to update on a real computer it is cumbersome on what passes for
+the state of the art in mobile operating systems these days so I wanted
+something that I could post to using a web browser.  I ended up building
+the resulting microblog system out of several Microsoft Azure services, namely 
+Functions, Storage Tables, and Storage Blobs.  Later, when I built this Gemini
+capsule I wanted to bring that content across so I wrote a Python program
+that fetches the data from the API and renders it out to gemtext and an Atom
+feed.
+
+=> /thoughts/	The microblog, republished to Gemini
+=> /git/cgi/gemini.git/tree/master/files/thoughts-to-gemini.py The generator source
+
+Since I launched the microblog, I've wanted to add threading to the otherwise
+linear model.  Recently I got the motivation to start and over the last couple
+of days I've been working on adding the infrastructure needed.  The backend
+was simple, adding an attribute to each Thought that points to the ID of
+another Thought (called naturally -- In-Reply-To).  I then added several
+functions to the API to organize collections of Thoughts into threads based
+upon that metadata.  Finally I have started providing a threaded display to
+the various interfaces that render Thoughts to readers.  The first one to
+get a threaded view was the RSS feed as that is simply another Function in
+Azure.  This made it easy to update and while I was in there I added a
+cache mechanism backed by Storage Blob.  The next was to update the
+static generator for my Gemini capsule.  I somewhat chickened out here and
+just added a display to each Thought that includes the date/time of the
+Thought that is being replied to.  It doesn't sort as nicely as the RSS feed
+but it was the simplest change and since gemtext doesn't have multiple levels
+of blockquote or other ways to easily denote depth it seemed the most
+logical solution.
+
+I'd be interested in hearing people's thoughts on alternatives, understanding
+that these are threads in the e-mail or news sense not in the Twitter sense
+so you can totally have constructs that look like this.
+
+``` ASCII art showing a multi-level tree structure.
+ A -\
+    +- B
+    |  +- D
+    |     +- F
+    |     +- G 
+    |  +- E
+    +- C
+```
+
+Though frankly I don't think they'll ever get quite that complex unless I
+start going quite mad.