ActivityPub 支持:第一阶段 RFC

Continuing from Federation support for Discourse - #21 by rishabh, Tools to "aggregate" many Discourse forums? - #27 by Falco and ActivityPub Implementation for Discourse

Why?

A common problem that many Discourse users face is the inability to show an aggregation of all the interest groups that they are subscribed to. There’s no easy way to consume content from multiple Discourse instances in the form of a central and social user feed. Centralised platforms like Reddit get around this by having a single login for all communities and an aggregate feed of all the communities shown in a single stream on the reddit.com landing page. This latter feature is what we’d like to replicate in Discourse by means of the ActivityPub protocol.

For example, Person A frequents multiple Discourse instances: one for politics, two for hobbies, one for their local neighborhood forum but has no way to consume all relevant content in one single feed. In comparison, if you have joined multiple Facebook groups or Reddit subs, the most relevant posts already show up in your feed.

Spec (v1)

We could prototype an MVP by enabling the following features through a Discourse plugin:

  1. Generate an ActivityPub feed on demand (for every page that already has an RSS feed)

    • Similar to adding .rss to the url, this will allow the fetching of content using the AP protocol on requesting the right endpoint.

    • We may even be able to enable this for private content by appending user api keys to the url.

  1. Let forum admins enable ActivityPub (outgoing) on a per-category basis or keep it default-on?
    (I believe @Falco had some thoughts here)

  2. Figure out a way to consume this content on a Discourse forum / Mastodon feed (incoming)

Next Steps

We definitely need to start small so at first, we need to decide on a small, feasible set of features that will go into the first iteration. I’ve been going through the ActivityPub protocol but I’m not too familiar with the inner workings of it yet. Therefore, I’m inviting others who have shown a lot of interest in this to the discussion (@Falco, @hellekin, @merefield) to help us build a feasible spec for the first iteration and recommend changes for the spec above.

Resources

39 个赞

Here are a couple of highlights from the older topics :arrow_down:

Agreed, I think this is exactly how @Falco proposed that v1 could work.

6 个赞

Excellent initiative, thanks.

I would start by saying: shouldn’t we focus on the what not the how, initially? Tech arch comes later? The reason I say that is it might limit the functionality if chosen too early?

I would love to see for Version 1. a ‘Discovery of Discovery’ lists, starting with:

  • ‘Latest’ list which showed a preview of each recent topic from the included sources (simple union of Latest from all sources)
  • ‘Watched’ list, which showed a preview of each Topic that has activity you have selected to be notified about. (this takes its precedent from the existing mobile app - its exploding the notifications of new activity on watched Topics to the underlying Topic previews themselves).
9 个赞

Thank you for starting this!

I must say the original proposal involving Facebook analogy gets past my understanding: I have no clue what Facebook does, and I do not understand how it relates to Discourse in any way.

My understanding of ActivityPub support for Discourse would be that it can help federate topics, or even share a category among Discourse instances. For example, one announcement topic on discourse.joinmastodon.org could be federated to socialhub.activitypub.rocks in the related #software:mastodon category: there, local users could like, reply, quote, etc., as if it were a local topic, except the original topic would live on joinmastodon’s instance.

Another aspect of it is that if one has an account on both instances, there should be a way to link these accounts together, i.e., to use one specific Discourse instance as the main identity provider. I understand that this is not the focus of a first iteration, but it’s good to keep in mind, since we could end up having “sign in with [put your favorite ActivityPub implementation here]”.

What I understand from the proposals above is a replication of the Discourse app on Android, where you have a list of instances, and get notifications from all of them. It seems a bit dangerous to interleave unrelated responses from many sources, especially as they lose context.

Did I understand correctly, and would my understanding make a good second step for your vision of integrating ActivityPub with Discourse?

5 个赞

All the current ActivityPub implementations expect posts to be published by stable Actors, so you might need one of the following:

  • A system account that publishes all posts
  • One account per followable feed
  • One account per followable feed, which makes Announces of posts that are putatively authored by an account per Discourse user

The first is likely easiest to implement; the third does the best job of meshing the data models.

There’s also the choice of if we want to publish full topic content, topic first-posts only, or something like the StackExchange twitter feeds where distinct posts are made promoting posts from the /top page. Or that could just be how the “top posts” feed works, and the other feeds publish everything…

On a technical level, the URL should not need to change: all servers will send Accept: application/activity+json or its alternates.


A reader application that mixes feeds from different sources at different times in ActivityPub - recreating the “algorithmic timeline” as an opt-in thing - is something I’ve been wanting for a while, and doesn’t seem to be existent today.


@hellekin: I think that cross-domain authoring has a high chance of fatally circumventing a lot of the anti-spam protections that Discourse has. Reading is more important to implement: after all, Reading is Fundamental!

