Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Uncategorized
  3. I think the #ActivityPub client-to-server API is extremely important and underrated.

I think the #ActivityPub client-to-server API is extremely important and underrated.

Scheduled Pinned Locked Moved Uncategorized
activitypubfediverse
109 Posts 11 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • julianJ julian

    @smallcircles@social.coop I feel personally called out for this 😛

    cc @evan@cosocial.ca

    🫧 socialcoding..S This user is from outside of this forum
    🫧 socialcoding..S This user is from outside of this forum
    🫧 socialcoding..
    wrote last edited by
    #17

    @julian @evan

    No need to, I didn't call you out 🙂

    I think the fediverse-we-have has become a very different one than the fediverse-promised based on the initial specs when there weren't implementations and an installed base making numerous design decisions in a very ad-hoc pragmatic fashion. Which is in itself fine, and a very good approach to get an ecosystem off the ground. But having the app-centric, app-first evolution be the primary evolution process, brought us to a different space than the ubiquitous, heterogeneous social networking environment we might all be working in, focused on exciting solution designs and less in all the plumbing and impl details.

    No one is really to blame I guess. This is where laissez-faire in grassroots environments leads us, following the social dynamics that exist.

    We can do better, but it is very hard in our individualist, FOSS-project-oriented herding of cats chaotic environment. The challenges are social in nature..

    https://discuss.coding.social/t/major-challenges-for-the-fediverse/67

    🫧 socialcoding..S 1 Reply Last reply
    0
    • Evan ProdromouE Evan Prodromou

      @julian

      I haven't seen anyone use Add and Remove activities to notify updates to the `outbox`. I don't think it would work; it's too recursive.

      I've done it for other feeds, like `replies` or `followers`, and it works pretty well.

      @smallcircles

      Julian FietkauJ This user is from outside of this forum
      Julian FietkauJ This user is from outside of this forum
      Julian Fietkau
      wrote last edited by
      #18

      @evan @julian@activitypub.space @smallcircles Mind if I butt in here with a question about management of the `replies` collection? I'm looking at this for the interaction controls FEP draft.

      GoToSocial currently broadcasts an `Accept(Note)` to let followers know a reply has been accepted (see https://docs.gotosocial.org/en/latest/federation/interaction_controls/#broadcasting-accepts-for-the-benefit-of-third-servers). We'd want to add an inverse for revocation, which would be `Undo(Accept(Note))` imo.

      I feel `Add` and `Remove` on the `replies` collection may be more idiomatic and, in a sense, easier. Opinions?

      Evan ProdromouE 1 Reply Last reply
      2
      0
      • Julian FietkauJ Julian Fietkau

        @evan @julian@activitypub.space @smallcircles Mind if I butt in here with a question about management of the `replies` collection? I'm looking at this for the interaction controls FEP draft.

        GoToSocial currently broadcasts an `Accept(Note)` to let followers know a reply has been accepted (see https://docs.gotosocial.org/en/latest/federation/interaction_controls/#broadcasting-accepts-for-the-benefit-of-third-servers). We'd want to add an inverse for revocation, which would be `Undo(Accept(Note))` imo.

        I feel `Add` and `Remove` on the `replies` collection may be more idiomatic and, in a sense, easier. Opinions?

        Evan ProdromouE This user is from outside of this forum
        Evan ProdromouE This user is from outside of this forum
        Evan Prodromou
        wrote last edited by
        #19

        @julian@fietkau.social @julian@activitypub.space @smallcircles I like Accept and Reject but @trwnh is pretty insistent on Add and Remove so I defer to them.

        infinite love â´³T 1 Reply Last reply
        0
        • 🫧 socialcoding..S 🫧 socialcoding..

          @julian @evan

          No need to, I didn't call you out 🙂

          I think the fediverse-we-have has become a very different one than the fediverse-promised based on the initial specs when there weren't implementations and an installed base making numerous design decisions in a very ad-hoc pragmatic fashion. Which is in itself fine, and a very good approach to get an ecosystem off the ground. But having the app-centric, app-first evolution be the primary evolution process, brought us to a different space than the ubiquitous, heterogeneous social networking environment we might all be working in, focused on exciting solution designs and less in all the plumbing and impl details.

          No one is really to blame I guess. This is where laissez-faire in grassroots environments leads us, following the social dynamics that exist.

          We can do better, but it is very hard in our individualist, FOSS-project-oriented herding of cats chaotic environment. The challenges are social in nature..

          https://discuss.coding.social/t/major-challenges-for-the-fediverse/67

          🫧 socialcoding..S This user is from outside of this forum
          🫧 socialcoding..S This user is from outside of this forum
          🫧 socialcoding..
          wrote last edited by
          #20

          @julian @evan

          Btw, some time ago in a matrix discussion I sketched how I'd like to conceptually 'see' the social network. Not Mastodon-compliant per se (though it might be via a Profile or Bridge) but back to "promised land". Where the protocol is expressed in familiar architecture patterns and borrows concepts from message queuing, actor model, event-driven architecture, etc.

          Then as a "Solution designer" I am a stakeholder that wants to be completely shielded from all that jazz. That should all be encapsulated by the protocol libraries and SDK's that are offered in language variants across the ecosystem. #ActivityPub et al is a black box. I can directly start modeling what should be exchanged on the bus, and I can apply domain driven design here. And if I have a semantic web part of my app I'd use linked data modeling best-practices.

          I would have power tools like #EventCatalog and methods like #EventModeling.

          https://www.eventcatalog.dev/features/visualization

          https://eventmodeling.org/

          1 Reply Last reply
          1
          0
          • Evan ProdromouE Evan Prodromou

            @julian@fietkau.social @julian@activitypub.space @smallcircles I like Accept and Reject but @trwnh is pretty insistent on Add and Remove so I defer to them.

            infinite love â´³T This user is from outside of this forum
            infinite love â´³T This user is from outside of this forum
            infinite love â´³
            wrote last edited by
            #21

            @evan @julian@fietkau.social @julian@activitypub.space @smallcircles personally i think three things happen generally, which could each be described by their own activity in succession:

            1) the original Activity is posted.
            2) you can Accept or Reject the Activity.
            3) as a result, you can Add or Remove the Activity to the corresponding AP collection.

            this holds for Like and Announce 1:1. Follow we currently Add the Follow.object instead, but i think we ought to store the actual Follow activity in a follows collection.

            infinite love â´³T 1 Reply Last reply
            2
            0
            • infinite love â´³T infinite love â´³

              @evan @julian@fietkau.social @julian@activitypub.space @smallcircles personally i think three things happen generally, which could each be described by their own activity in succession:

              1) the original Activity is posted.
              2) you can Accept or Reject the Activity.
              3) as a result, you can Add or Remove the Activity to the corresponding AP collection.

              this holds for Like and Announce 1:1. Follow we currently Add the Follow.object instead, but i think we ought to store the actual Follow activity in a follows collection.

              infinite love â´³T This user is from outside of this forum
              infinite love â´³T This user is from outside of this forum
              infinite love â´³
              wrote last edited by
              #22

              @evan @julian@fietkau.social @julian@activitypub.space @smallcircles of course follows are a bit more stateful and complex, so it can be argued that we should actually allow for richer subscription management, similar to when you open a dashboard and manage which email notifications you want to receive. the subscription could be reified as a Follow activity, but the side effects and semantics are not exactly the same with what's in AP right now. (AP doesn't have a way to remove a follower; masto uses Reject without Undo Accept)

              infinite love â´³T 1 Reply Last reply
              2
              0
              • infinite love â´³T infinite love â´³

                @evan @julian@fietkau.social @julian@activitypub.space @smallcircles of course follows are a bit more stateful and complex, so it can be argued that we should actually allow for richer subscription management, similar to when you open a dashboard and manage which email notifications you want to receive. the subscription could be reified as a Follow activity, but the side effects and semantics are not exactly the same with what's in AP right now. (AP doesn't have a way to remove a follower; masto uses Reject without Undo Accept)

                infinite love â´³T This user is from outside of this forum
                infinite love â´³T This user is from outside of this forum
                infinite love â´³
                wrote last edited by
                #23

                @evan @julian@fietkau.social @julian@activitypub.space @smallcircles and then there are replies, which in fedi currently require deep introspection of a Create.object.inReplyTo, which is information that may not be immediately available to you. so it leads to the unfortunately complicated situation where you don't actually know when you received a reply, because there is no Reply activity to be used as a notification -- you have the side effect without the activity.

                infinite love â´³T 1 Reply Last reply
                0
                • infinite love â´³T infinite love â´³

                  @evan @julian@fietkau.social @julian@activitypub.space @smallcircles and then there are replies, which in fedi currently require deep introspection of a Create.object.inReplyTo, which is information that may not be immediately available to you. so it leads to the unfortunately complicated situation where you don't actually know when you received a reply, because there is no Reply activity to be used as a notification -- you have the side effect without the activity.

                  infinite love â´³T This user is from outside of this forum
                  infinite love â´³T This user is from outside of this forum
                  infinite love â´³
                  wrote last edited by
                  #24

                  @evan @julian@fietkau.social @julian@activitypub.space @smallcircles re: the Undo Accept thing vs Reject thing, using a Reject is prone to issues with out-of-order deliveries. if you send a Follow and get back an Accept and a Reject with the same published datetime, then are you currently a follower? what if the Reject came first but then you receive a later Accept? it makes it incredibly hard to reason about the distributed state machine, and leads to terrible desyncs when one side thinks you follow them and the other doesn't.

                  infinite love â´³T 1 Reply Last reply
                  0
                  • infinite love â´³T infinite love â´³

                    @evan @julian@fietkau.social @julian@activitypub.space @smallcircles re: the Undo Accept thing vs Reject thing, using a Reject is prone to issues with out-of-order deliveries. if you send a Follow and get back an Accept and a Reject with the same published datetime, then are you currently a follower? what if the Reject came first but then you receive a later Accept? it makes it incredibly hard to reason about the distributed state machine, and leads to terrible desyncs when one side thinks you follow them and the other doesn't.

                    infinite love â´³T This user is from outside of this forum
                    infinite love â´³T This user is from outside of this forum
                    infinite love â´³
                    wrote last edited by
                    #25

                    @evan @julian@fietkau.social @julian@activitypub.space @smallcircles i think there needs to be a way to get a consistent event log in-order from the canonical/authoritative source. failing that, though, the least you could do is have your activities refer to each other in an obvious way. Undo(Accept(Follow)) lets you reverse-reconstruct what happened because all 3 activities are right there (hopefully fetchable!). so maybe Undo(Add) makes more sense than Remove; perhaps we say that the Remove is the result of the Undo?

                    infinite love â´³T 1 Reply Last reply
                    0
                    • infinite love â´³T infinite love â´³

                      @evan @julian@fietkau.social @julian@activitypub.space @smallcircles i think there needs to be a way to get a consistent event log in-order from the canonical/authoritative source. failing that, though, the least you could do is have your activities refer to each other in an obvious way. Undo(Accept(Follow)) lets you reverse-reconstruct what happened because all 3 activities are right there (hopefully fetchable!). so maybe Undo(Add) makes more sense than Remove; perhaps we say that the Remove is the result of the Undo?

                      infinite love â´³T This user is from outside of this forum
                      infinite love â´³T This user is from outside of this forum
                      infinite love â´³
                      wrote last edited by
                      #26

                      @evan @julian@fietkau.social @julian@activitypub.space @smallcircles i guess you could hack it with inReplyTo on the Activity, if you assume responses always come after the thing they are responding to (although i could make a famous joke here about answering a question before it is asked).

                      infinite love â´³T 1 Reply Last reply
                      2
                      0
                      • infinite love â´³T infinite love â´³

                        @evan @julian@fietkau.social @julian@activitypub.space @smallcircles i guess you could hack it with inReplyTo on the Activity, if you assume responses always come after the thing they are responding to (although i could make a famous joke here about answering a question before it is asked).

                        infinite love â´³T This user is from outside of this forum
                        infinite love â´³T This user is from outside of this forum
                        infinite love â´³
                        wrote last edited by
                        #27

                        @evan @julian@fietkau.social @julian@activitypub.space @smallcircles anyway, to address julian (not lam)'s question: what does Accept(Note) even mean? what does it entail? can you always assume it has to do something with a replies collection that may or may not be there?

                        Julian FietkauJ 1 Reply Last reply
                        2
                        0
                        • 🫧 socialcoding..S 🫧 socialcoding..

                          @evan @julian

                          #ActivityPub builds on top of #ActivityStreams in the sense that it adopted a number of its 'social primitives' defined in its vocabulary, and Collection being among those. These particular uses become 'protocol space', but other than that AS from the perspective of AP solution development is purely a set of social primitives, granular building blocks that one *may* use in a solution. AS is a utility library of sorts then. Or is that a wrong perception?

                          A 'feed' is something that lives in solution space, and I would only choose Collection to model it, if it offers a perfect fit in functionality. And aboveall.. does not assign some new app-specific use along the way.

                          I tooted today that I feel the biggest folly of the fedi is that everyone tries to cram their domain into the AS namespace. The AS primitives should not be Swiss army knives and have only singular well-defined meaning and purpose, yet they have become that along the way.

                          https://social.coop/@smallcircles/116096886732404993

                          infinite love â´³T This user is from outside of this forum
                          infinite love â´³T This user is from outside of this forum
                          infinite love â´³
                          wrote last edited by
                          #28

                          @smallcircles @evan @julian if only the application domain of activitystreams was activities and streams... 😉

                          i do think it causes a lot of confusion to stray away from activities as content, instead using them as vehicles for state changes (which will never be consistent, not even eventually consistent).

                          back when atompub and atom+as1 were a thing, the "feed entry" was atom semantics and the "activity stream" was as1 semantics. they coexisted in the same xml file. it worked well enough.

                          🫧 socialcoding..S 1 Reply Last reply
                          2
                          0
                          • infinite love â´³T infinite love â´³

                            @smallcircles @evan @julian if only the application domain of activitystreams was activities and streams... 😉

                            i do think it causes a lot of confusion to stray away from activities as content, instead using them as vehicles for state changes (which will never be consistent, not even eventually consistent).

                            back when atompub and atom+as1 were a thing, the "feed entry" was atom semantics and the "activity stream" was as1 semantics. they coexisted in the same xml file. it worked well enough.

                            🫧 socialcoding..S This user is from outside of this forum
                            🫧 socialcoding..S This user is from outside of this forum
                            🫧 socialcoding..
                            wrote last edited by
                            #29

                            @trwnh @evan @julian

                            Yes, for the ideation on Protosocial as an #ActivityPub compliant extension (going back to the roots with blank slate W3C specs) I imagined mapping the AS primitives to consistent protocol capabilities and thereby define a set of normative architecture patterns, like "this is how we do CRUD, this is Publish/Subscribe, this is an Event stream and this a Collection", etc.

                            Then Protosocial library and SDK implementers would need to deal with #ActivityStreams at a low-level plumbing impl detail, while solution developers would have a higher-level API to invoke these patterns. And other than that would not need to touch #ActivityStreams which is now entirely reserved to making AP work on the wire.

                            A combination of linked data practices and schema-based design would be used for both open-world and closed-world extension modeling. But here too the solution developer should be shield from the nitty gritty internal mechanics.

                            1 Reply Last reply
                            2
                            0
                            • infinite love â´³T infinite love â´³

                              @evan @julian@fietkau.social @julian@activitypub.space @smallcircles anyway, to address julian (not lam)'s question: what does Accept(Note) even mean? what does it entail? can you always assume it has to do something with a replies collection that may or may not be there?

                              Julian FietkauJ This user is from outside of this forum
                              Julian FietkauJ This user is from outside of this forum
                              Julian Fietkau
                              wrote last edited by
                              #30

                              @trwnh That's kinda what I'm getting at, yeah. The goal is to express that the owner of the replied-to object has accepted a reply, i.e. that the reply is added to the post's replies collection and shown under it in the web view. Followers and other observers are made aware this reply is accepted and can be shown similarly in other places that want to honor the poster's reply filters, so observers don't need to iterate over the replies collection all the time.

                              @evan @julian@activitypub.space @smallcircles

                              Julian FietkauJ 1 Reply Last reply
                              2
                              0
                              • Julian FietkauJ Julian Fietkau

                                @trwnh That's kinda what I'm getting at, yeah. The goal is to express that the owner of the replied-to object has accepted a reply, i.e. that the reply is added to the post's replies collection and shown under it in the web view. Followers and other observers are made aware this reply is accepted and can be shown similarly in other places that want to honor the poster's reply filters, so observers don't need to iterate over the replies collection all the time.

                                @evan @julian@activitypub.space @smallcircles

                                Julian FietkauJ This user is from outside of this forum
                                Julian FietkauJ This user is from outside of this forum
                                Julian Fietkau
                                wrote last edited by
                                #31

                                @trwnh The GTS interaction controls docs mention the replies collection, but only tangentially. For the purpose of conversation backfilling (which GTS doesn't do yet) I'm wanting to emphasize that the replies collection is the source of truth for replies curated by the object owner.

                                The Accept(Note) is essentially a hack to allow interactions from servers that don't implement GTS's ReplyRequest activity. I'll discuss with them how best to signal reply acceptance.

                                @evan @julian@activitypub.space @smallcircles

                                infinite love â´³T 1 Reply Last reply
                                0
                                • Julian FietkauJ Julian Fietkau

                                  @trwnh The GTS interaction controls docs mention the replies collection, but only tangentially. For the purpose of conversation backfilling (which GTS doesn't do yet) I'm wanting to emphasize that the replies collection is the source of truth for replies curated by the object owner.

                                  The Accept(Note) is essentially a hack to allow interactions from servers that don't implement GTS's ReplyRequest activity. I'll discuss with them how best to signal reply acceptance.

                                  @evan @julian@activitypub.space @smallcircles

                                  infinite love â´³T This user is from outside of this forum
                                  infinite love â´³T This user is from outside of this forum
                                  infinite love â´³
                                  wrote last edited by
                                  #32

                                  @julian@fietkau.social @evan @julian@activitypub.space @smallcircles

                                  > express that the owner of the replied-to object has accepted a reply, i.e. that the reply is added to the post's replies collection and shown under it in the web view

                                  i get that, but the question is whether you can claim this understanding universally for all peers. as it stands, Accept is very vague wrt this. Accept(Note) meaning "Add to replies collection" might be a thing gts does, but that's their interpretation of Accept, not the definition.

                                  infinite love â´³T Julian FietkauJ 2 Replies Last reply
                                  2
                                  0
                                  • infinite love â´³T infinite love â´³

                                    @julian@fietkau.social @evan @julian@activitypub.space @smallcircles

                                    > express that the owner of the replied-to object has accepted a reply, i.e. that the reply is added to the post's replies collection and shown under it in the web view

                                    i get that, but the question is whether you can claim this understanding universally for all peers. as it stands, Accept is very vague wrt this. Accept(Note) meaning "Add to replies collection" might be a thing gts does, but that's their interpretation of Accept, not the definition.

                                    infinite love â´³T This user is from outside of this forum
                                    infinite love â´³T This user is from outside of this forum
                                    infinite love â´³
                                    wrote last edited by
                                    #33

                                    @julian@fietkau.social @evan @julian@activitypub.space @smallcircles

                                    > replies collection is the source of truth for replies curated by the object owner.

                                    this is fine i think, but the way to do this usually is HTTP GET. you could notify of changes to the replies collection, or you could reify the Reply and then Accept that?

                                    the Reply has an instrument which is the Note. it has clear side effects to Add the instrument to the object.replies. the side effects can be gated behind Accept/Reject like following currently works.

                                    infinite love â´³T 1 Reply Last reply
                                    1
                                    0
                                    • infinite love â´³T infinite love â´³

                                      @julian@fietkau.social @evan @julian@activitypub.space @smallcircles

                                      > replies collection is the source of truth for replies curated by the object owner.

                                      this is fine i think, but the way to do this usually is HTTP GET. you could notify of changes to the replies collection, or you could reify the Reply and then Accept that?

                                      the Reply has an instrument which is the Note. it has clear side effects to Add the instrument to the object.replies. the side effects can be gated behind Accept/Reject like following currently works.

                                      infinite love â´³T This user is from outside of this forum
                                      infinite love â´³T This user is from outside of this forum
                                      infinite love â´³
                                      wrote last edited by
                                      #34

                                      @julian@fietkau.social @evan @julian@activitypub.space @smallcircles alternatively add the Reply itself, parallel to likes/shares collections. it depends on whether you think the replies collection should always contain a specific type of object, which i don't think is something you can guarantee because publishers can do anything with it. similar to how some publishers include activities in threads and some include notes.

                                      infinite love â´³T 1 Reply Last reply
                                      0
                                      • infinite love â´³T infinite love â´³

                                        @julian@fietkau.social @evan @julian@activitypub.space @smallcircles alternatively add the Reply itself, parallel to likes/shares collections. it depends on whether you think the replies collection should always contain a specific type of object, which i don't think is something you can guarantee because publishers can do anything with it. similar to how some publishers include activities in threads and some include notes.

                                        infinite love â´³T This user is from outside of this forum
                                        infinite love â´³T This user is from outside of this forum
                                        infinite love â´³
                                        wrote last edited by
                                        #35

                                        @julian@fietkau.social @evan @julian@activitypub.space @smallcircles i think the issue here is that projects are doing things that may or may not get widely adopted, then if the proposals ever change, they have to deal with older software only understanding the old thing they tried. (this is where i would say something about protocol capability negotiation)

                                        Julian FietkauJ 1 Reply Last reply
                                        2
                                        0
                                        • infinite love â´³T infinite love â´³

                                          @julian@fietkau.social @evan @julian@activitypub.space @smallcircles

                                          > express that the owner of the replied-to object has accepted a reply, i.e. that the reply is added to the post's replies collection and shown under it in the web view

                                          i get that, but the question is whether you can claim this understanding universally for all peers. as it stands, Accept is very vague wrt this. Accept(Note) meaning "Add to replies collection" might be a thing gts does, but that's their interpretation of Accept, not the definition.

                                          Julian FietkauJ This user is from outside of this forum
                                          Julian FietkauJ This user is from outside of this forum
                                          Julian Fietkau
                                          wrote last edited by
                                          #36

                                          @trwnh This is in the context of a FEP draft which prescribes a meaning (including desired side effects) for compliant implementations.

                                          Hence my fidgeting with the vocabulary. The effects are the goal, the question is how they should be expressed and broadcasted. (Principle of least surprise, potential compatibility with existing implementations that look at the replies collection, concerns around server traffic...)

                                          @evan @julian@activitypub.space @smallcircles

                                          1 Reply Last reply
                                          2
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups