ActivityPub サポート:フェーズ 1 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

Anyone from Discourse team coming to the SocialHub at OFFDEM next week? It would be a great moment to meet and match with other AP implementors.

「いいね!」 7

Not to my knowledge, but thanks for asking!

「いいね!」 5

いくつかの参考情報:
Friendica と Hubzilla は、RSS フィードを ActivityPub/Diaspora*/OStatus 互換のフェデレーションアカウントに変換することができます。

また、投稿を ActivityPub 投稿に変換する WordPress プラグインもご覧ください。

「いいね!」 10

いくつかの参考点があります。

  • Feneas ActivityPub ウォッチリスト では、Mastodon の他に、参考になる可能性がある Ruby で実装された 3 つのプロジェクトがあります。
  • @heluecht@misaka4e21 は、Group アクターのサポートについて言及しました。SocialHub では、これをより標準化された方法で実装するための 進行中の議論 があります。
「いいね!」 5

EUの資金獲得おめでとうございます!

ロードマップはありますか?

DiscourseチームからActivityPubカンファレンスに来る人はいますか?
他のAP実装者と会い、交流する絶好の機会になるでしょう。
https://conf.activitypub.rocks

「いいね!」 5

さまざまな理由により、これは実際には進展しませんでした。それは単に RFC 提案でした。

「いいね!」 1

来週の日曜日、APConf2020 の Birds of a Feather セッションで、Discourse における ActivityPub の実装について議論できることを願っています。SocialHub の専用トピックをご覧ください:

@rishabh 日曜日に参加できなくても、少なくともトピックに同席していただけると嬉しいです。正確な時間はまだ分かりませんが、日曜日の午前中です。分かった時点でこの投稿を更新します。

「いいね!」 7

こんにちは @hellekin さん、

参加できず申し訳ありません。NGI0 の資金調達申請は行っておらず、現在この件に取り組んでいる方もいないことをお伝えします。また、私はこのプロトコルに詳しくないため、このプロジェクトを主導する最適な人物ではありませんが、@Falco さんに連絡を取って、ご意見やご関心があるかどうかを確認させていただきます。

「いいね!」 4

ええと、その当時はチームのメンバーの一人が申請しました。たとえ現在は参加していなくても、選出されました。つまり、誰かが承認したはずです。「私たち」というのは誰を指しているのか分かりません。:slight_smile: とにかく、@Falco と議論できることを楽しみにしています。何らかの AP サポートは ActivityPub コミュニティにとって非常に有益でしょう。特に、Discourse インスタンス間での連携を容易にし、Fediverse との統合をよりスムーズにする点で重要です。

スパム対策の問題は認識していますが、ローカルアカウントを登録するまで、未登録のメールユーザーのように「ステージング」された Fediverse ユーザーとして扱うことで緩和できると思います。

「いいね!」 5

もちろん、それが実現するのはとても喜ばしいことです。

はい、私たちは過去に資金提供を申請しましたが、今年初めに NLnet チームと協議し、プロジェクトを終了し、私たち向けに確保されていた資金を解放することにしました。当時選ばれていたとしても、NGI0 との協力は現時点ではキャンセルされています。もちろん、将来改めて提案を出すことは自由です。

思い出しましたが、@riking も興味を持っているかもしれませんね :slight_smile:

「いいね!」 1

興味深いですね。

このプロジェクトは、欧州委員会の次世代インターネットプログラム(DG コミュニケーションネットワーク、コンテンツ、技術局の管轄下)の助成契約番号 825322 に基づき、NLnet によって設立された NGI0 Discovery Fund を通じて資金提供されました。

つまり、これは別の「Discourse」について話しているのでしょうか?
「プロジェクトの公式サイト: https://discourse.org」があるため、単に確認のためにお尋ねしています。

「いいね!」 1

ああ、そのページが存在しているとは知りませんでした。NLnet の担当者にメールを送り、削除し忘れているかもしれないので促し、ここで更新を投稿します。

編集:変更は NLnet; Discourse ActivityPub に反映されています。

「いいね!」 1