Protocols, APIs, and conventions

Uncategorized

The fediverse is wired together by protocols like ActivityPub and WebFinger which, yet, I understand very little about. That’s due to the fact that the Steampipe plugin, which supports the dashboards I have actually been building and explaining in this series, does not require me to comprehend or utilize those protocols.It does, however, require me to comprehend and utilize the Mastodon API. Mainly I utilize that API by method of the Go SDK for Mastodon (thanks, mattn!), often I make REST calls directly. In either case, my read-only control panels use a relatively small subset of the Mastodon API. The complete API is rather broad and deep; it makes it possible for API clients to check out from and write to Mastodon servers in all sorts of methods. Here are the chapters of the Mastodon API book: apps, accounts, admin, instance, search, statuses, timelines, notifications, oembed. These chapters specify what prevails to all Mastodon clients, consisting of web apps, phone apps, native OS apps, and Steampipe dashboards.So far I’ve neglected protocol-enabled interop in order to concentrate on API-enabled interop. I understand that the fediverse consists of a lot more than simply Mastodon. I intend to check out BookWrym, Friendica, Funkwhale, Lemmy, takahe, PeerTube, Pixelfed, PeerTube, and others in due time. But right now the Mastodon environment is plenty to try to cover my head around.For example

, there’s a new web client for Mastodon: elk.zone. With the recent addition of assistance for lists, it has actually become my preferred method to engage in Mastodon area. So naturally I wanted to have the ability to click through from Steampipe dashboards to Elk, and use it as an option to the batteries-included Mastodon web app.It turned out to be simple to make it possible for that combination. Not thanks to ActivityPub, and not even thanks to the API. It works thanks to a 3rd level of interop at play: common patterns for account URLs and toot URLs.Here’s the

account URL for Ward Cunningham who hangs his shingle at mastodon.radio: https://mastodon.radio/@k9ox!.?.!. But as we saw in instance-qualified Mastodon URLs, if you check out that URL directly– and if it’s not your home server– you can’t follow Ward there, or include him to a list. You’ll need to copy that URL, paste it into your home server’s search box, run the search, and reach an instance-qualified URL where you can follow him or include him to a list: https://mastodon.social/@[email protected]!.?.!. If you’re house is fosstodon.org this would rather be https://fosstodon.org/@[email protected]!.?.!. Likewise here is among Ward’s toots at mastodon.radio: https://mastodon.radio/@k9ox/109802968820955379!.?.!. If you want to reply or enhance or favorite, you can’tdo it there. The URL you need is again one that routes through your house server: https://mastodon.social/@[email protected]/109802969999396562!.?.!. Keep in mind that the IDs for the very same toot vary! That distinction amazed me and some others

, and is a topic for another episode. Here I’ll just note that these two patterns govern how we interact when crossing server boundaries in Mastodon area using the stock web client.When I started utilizing Elk, another layer of pattern emerged. Here are those exact same URLs in Elk: https://elk.zone/mastodon.social/@[email protected]!.?.!https://elk.zone/mastodon.social/@[email protected]/109802969999396562!.?.!As it ends up, I simply required to make two of the Steampipe plugin’s change functions prepend elk.zone to the instance-qualified URLs, then make such prefixing a configuration alternative. Now when I visit Mastodonlinks from dashboards, to reply or enhance or follow or enlist, I land in the Elk experience that I prefer.ActivityPub and WebFinger are official standards. I would explain the Mastodon API as a de-facto standard. However this prefixing maneuver is just a convention. It’s not guaranteed to deal with another web

client, and not even guaranteed to work across all URLs presented by the stock Mastodon client. That’s OK by me

. Conventions are extremely useful. The Twitter hashtag is simply a convention, after all, inspired in turn by an IRC convention. We’re in one of those internet moments of fast development, when brand-new conventions can open emerging behaviors.

It hadn’t even struck me that the Steampipe control panels could support Elk. A couple of hours after I thought they might, they did. I have actually seen this example previously, possibly most significantly when the blogosophere adopted to enable internet browsers to auto-discover RSS feeds. That happened about 20 years earlier, and rather suddenly when a handful of leading blogging tools adopted the convention in a matter of days. It was a lot of fun to endure that period. If you missed it, enjoy the follow up that’s unfolding now!This series: Autonomy, packet size, friction, fanout, and speed Construct a Mastodon dashboard with Steampipe Browsing the fediverse A Bloomberg terminal for Mastodon Develop your own Mastodon UX Lists and individuals onMastodon The number of people in my Mastodon feed likewise tweeted today? Instance-qualified Mastodon URLs Mastodon relationship graphs Working with Mastodon lists Images considered damaging( in some cases) Mapping the broader fediverse Procedures, APIs, and conventions Copyright © 2023 IDG Communications, Inc. Source

Leave a Reply

Your email address will not be published. Required fields are marked *