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

Use ActivityPub for federation #60

Open
drequivalent opened this Issue Mar 28, 2018 · 19 comments

Comments

Projects
None yet
@drequivalent

drequivalent commented Mar 28, 2018

We now have a standard for federated interaction between services, called ActivityPub:
https://www.w3.org/blog/news/archives/6785
https://activitypub.rocks/

We already have Mastodon, Pleroma and PeerTube in our Fediverse. Soon there will also be Aardwolf and several other social interaction engines. It would be cool if you join in.

@mshayden

This comment has been minimized.

mshayden commented Mar 28, 2018

I have been tinkering with the concept of an ActivityPub library or "engine" using Python with Celery (which would play the role Sidekiq does in Mastodon). I should revisit this work and perhaps see if it could be applied here.

@mhall119 mhall119 added this to the 1.0.0 milestone Mar 28, 2018

@mhall119

This comment has been minimized.

Collaborator

mhall119 commented Mar 28, 2018

I would like to get ActivityPub suppoet added, I've been hoping someone would come along who knew how to implement it!

@strypey

This comment has been minimized.

strypey commented May 1, 2018

Are you familiar with SocialHome? They are one of the federated social network apps using the Diaspora protocol, also developed in Python/ Django. Perhaps the developers of SocialHome and GetTogether could collaborate on figuring out what existing Python/ Django code there is for exchanging event data across federated networks using standardized protocols?

Both Friendi.ca and Hubzilla have events calendar features, and since they're close cousins, I'm guessing they've at least done some scoping work on federated exchange of events data across apps that could shine some light on possible solutions. NextCloud and ownCloud also have events calendars, and I believe the former (and possibly the latter) is implementing ActivityPub internally for federation between its own instances, so it might be worth talking to them as well.

Finally, Upcoming.org is another events site using a free code engine, and while I don't know if they have any interest in federation, it could be worth reaching out to them too.

@jaywink

This comment has been minimized.

jaywink commented May 1, 2018

Thanks @strypey for the ping, GetTogether looks awesome, will be keeping a look.

Regarding federation. I really recommend going with ActivityPub. It has good support for events in the standard vocab and supports extensions where support runs out and has recently picked up steam with many projects either implemented or planning to implement. It's the first federation protocol for the social web that is starting to feel like a standard, even though it's still early days.

For Socialhome (which has events planned in a more Facebook kind of way), ActivityPub support will arrive via my federation library, which currently supports Diaspora protocol. The idea is to have a library that supports multiple protocols over one unified API, so it's a bit opinionated, not a direct 1-1 mapping of the protocol. If interested to have a look, and maybe even collaborate, it's here. I plan to work on activitypub for the library within the spring / early summer, by current timetable.

@mhall119

This comment has been minimized.

Collaborator

mhall119 commented Jun 14, 2018

Initial ActivityPub work is live here: https://gettogether.community/activity_pub/events.json

@mhall119

This comment has been minimized.

Collaborator

mhall119 commented Jun 24, 2018

Can somebody please comment with what more needs to be done before closing this issue?

@craigmaloney

This comment has been minimized.

Contributor

craigmaloney commented Jun 24, 2018

I'm not sure how to use this in the context of other sites. It only seems to be a large feed of all of the events, not something where each team / location can broadcast what's going in there.

@zcdunn

This comment has been minimized.

zcdunn commented Jun 26, 2018

@mhall119 you'll need to implement webfinger so other fediverse implementations can look up Actors (Person, Group, etc). It's not technically part of the spec, but most implementations require it.

When a user/team creates a new event, you'll need to put an Event object in the Actor's outbox, wrapped in a Create Activity.

@DeadSuperHero

This comment has been minimized.

DeadSuperHero commented Jun 26, 2018

It probably also wouldn't hurt to test against other ActivityPub players in the space. The main ones of importance with working implementations are:

Basically none of those support an Event activity specifically, but it should be possible to generate some kind of fallback note activity that each of these things can see.

@polymerwitch

This comment has been minimized.

polymerwitch commented Jul 2, 2018

@mhall119 would you mind if I took a stab at this? I'm not a "federation expert" but I think I can work this out given a bit of time. With a milestone of 1.0.0 I imagine I can get it done with lots of time for review.

