Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federation #145

Open
dessalines opened this issue May 5, 2019 · 15 comments
Open

Federation #145

dessalines opened this issue May 5, 2019 · 15 comments
Assignees
Milestone

Comments

@dessalines
Copy link
Owner

@dessalines dessalines commented May 5, 2019

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
    • 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
    • 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).

@dessalines dessalines self-assigned this May 5, 2019
@dessalines dessalines added this to the 0.1.0 milestone May 5, 2019
@nelsonblaha

This comment has been minimized.

Copy link

@nelsonblaha nelsonblaha commented Aug 19, 2019

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

@dessalines

This comment has been minimized.

Copy link
Owner Author

@dessalines dessalines commented Aug 19, 2019

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.

@LeosPrograms

This comment has been minimized.

Copy link

@LeosPrograms LeosPrograms commented Oct 7, 2019

Is there anything people can do to contribute to federation?

@dessalines

This comment has been minimized.

Copy link
Owner Author

@dessalines dessalines commented Oct 7, 2019

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

@poVoq

This comment has been minimized.

Copy link

@poVoq poVoq commented Oct 8, 2019

How will communities work?

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

@dessalines

This comment has been minimized.

Copy link
Owner Author

@dessalines dessalines commented Oct 9, 2019

You mean for autocomplete? Just use #.

@poVoq

This comment has been minimized.

Copy link

@poVoq poVoq commented Oct 9, 2019

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:
tootsuite/mastodon#139

Edit see also here: nextcloud/social#427

@Nutomic

This comment has been minimized.

Copy link
Collaborator

@Nutomic Nutomic commented Dec 1, 2019

@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.

@dessalines

This comment has been minimized.

Copy link
Owner Author

@dessalines dessalines commented Dec 2, 2019

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.

@dessalines

This comment has been minimized.

Copy link
Owner Author

@dessalines dessalines commented Dec 2, 2019

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.
@alexbuzzbee

This comment has been minimized.

Copy link

@alexbuzzbee alexbuzzbee commented Dec 23, 2019

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.

@Nutomic

This comment has been minimized.

Copy link
Collaborator

@Nutomic Nutomic commented Dec 25, 2019

Updated the initial post with a more complete list.

@Nutomic

This comment has been minimized.

Copy link
Collaborator

@Nutomic Nutomic commented Dec 29, 2019

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.

@dessalines dessalines pinned this issue Dec 30, 2019
@dessalines

This comment has been minimized.

Copy link
Owner Author

@dessalines dessalines commented Dec 31, 2019

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

@StaticallyTypedRice

This comment has been minimized.

Copy link

@StaticallyTypedRice StaticallyTypedRice commented Dec 31, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.