Use ActivityPub for federation #60

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

Comments

Projects
None yet
9 participants
@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.

Show comment
Hide comment
@mshayden

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

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.

Show comment
Hide comment
@mhall119

mhall119 Mar 28, 2018

Collaborator

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

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 strypey referenced this issue in jaywink/socialhome May 1, 2018

Open

Support Events #320

@strypey

This comment has been minimized.

Show comment
Hide comment
@strypey

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

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.

Show comment
Hide comment
@jaywink

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

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.

Show comment
Hide comment
@mhall119

mhall119 Jun 14, 2018

Collaborator

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

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.

Show comment
Hide comment
@mhall119

mhall119 Jun 24, 2018

Collaborator

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

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.

Show comment
Hide comment
@craigmaloney

craigmaloney Jun 24, 2018

Contributor

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.

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.

Show comment
Hide comment
@zcdunn

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

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.

Show comment
Hide comment
@DeadSuperHero

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

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.

Show comment
Hide comment
@polymerwitch

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

Show comment
Hide comment
@mhall119

mhall119 Jul 2, 2018

Collaborator

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

Collaborator

mhall119 commented Jul 2, 2018

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

@mhall119

This comment has been minimized.

Show comment
Hide comment
@mhall119

mhall119 Jul 2, 2018

Collaborator

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

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.

Show comment
Hide comment
@polymerwitch

polymerwitch 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

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.

Show comment
Hide comment
@jaywink

jaywink 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 👍

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 👍

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