Go-Fed: Past, Present, and Future

CJ

The Go-Fed suite of libraries implement the ActivityPub protocol in the Go language. It supports developers with different goals, from the polished projects of WriteFreely to scrappy personal blogs and a large swath of unnamed tinkered projects. Its development began in December 2017 and is still ongoing, readily scaling across new vocabularies, like ForgeFed, and is accommodating of complimentary libraries so clients can choose to embrace community-proposed solutions.

Go-Fed takes to heart the philosophy that the ActivityPub specification left opportunities for further evolution of its core ideas. It also embraces the philosophy of “only solving one problem” to provide a concrete platform for experimenting with the protocol itself or experimenting with a complementary idea.

This talk addresses Go-Fed’s unique history of being an early adopter, the challenges of developing in a statically-typed language, and the difficulty of rigorously isolating the “ActivityPub protocol layer” from other layers or an application. It goes over the approach to adopting the suite of libraries in new or existing codebases for interested developers. Finally, the project maintainer will provide his outlook on where Go-Fed can help provide a productive platform for protocol experiments, and where the project will focus efforts into 2021.

Questions & Answers available!

Q&A Session – Go-Fed: Past, Present, and Future
⬡ Hooray, the live Questions & Answers are available here

4 Likes

Thank you so much for creating this talk. I really enjoyed watching it. I am really charmed by how well the go-fed library has been put together and the flexibility it offers in building AP social apps on top of it.

I especially like the part where you can support arbitrary vocabularies that are modeled on top of the AS / AP vocabs, and which are defined in JSON-LD themself using a subset of the OWL2 Web Ontology language. Then do codegen based on that and get strongly-typed Golang interface types to work from.

I would like to know more about 2 related aspects to this:

  • Vocab plugin extensions in a go-fed app, maybe dynamically added (plugin marketplace)
  • The future: Federating Schemas/Behavior-Capabilities (going beyond FEDERATION.md)

Vocab plugins

I guess with the current setup one has to know beforehand what vocabs the app should support, and then at compilation time everything is packaged in the application release. Changes to vocab? —> Implement, codegen, add behavior, new release version.

I am fine with this flow for the time being, but in the future I might be interested in more of an openEngiadina (@pukkamustard) approach with a federated platform that supports arbitrary Linked Data vocabs that are continually added/extended. Each vocab would be in its self-contained plugin together with behavior + UI.

Now, I am not a Go dev yet, but I believe plugins is not Go’s strongest point (correct me if I’m wrong). There is this Go plugin system since v1.8. For dynamic plugins Traefik implemented their own Go interpreter called Yaegi.

About the Traefik implementation HN commenter sagichmal said:

“Go is basically incompatible with any kind of plugin-like dynamic linking. There are basically two reasonable models for doing something like plugins: the HashiCorp model, where plugins are actually separate processes that do some kind of intra-process communication with the host; or the Caddy model, where you select which plugins you want when downloading the binary, and they’re built-in at compile time.”

@cjs I wonder if you have any thoughts on this wrt go-fed and go-fed future. Personally - given what you already have - a plugin infrastructure seems like a great feature for go-fed project.

Future: Federating AP extension schemas

In your APConf presentation at 35:15 you talk about federating the vocabulary schema’s themselves. This is mega interesting and important for Fediverse future, so I dediced to dedicate to a separate topic. See: Future: Federating AP extension schemas

Wow, @cjs thank you for your kind and warm presence. It’s good to see you, hear your voice and what you have to say beyond the purely technical domain. I found you reveal a lot about your motivations for making this software. You seem to be a really gentle person. I’m looking forward to hangout with you some time. I keep being amazed at the human qualities of many people in this community.

Since it’s soon time for the BoF planning session I’ll just point you to @mayel’s presentation on CommonsPub and the quest for a modular decentralised app ecosystem, since he mentions valueflo.ws and you were asking about this.

1 Like

Copy-Paste from my comment on the Q and A

The problem I see with AP libraries is that the parts of an activitypub server are either easy and generic or very hard and very application specific (What’s the difference between a ‘Note’ and an ‘Article’). I can see the value in a complex code generator for a static language like go, but in this case it seems like you’re trying to make the static language very dynamic, a problem that can be solved by just not using the static parts in the first place. In our own efforts to modularize parts of the Pleroma codebase, we often found that a ‘pure’ AP view is often not realistic: You do need to know what kind of database you have, or whether a query to check for something else is expensive or not, or if you want to drop a message because you block the actor. All of these things are business logic (or, as we might call it, the actual program), but they still reach into the purer ActivityPub areas that people might want to have a library for.

The point: I’m afraid that libraries either do not enough (just basic serialization) or too much (deeply embed semantic of how to handle activities). Do you think this issue is real?

1 Like

Thanks everyone who attended! Thank you @mlemweb and @Sebastian for putting on this conference, I meant to thank you at the end of my Q&A but was nervous the whole time!

And thank you @lain for the super insightful Q – it was on point and hopefully I addressed it to a satisfactory degree. Happy to keep talking about it if needed.

Thanks @how for the compliments. :slight_smile: I’m admittedly pretty terrible about having an online presence and connecting with people digitally. Thanks for pointing me to @mayel’s presentation – I am very familiar with CommonsPub since Mayel connected with me a few years ago to evaluate go-fed. I watched that talk and definitely want to check in and reconnect there!

4 Likes