@mhall119

This comment has been minimized.

Collaborator

mhall119 commented Jul 2, 2018

Go for it!
The two relevant specs are ActivityPub and ActivityStreams

@mhall119

This comment has been minimized.

Collaborator

mhall119 commented Jul 2, 2018

There is some preliminary ActivityPub seriaizers in ./events/activity_pub/ that should serve as a starting point

@polymerwitch

This comment has been minimized.

polymerwitch commented Jul 2, 2018

OK, here is what I'm thinking for a 1.0.0 implementation. We'll probably want more levels of visibility for actions in a later update:

Actors:
  - User
    Inbox/Outbox stream of actions
    Actions:
      - Follow event
      - Star/like event
      - Comment on event
      - Reply to comment on event
      - React to comment on event
      - Invite to event
      - Accept invite
      - Tentative Accept invite (Maybe)
      - Reject invite
      - Update for all of the above
      - Remove for all of the above
      - Block User
  - Event
    Inbox/Outbox stream of actions
    Actions:
      - Announce all user actions taken on event
  - Team
    Inbox/Outbox stream of actions
    Actions:
      - Announce all user actions taken in team
  - Org
    Inbox/Outbox stream of actions
    Actions:
      - Announce all user actions taken in org
  - Place
    Inbox/Outbox stream of actions
    Actions:
      - Announce all user actions taken in place

In effect, this would mean searchable endpoints for Events, Teams, Orgs, and Places. Each would have their own feed. Users can socially share events through comments, likes, and federated invites.

This will necessitate a few Model Changes as at least the current Attendee model will need to be decoupled from local users.

TODO:

  • Implement Webfinger for all actors
  • Create Inbox/Outbox mechanism for all actors
  • JSON-LD document for all actors
  • Implement actions
  • Test suite for ActivityPub implementation
  • Test suite for federation with major fediverse players
@jaywink

This comment has been minimized.

jaywink commented Jul 2, 2018

@polymerwitch if you hit stumbling blocks, the best place to ask advice is the W3C #social IRC chatroom, see here for details. Good stuff 👍

@mayel

This comment has been minimized.

mayel commented Jul 31, 2018

Thought this Python ActivityPub library might come in handy: https://github.com/dsblank/activitypub

@dsblank

This comment has been minimized.

dsblank commented Aug 2, 2018

It would be great if we could combine common functionality into a core library. I'm just now starting to work on packaging up the AP+database logic. If I can help make this activitypub library useful for GetTogether, I'd love to. Help and suggestions welcome!

@mhall119 mhall119 modified the milestones: 1.0.0, 2.0.0 Sep 8, 2018

@DeadSuperHero

This comment has been minimized.

DeadSuperHero commented Sep 27, 2018

Hey, are there any updates on this? I really like the concept of GetTogether, and think adding ActivityPub support could make it a welcome addition to the fediverse!

@360fun

This comment has been minimized.

360fun commented Oct 11, 2018

It would be great if we could combine common functionality into a core library. I'm just now starting to work on packaging up the AP+database logic. If I can help make this activitypub library useful for GetTogether, I'd love to. Help and suggestions welcome!

This would be great! :D I'm helping Human Connection team to implement ActivityPub in their future events/meetup feature! ;)

@AltNico

This comment has been minimized.

AltNico commented Oct 23, 2018

@dsblank

It would be great if we could combine common functionality into a core library. I'm just now starting to work on packaging up the AP+database logic.

It's great to hear that you are moving forward on this topic. I don't know if you've heard it yet, F-Droid also considers using ActivityPub for integrating repositories into the fediverse. I even featured your library and this discussion in our forum topic we have where we discuss on how to do that the best way. To recap the discussions, there were opinions about federating directly with libraries like yours, but towards the end it tended more to using existing platforms like Mastodon or Pleroma for not having to think about implementing the ActivityPub standard. Now I'm curious what you as the developer say about the state of the software, is it already usable for usage in GetTogether or F-Droid?

So beside GetTogether, we from F-Droid would also highly appreciate sharing that core library of ActivityPub related stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment