Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • 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 (No Skin)
  • No Skin
Collapse
We Distribute
  1. Home
  2. General Discussion
  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 General Discussion
activitypubfediverse
115 Posts 13 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.
  • trwnh@mastodon.socialT trwnh@mastodon.social

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

    trwnh@mastodon.socialT This user is from outside of this forum
    trwnh@mastodon.socialT This user is from outside of this forum
    trwnh@mastodon.social
    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).

    trwnh@mastodon.socialT 1 Reply Last reply
    0
    • trwnh@mastodon.socialT trwnh@mastodon.social

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

      trwnh@mastodon.socialT This user is from outside of this forum
      trwnh@mastodon.socialT This user is from outside of this forum
      trwnh@mastodon.social
      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@fietkau.socialJ 1 Reply Last reply
      0
      • smallcircles@social.coopS smallcircles@social.coop

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

        🫧 socialcoding.. (@smallcircles@social.coop)

        @thisismissem@hachyderm.io @eyeinthesky@mastodon.social The biggest folly imho is this idea of "let's cram every domain into #ActivityStreams somehow". Flatten everything and project it onto this small set of social primitives that AS defines. It is once more a choice of pragmatism: "Hey, I've seen it working with Mastodon, so I copied that. And #LinkedData extension mechanism is a handwaved horror show". So understandable perhaps that we did it. But now we must overcome this trend which has taken stubborn root and drags the ecosystem down.

        favicon

        social.coop (social.coop)

        trwnh@mastodon.socialT This user is from outside of this forum
        trwnh@mastodon.socialT This user is from outside of this forum
        trwnh@mastodon.social
        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.

        smallcircles@social.coopS 1 Reply Last reply
        0
        • trwnh@mastodon.socialT trwnh@mastodon.social

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

          smallcircles@social.coopS This user is from outside of this forum
          smallcircles@social.coopS This user is from outside of this forum
          smallcircles@social.coop
          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
          0
          • trwnh@mastodon.socialT trwnh@mastodon.social

            @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@fietkau.socialJ This user is from outside of this forum
            julian@fietkau.socialJ This user is from outside of this forum
            julian@fietkau.social
            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@fietkau.socialJ 1 Reply Last reply
            0
            • julian@fietkau.socialJ julian@fietkau.social

              @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@fietkau.socialJ This user is from outside of this forum
              julian@fietkau.socialJ This user is from outside of this forum
              julian@fietkau.social
              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

              trwnh@mastodon.socialT 1 Reply Last reply
              0
              • julian@fietkau.socialJ julian@fietkau.social

                @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

                trwnh@mastodon.socialT This user is from outside of this forum
                trwnh@mastodon.socialT This user is from outside of this forum
                trwnh@mastodon.social
                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.

                trwnh@mastodon.socialT julian@fietkau.socialJ 2 Replies Last reply
                0
                • trwnh@mastodon.socialT trwnh@mastodon.social

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

                  trwnh@mastodon.socialT This user is from outside of this forum
                  trwnh@mastodon.socialT This user is from outside of this forum
                  trwnh@mastodon.social
                  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.

                  trwnh@mastodon.socialT 1 Reply Last reply
                  0
                  • trwnh@mastodon.socialT trwnh@mastodon.social

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

                    trwnh@mastodon.socialT This user is from outside of this forum
                    trwnh@mastodon.socialT This user is from outside of this forum
                    trwnh@mastodon.social
                    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.

                    trwnh@mastodon.socialT 1 Reply Last reply
                    0
                    • trwnh@mastodon.socialT trwnh@mastodon.social

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

                      trwnh@mastodon.socialT This user is from outside of this forum
                      trwnh@mastodon.socialT This user is from outside of this forum
                      trwnh@mastodon.social
                      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@fietkau.socialJ 1 Reply Last reply
                      0
                      • trwnh@mastodon.socialT trwnh@mastodon.social

                        @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@fietkau.socialJ This user is from outside of this forum
                        julian@fietkau.socialJ This user is from outside of this forum
                        julian@fietkau.social
                        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
                        0
                        • trwnh@mastodon.socialT trwnh@mastodon.social

                          @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@fietkau.socialJ This user is from outside of this forum
                          julian@fietkau.socialJ This user is from outside of this forum
                          julian@fietkau.social
                          wrote last edited by
                          #37

                          @trwnh There's also this, yeah. GTS interaction controls have already gone through one breaking schema revision from version 0.19 to 0.21 (with 0.20 trying to manage both), and a core goal of the FEP I'm working on is to not break compatibility again.

                          Sending out an Add in addition to the Accept(Note) that's already happening should be non-breaking for existing implementations, I'm pretty sure. What's left to decide is whether it's a good idea.

                          @evan @julian@activitypub.space @smallcircles

                          trwnh@mastodon.socialT julian@activitypub.spaceJ 2 Replies Last reply
                          0
                          • julian@fietkau.socialJ julian@fietkau.social

                            @trwnh There's also this, yeah. GTS interaction controls have already gone through one breaking schema revision from version 0.19 to 0.21 (with 0.20 trying to manage both), and a core goal of the FEP I'm working on is to not break compatibility again.

                            Sending out an Add in addition to the Accept(Note) that's already happening should be non-breaking for existing implementations, I'm pretty sure. What's left to decide is whether it's a good idea.

                            @evan @julian@activitypub.space @smallcircles

                            trwnh@mastodon.socialT This user is from outside of this forum
                            trwnh@mastodon.socialT This user is from outside of this forum
                            trwnh@mastodon.social
                            wrote last edited by
                            #38

                            @julian@fietkau.social @evan @julian@activitypub.space @smallcircles this makes me really wish people didn't overload the AS2 vocab so much, and were less afraid of defining their own extensions. you could swing it so that the same activity is an Add, Accept, and ReplyAck. it sucks that we have to pick one instead of using whatever makes sense. (developers: please support multityping and/or duck typing! composability is the only true path to extensibility, and one size never fits all...)

                            trwnh@mastodon.socialT 1 Reply Last reply
                            0
                            • julian@fietkau.socialJ julian@fietkau.social

                              @trwnh There's also this, yeah. GTS interaction controls have already gone through one breaking schema revision from version 0.19 to 0.21 (with 0.20 trying to manage both), and a core goal of the FEP I'm working on is to not break compatibility again.

                              Sending out an Add in addition to the Accept(Note) that's already happening should be non-breaking for existing implementations, I'm pretty sure. What's left to decide is whether it's a good idea.

                              @evan @julian@activitypub.space @smallcircles

                              julian@activitypub.spaceJ This user is from outside of this forum
                              julian@activitypub.spaceJ This user is from outside of this forum
                              julian@activitypub.space
                              wrote last edited by
                              #39

                              @julian@fietkau.social in a parallel conversation not about interaction controls, @rimu@piefed.social made the case for batching events, which I'm going to repurpose as an argument against sending additional activities for backward compatibility (unless absolutely necessary.)

                              > As a user can do a great number of notable things (posting content, liking content, following others) each minute and there can be thousands of instances to send to, a great many POST requests can be sent in a short amount of time.
                              >
                              > For example if 5 people cast 20 votes and there are 500 instances, the instance hosting the community containing the posts being voted on must send 5 * 20 * 500 = 50,000 HTTP POSTs.

                              julian@fietkau.socialJ 1 Reply Last reply
                              0
                              • trwnh@mastodon.socialT trwnh@mastodon.social

                                @julian@fietkau.social @evan @julian@activitypub.space @smallcircles this makes me really wish people didn't overload the AS2 vocab so much, and were less afraid of defining their own extensions. you could swing it so that the same activity is an Add, Accept, and ReplyAck. it sucks that we have to pick one instead of using whatever makes sense. (developers: please support multityping and/or duck typing! composability is the only true path to extensibility, and one size never fits all...)

                                trwnh@mastodon.socialT This user is from outside of this forum
                                trwnh@mastodon.socialT This user is from outside of this forum
                                trwnh@mastodon.social
                                wrote last edited by
                                #40

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

                                actor: alice
                                type: as:Accept, as:Add, _:ReplyAck
                                object: <the reply>
                                target: <the replies collection>
                                _:postRepliedTo: <op>

                                for the Accept, you need to understand it as "accepting the object into the target", which is apparently a thing in AS2-Vocab.

                                for the Add, you need to understand it as Add is defined -- no surprises there, i think?

                                for the ReplyAck, it can be whatever you define. here i've used an extension postRepliedTo property.

                                julian@fietkau.socialJ 1 Reply Last reply
                                0
                                • trwnh@mastodon.socialT trwnh@mastodon.social

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

                                  actor: alice
                                  type: as:Accept, as:Add, _:ReplyAck
                                  object: <the reply>
                                  target: <the replies collection>
                                  _:postRepliedTo: <op>

                                  for the Accept, you need to understand it as "accepting the object into the target", which is apparently a thing in AS2-Vocab.

                                  for the Add, you need to understand it as Add is defined -- no surprises there, i think?

                                  for the ReplyAck, it can be whatever you define. here i've used an extension postRepliedTo property.

                                  julian@fietkau.socialJ This user is from outside of this forum
                                  julian@fietkau.socialJ This user is from outside of this forum
                                  julian@fietkau.social
                                  wrote last edited by
                                  #41

                                  @trwnh The GTS implementation comes with a vocabulary extension, so adding another activity type would be an option.

                                  I guess the reason they didn't do that for this case (I wasn't around for the decision) is that the Accept(Note) thing is itself a backward compatibility hack that they hoped to be able to drop eventually, when more servers would send ReplyRequests (which can be Accept-ed directly), and adding a new type would have felt too much like “enshrining” it.

                                  @evan @julian@activitypub.space @smallcircles

                                  trwnh@mastodon.socialT 1 Reply Last reply
                                  0
                                  • julian@activitypub.spaceJ julian@activitypub.space

                                    @julian@fietkau.social in a parallel conversation not about interaction controls, @rimu@piefed.social made the case for batching events, which I'm going to repurpose as an argument against sending additional activities for backward compatibility (unless absolutely necessary.)

                                    > As a user can do a great number of notable things (posting content, liking content, following others) each minute and there can be thousands of instances to send to, a great many POST requests can be sent in a short amount of time.
                                    >
                                    > For example if 5 people cast 20 votes and there are 500 instances, the instance hosting the community containing the posts being voted on must send 5 * 20 * 500 = 50,000 HTTP POSTs.

                                    julian@fietkau.socialJ This user is from outside of this forum
                                    julian@fietkau.socialJ This user is from outside of this forum
                                    julian@fietkau.social
                                    wrote last edited by
                                    #42

                                    @julian@activitypub.space I'm doing my best to realistically prioritize traffic load as well, yeah. The case of accepting an incoming reply will be frequent, whereas the one where you first accept a reply, then change your mind and revoke the acceptance, would be expected to be relatively rare.

                                    The easy way out for me would be to just not touch that part of the spec, leave it as Accept(Note), and see what implementers do with it.

                                    @rimu

                                    1 Reply Last reply
                                    0
                                    • julian@fietkau.socialJ julian@fietkau.social

                                      @trwnh The GTS implementation comes with a vocabulary extension, so adding another activity type would be an option.

                                      I guess the reason they didn't do that for this case (I wasn't around for the decision) is that the Accept(Note) thing is itself a backward compatibility hack that they hoped to be able to drop eventually, when more servers would send ReplyRequests (which can be Accept-ed directly), and adding a new type would have felt too much like “enshrining” it.

                                      @evan @julian@activitypub.space @smallcircles

                                      trwnh@mastodon.socialT This user is from outside of this forum
                                      trwnh@mastodon.socialT This user is from outside of this forum
                                      trwnh@mastodon.social
                                      wrote last edited by
                                      #43

                                      @julian i think mastodon handles multityping in certain code paths but most other projects don't. it could have been a compatibility thing?

                                      julian@fietkau.socialJ 1 Reply Last reply
                                      0
                                      • trwnh@mastodon.socialT trwnh@mastodon.social

                                        @julian i think mastodon handles multityping in certain code paths but most other projects don't. it could have been a compatibility thing?

                                        julian@fietkau.socialJ This user is from outside of this forum
                                        julian@fietkau.socialJ This user is from outside of this forum
                                        julian@fietkau.social
                                        wrote last edited by
                                        #44

                                        @trwnh Maybe. I have no idea if GTS itself can handle activities with multiple types.

                                        1 Reply Last reply
                                        0
                                        • smallcircles@social.coopS smallcircles@social.coop

                                          @evan @julian @deadsuperhero

                                          Except when they are called other names instead 😜

                                          A timeline is a different thing than a collection imho. And an AS collection has some very particular functionality, which if I model a timeline in my app may not supported (e.g. reverse ordering).

                                          Collection / 'timeline' is one of those words where sometimes they indicate an app domain, and sometimes a core protocol mechanism. Same is true with 'follow' which is sometimes a user action, sometimes indicates low-level publish/subscribe.

                                          For core capabilities that must be part of the specs, in 'protocol space' it may be better to use terminology that is more common in messaging architectures and all the various architecture patterns that are involved. Perhaps idk we deal with a time-ordered event log or something like that.

                                          steve@social.technoetic.comS This user is from outside of this forum
                                          steve@social.technoetic.comS This user is from outside of this forum
                                          steve@social.technoetic.com
                                          wrote last edited by
                                          #45

                                          @smallcircles @evan An AS2 Collection cannot be a timeline (in general). It’s not even ordered. An AS2 OrderedCollection (a subtype of Collection) might be ordered by time or not, so it’s also not a timeline (in general). When they are ordered by some time value (unspecified in AP) they are often called “streams” in the spec. The Mastodon content timelines are not the same as AP activity streams although a filtered AP stream can be transformed to a content timeline.

                                          mariusor@metalhead.clubM evan@cosocial.caE 2 Replies Last reply
                                          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