11 个赞

I don’t think so: remote users could still be staged, unless they link their remote account to a local one in which case antispam would apply to that account.

I only had a short look at the comments, I must confess. I would suggest that every category would be an own actor (with the type “Group”). Then people from outside can simply subscribe to specific categories. Posts in these categories can the be realized with having the “Group” account announced the user posts. So we do have both the category and the author. This is the way we are doing it with our own software. When using JSON-LD signatures, this would be safe for non public categories as well.

Question is what to do with comments from outside. I would suggest that the group accounts are defined as “manually-approve”. Then one could add some validation process to avoid random spam. These validated accounts should then be able to comment on these posts.

This would instantaneously allow people from (nearly) the whole fediverse to connect and interact with discourse systems.

7 个赞

I agree with @heluecht’s suggestion.

Additionally, I think it would be great that:

  1. Every category Group actor can have an owner who has power to manage the category: control posting permissions, ban or remove users, set visibility (public or private)…
  2. Local users would create categories on their instance, as long as the instance staff approve their category creations.
  3. If a category owner doesn’t fit their position, the site staff can change them.

That’s the way many centralized forums and communities work. What to improve is making it federating.

Nevertheless, there are still problems:

  1. Should actor ids be mutable? Discourse usernames can be set to modifiable in the site settings. However, I doubt whether other AP software can handle this. Is Object's `id` immutable? - ActivityPub - SocialHub
    (More to be mentioned)
5 个赞

Discourse 团队的成员下周会参加 OFFDEM 的 SocialHub 吗?这将是一个与活动实施者见面和交流的绝佳机会。

7 个赞

据我所知没有,不过谢谢你的询问!

5 个赞

一些快速参考点:
Friendica 和 Hubzilla 可以RSS 源 转换为兼容 ActivityPub/Diaspora*/OStatus 的联邦账户。

另请参阅这个 WordPress 插件,它可将帖子转换为 ActivityPub 帖子。

10 个赞

还有一些参考点:

5 个赞

恭喜获得欧盟资金!

有路线图吗?

Discourse 团队有人参加 ActivityPub 大会吗?
这将是与其他 AP 实现者见面交流的绝佳机会。
https://conf.activitypub.rocks

5 个赞

我认为由于多种原因,此事实际上并未推进——那仅仅是一个 RFC 提案。

1 个赞

希望我们能在下周日 APConf2020 的“同类相聚”环节中讨论 Discourse 中 ActivityPub 的实现。相关专题已在 SocialHub 发布:

@rishabh,如果你周日无法到场,至少能在该专题中参与讨论就太好了。我们目前还不确定具体时间点,但活动将在周日早上举行。一旦确认,我会更新此帖。

7 个赞

@hellekin

抱歉我没赶上。我想告知你,我们并没有申请 NGI0 资助,目前也没有人在负责这项工作。此外,由于我对该协议不太熟悉,我可能不是推动此事的最佳人选。不过,我会联系一下 @Falco,看看他是否有相关想法或兴趣来推进这项工作。

4 个赞

嗯,当时你们团队的一位成员确实提交了申请——尽管他现在已经不在团队中了,而且你们也被选中了——所以肯定有人批准了此事。因此,我不太清楚你所说的“我们”具体指谁。:slight_smile: 无论如何,我很期待与 @Falco 讨论此事。某种程度的 AP 支持将对 ActivityPub 社区非常有帮助,尤其是因为它能促进跨 Discourse 实例的协作,并更好地与 Fediverse 集成。

我确实关注反垃圾信息的问题,但我觉得可以通过将 Fediverse 用户视为“暂存”用户(类似于未注册邮箱的用户)来缓解这一问题,直到他们实际注册本地账户为止。

5 个赞

当然,能看到这一点确实很棒。

是的,我们过去确实申请过这笔资金,但今年早些时候我们与 NLnet 团队沟通后决定终止该项目,以便释放原本为我们预留的资金。即使当时我们已被选中,与 NGI0 的合作也暂时取消了。当然,我们未来可以自由提交新的提案。

我突然想到,@riking 可能也会感兴趣 :slight_smile:

1 个赞

有意思。

本项目通过 NGI0 Discovery Fund 获得资助,该基金由 NLnet 设立,并得到欧盟委员会“下一代互联网”(Next Generation Internet)计划的财政支持,由通信网络、内容与总司(DG Communications Networks, Content and Technology)监管,资助协议编号为 825322。

所以:他们说的是另一个

1 个赞

哦,我不知道还有这个页面。我会给我们的 NLnet 联系人写一封邮件,提醒他们(以防他们忘了删除它),并在这里发布一个更新。

编辑:更改已在 NLnet; Discourse ActivityPub 上线。

1 个赞