Lemmy: Federation

Created on 5 May 2019  路  16Comments  路  Source: LemmyNet/lemmy

Required items before we can enable ActivityPub in production. This list is probably incomplete, and we will add additional items once we get more familiar with the protocol. Our primary goal is to federate among Lemmy instances. Federation with other implementations (eg Mastodon or Pleroma) will come after that.

  • [ ] Community Federation

    • [ ] Community actors (#369)

    • [ ] View remote communities (!7)

    • [ ] Outbox with list of posts created by the community

    • [ ] Also federate image posts

    • [ ] Federate comments

    • [ ] Inbox where new posts can be submitted

    • [ ] Remote upvoting and downvoting

    • [ ] Front page that includes remote posts

  • [ ] User Federation

    • [ ] User actors (#369)

    • [ ] View remote user profiles

    • [ ] Users can follow remote communities (#150)

    • [ ] Outbox with list of posts created by the user, community is changed to announce (boost) these posts

    • [ ] Federated private messaging

  • [ ] Optimisation

    • [ ] Store data from remote actors in local database (including inbox/outbox url, public key etc)

    • [ ] Store remote posts locally, possibly including images

    • [ ] Fully convert all lemmy db views to activitypub vocab

  • [ ] Security and Error Handling

    • [x] webfinger (#149)

    • [ ] http signatures (explained here) (#415)

    • [ ] Use webfinger to detect Lemmy instances, before calling Lemmy specific APIs

    • [ ] Enforce https for federation when running in production mode

  • [ ] Moderation

    • [ ] Admin page to whitelist instances for federation

    • [ ] Admin/user options to mute/block remote users and instances

    • [ ] Reporting across instances

  • [ ] Testing

    • [x] build a test environment (!7)

    • [ ] integration suite for testing (#147)

This document has an outline with the ActivityPub objects that we will need (but its far from the complete picture).

enhancement federation

Most helpful comment

Federation needs to go to the top of the priority list if it isn't already there. It's the one big blocker standing between Lemmy and actual use in more than a couple of places.

I agree. There are so many nested comment forums or "Reddit alternatives" out there but in the end they ALL suffer the same issue of there being a single point of control, which is what drives many people away from Reddit and other social media in the first place. We absolutely need federation if we're going to have any hope of becoming a social media platform that people actually care about.

All 16 comments

Eagerly awaiting this so I can stand up my Lemmy and join the fediverse!

It won't be for a while yet, still a lot of dev work to do. Also you won't see users in your feed / main page, you'd see posts from federated communities. lemmy is more of a reddit clone, and about communities, rather than a twitter clone like mastodon and pleroma.

edit: eventually lemmy will support federated user follows, but only after federated community follows are fully working.

Is there anything people can do to contribute to federation?

Ya, read through the codebase and this activitypub outline, and start adding the vocabulary and endpoints.

How will communities work?

Maybe a !bang tag compatible group channel solution like found in Hubzilla and Friendica would be a good option?

You mean for autocomplete? Just use #.

Ah, so communities will not be a separate channel to follow, but rather just filtered by # tags? That seems not ideal to be honest. There is an established methode (from the GNU Social days) that in implemented in Friendica and Hubzilla (and an PR exists for Pleroma) to manage it with !bang syntax.

See also this related discussion about adding it to Mastodon:
https://github.com/tootsuite/mastodon/issues/139

Edit see also here: https://github.com/nextcloud/social/issues/427

@dessalines Here is a Rust library for ActivityPub, are you aware of that?

Also, I'm wondering what would be a good first step for implementing activitypub. Maybe implementing the actor for communities, and allowing other activitypub software to follow lemmy communities?

Edit: I guess the other issues with flag "federation" are about how to get started with it. Would be nice if you could add some description there, to make it clear what needs to be done.

Ya I'm using it. The hard thing I'm running into now is trying to get every piece of information jammed into the activitypub vocab.

Here are the 2 actors I picked out, Person IE userand Group IE community.

At first I was gonna get federated community follows working, but then at some point allow subscribing to users, and having user posts show up in your feed, just like mastodon.

Here's the one I have started on for person: https://github.com/dessalines/lemmy/blob/master/server/src/apub.rs

Its my bad I haven't done a big outline of what needs to be done. Here's the best tutorial I could find: https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/

Some things I can think of:

  • [ ] Build a test environment (maybe a multiple docker deploy custom /etc/hosts )
  • [ ] Make a webfinger endpoint for users.
  • [ ] Fully convert all lemmy DB views to activitypub vocab.
  • [ ] Wire up the endpoints for federated actions.
  • [ ] Make sure all the federated user actions are forwarded to their outbox, and fetches are done from their inbox when filling those views.
  • [ ] Create a second type of user to the user table, a federated account.
  • [ ] After this is all working, do the HTTP signature stuff
  • [ ] Get a whitelist / blacklist working.

Federation needs to go to the top of the priority list if it isn't already there. It's the one big blocker standing between Lemmy and actual use in more than a couple of places.

Updated the initial post with a more complete list.

Updated it again, with more details. As you can see, there is a ton of work to do.

Also check out my PR here, which implements some very basic federation and a test setup.

@Nutomic Thx for coming up with this outline btw. Imma start working on some of the community federation stuff within the next few days.

Federation needs to go to the top of the priority list if it isn't already there. It's the one big blocker standing between Lemmy and actual use in more than a couple of places.

I agree. There are so many nested comment forums or "Reddit alternatives" out there but in the end they ALL suffer the same issue of there being a single point of control, which is what drives many people away from Reddit and other social media in the first place. We absolutely need federation if we're going to have any hope of becoming a social media platform that people actually care about.

Closing in favour of #647. @dessalines if you think there is anything important here, please add it to the new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chovy picture chovy  路  5Comments

Nutomic picture Nutomic  路  5Comments

mateMathieu picture mateMathieu  路  6Comments

chovy picture chovy  路  3Comments

NicolasCARPi picture NicolasCARPi  路  5Comments