I think the #ActivityPub client-to-server API is extremely important and underrated. I’m glad to see the SWF and W3C group prioritizing it, because I think it has the potential to fix something that’s kind of broken on the #Fediverse: too many accounts, on too many platforms that really ought to be clients.

Here’s the rub, though: you need the big players in the space to support it. Mastodon needs to support it. Pixelfed and PeerTube need to support it.

So, how do you get the big existing projects to all implement it? How do you justify it?

Would love to hear what @evan thinks about this.

@deadsuperhero

I am heart to heart with you on this, friend.

@deadsuperhero so, here's my best bet. I can be wrong!

1. Get some servers to implement the API well.
2. Get some must-have clients that run on those servers. This shows the value of the API.
3. Our leading servers shift to supporting it.

That may work; I don't know. It's my best bet right now!

I want to note that WordPress is working on the API!

@evan Yeah, I mostly agree with this. It’s just that the buy-in is a little bit of a chicken and egg problem. You need servers to adopt it, but you need a compelling first mover. Bonfire, maybe?

The spec definitely needs love, too. I think one of the harder things is building a timeline out of inbox activities. I feel like maybe a future version of the API could specify timelines somehow, whether it’s an endpoint or some kind of basic query? Maybe there’s even a way to implement alternative timelines at that level?

These are all just guesses on my part, but I feel like this could be a gateway to universal custom feeds.

Does the inbox have to map to a timeline, specifically? Mastodon called this out as being difficult to do because you would have to real-time parse the inbox every time you wanted to load the timeline.

Of course one could always reduce the inbox into a single timeline and serve that instead, but then we're braching out with our own proprietary APIs again.

Is that ok?

@[email protected] @[email protected]

@julian @general @evan Again, this is sort of why I’m advocating for supporting timelines as a concept in the ActivityPub API. Instead of repeatedly parsing the inbox, we could do exactly what you’re saying with some kind of representation of a timeline. Even if it’s just plain old algorithmic time-sort.

On the other hand, however... If the ActivityPub API were used in an S2S context, enabling something like NodeBB to send activities on behalf of a Mastodon user, then it wouldn't matter that there is no GET /timeline, because all you need is POST /outbox and the Mastodon API handles their end.

Vice versa, NodeBB would use its own API to render a /world feed.

@[email protected] @[email protected]

@julian @deadsuperhero @evan

Can't help but wonder about terminology use and abstractions they indicate. Nowhere in the specs is there mention of 'timeline' and neither of 'feed' (except as example use in AS).

I feel we started with powerful specs to be able to model *any* social networking use case. But where the specs had blanks gradually the impls filled these in with leaky abstractions such that fedi is now hammered into a very narrow social media microblogging domain.

If an app needs "Timeline" and "Feed" concepts, then it should model them. Given the actor-based nature of AP they might be actors, or whatever is best. These concept are about solution development, i.e. what is built on top of the protocol, and not indicative of core protocol capabilities.

There's so much confusion on "where does the protocol end vs. where does my app design start".

SDK's should offer "Addressable actors exchanging msgs with object payload", and hide all impl details for the solution developer.

ActivityPub

The ActivityPub protocol is a decentralized social networking protocol based upon the [ActivityStreams] 2.0 data format. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and content.

@evan @julian @deadsuperhero

Except when they are called other names instead ;p

A timeline is a different thing than a collection imho. And an AS collection has some very particular functionality, which if I model a timeline in my app may not supported (e.g. reverse ordering).

Collection / 'timeline' is one of those words where sometimes they indicate an app domain, and sometimes a core protocol mechanism. Same is true with 'follow' which is sometimes a user action, sometimes indicates low-level publish/subscribe.

For core capabilities that must be part of the specs, in 'protocol space' it may be better to use terminology that is more common in messaging architectures and all the various architecture patterns that are involved. Perhaps idk we deal with a time-ordered event log or something like that.

@smallcircles @evan An AS2 Collection cannot be a timeline (in general). It’s not even ordered. An AS2 OrderedCollection (a subtype of Collection) might be ordered by time or not, so it’s also not a timeline (in general). When they are ordered by some time value (unspecified in AP) they are often called “streams” in the spec. The Mastodon content timelines are not the same as AP activity streams although a filtered AP stream can be transformed to a content timeline.

@smallcircles To follow up on the discussion from yesterday, @evan has created a proposal for another kind of “event stream” that is not necessarily associated with *any* AP collection type (see Example 1). This is more aligned with my mental model of an event feed/stream, where a timeline^1 is the history of the feed after optional filtering and content materialization. (^1 However, the terms are often used interchangeably in the Fedi.)

https://swicg.github.io/activitypub-api/sse

Server-Sent Events For the ActivityPub API

@steve @evan

Oh, that is very interesting. I will queue this up for inclusion in the delightful fediverse development curated list.

#Datastar may be a great library to check out here, and goes further in #hypermedia approach, where #HTMX considers itself feature-complete. Datastar uses #SSE to keep the connection to the client open. The client-side JS lib that is needed is super small. In datastar apps most of the business logic lives in the backend, and it lends itself very well for #EventSourcing. The original author/co-maintainer uses it with #NATS which also serves as the event store.

https://data-star.dev

Datastar

The hypermedia framework.

Datastar
Death to the spinner: event sourcing for reactive web apps

PyVideo.org

@steve @evan

Note that there is an accompanying issue in the #ActivityPub API repository, where I transferred my reply to in the following comment:

https://github.com/swicg/activitypub-api/issues/9#issuecomment-3938841868

I also added a very nice demonstration that is interesting for the #Mastodon folks, as it is using #Ruby in the event-sourced set up.

https://github.com/ismasan/sourced_todo

Push delivery · Issue #9 · swicg/activitypub-api

"As an ActivityPub user, I want data pushed from the server to my client device, so I don't have to reload a collection just to see if there's anything new."

GitHub