Skip to content
0
  • Home
  • Piero Bosio
  • Blog
  • World
  • Fediverso
  • News
  • Categories
  • Old Web Site
  • Recent
  • Popular
  • Tags
  • Users
  • Home
  • Piero Bosio
  • Blog
  • World
  • Fediverso
  • News
  • Categories
  • Old Web Site
  • Recent
  • Popular
  • Tags
  • Users
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 (No Skin)
  • No Skin
Collapse

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone
  1. Home
  2. Categories
  3. ActivityPub Protocol
  4. FEP-4f05: Soft Deletion

FEP-4f05: Soft Deletion

Scheduled Pinned Locked Moved ActivityPub Protocol
16 Posts 7 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.
  • devnull@socialhub.activitypub.rocksundefined devnull@socialhub.activitypub.rocks

    Hi all,

    Some discussion regarding NodeBB's handling of soft deleted posts and Discourse's parallel implementation prompted the creation of this FEP, which attempts to describe how the concept of soft deletion can be published without the introduction of new activities—using as:Delete as-is and relying on a backreference check for Tombstone in order to signal a soft delete.

    https://codeberg.org/fediverse/fep/src/branch/main/fep/4f05/fep-4f05.md

    julian@community.nodebb.orgundefined This user is from outside of this forum
    julian@community.nodebb.orgundefined This user is from outside of this forum
    julian@community.nodebb.org
    wrote on last edited by
    #5

    @rimu@piefed.social I noticed today that PieFed supports the concept of soft deletes:

    7b0318bb-2838-4675-b53e-28e6904ebf45-image.png

    Perhaps this FEP would be of interest to you.

    1 Reply Last reply
    0
    • devnull@socialhub.activitypub.rocksundefined devnull@socialhub.activitypub.rocks

      Hi all,

      Some discussion regarding NodeBB's handling of soft deleted posts and Discourse's parallel implementation prompted the creation of this FEP, which attempts to describe how the concept of soft deletion can be published without the introduction of new activities—using as:Delete as-is and relying on a backreference check for Tombstone in order to signal a soft delete.

      https://codeberg.org/fediverse/fep/src/branch/main/fep/4f05/fep-4f05.md

      thisismissem@socialhub.activitypub.rocksundefined This user is from outside of this forum
      thisismissem@socialhub.activitypub.rocksundefined This user is from outside of this forum
      thisismissem@socialhub.activitypub.rocks
      wrote on last edited by
      #6

      What would happen if you receive a Delete for an object that you believe to have been soft deleted, but now it shows up as an object instead of a Tombstone? Like, it was undeleted by the time you receive the Delete or something?

      Likewise, you receive an Undo(Delete) and when you fetch the referenced object, it returns back a Tombstone instead of the object?

      It'd be good to document those cases, because I think the answers are:

      • If you receive a Delete and the object returns an object, not a 410 / 404 or Tombstone, then you discard the Delete
      • If you receive an Undo(Delete) and the object returns a 404, 410 or Tombstone, then you discard the Undo(Delete)
      julian@community.nodebb.orgundefined 1 Reply Last reply
      0
      • thisismissem@socialhub.activitypub.rocksundefined thisismissem@socialhub.activitypub.rocks

        What would happen if you receive a Delete for an object that you believe to have been soft deleted, but now it shows up as an object instead of a Tombstone? Like, it was undeleted by the time you receive the Delete or something?

        Likewise, you receive an Undo(Delete) and when you fetch the referenced object, it returns back a Tombstone instead of the object?

        It'd be good to document those cases, because I think the answers are:

        • If you receive a Delete and the object returns an object, not a 410 / 404 or Tombstone, then you discard the Delete
        • If you receive an Undo(Delete) and the object returns a 404, 410 or Tombstone, then you discard the Undo(Delete)
        julian@community.nodebb.orgundefined This user is from outside of this forum
        julian@community.nodebb.orgundefined This user is from outside of this forum
        julian@community.nodebb.org
        wrote on last edited by
        #7

        Hi Emelia, thanks for the second pair of eyes on this.

        I will amend the FEP with those behaviours. It makes sense that no action be taken if the backreference check fails.

        Secondly, on re-read of my own FEP it is unclear that a backreference call is to be made, so I will need to make it clearer as well.

        julian@community.nodebb.orgundefined 1 Reply Last reply
        0
        • julian@community.nodebb.orgundefined julian@community.nodebb.org

          Hi Emelia, thanks for the second pair of eyes on this.

          I will amend the FEP with those behaviours. It makes sense that no action be taken if the backreference check fails.

          Secondly, on re-read of my own FEP it is unclear that a backreference call is to be made, so I will need to make it clearer as well.

          julian@community.nodebb.orgundefined This user is from outside of this forum
          julian@community.nodebb.orgundefined This user is from outside of this forum
          julian@community.nodebb.org
          wrote on last edited by
          #8

          I have amended the FEP with an "Unexpected Responses" section.

          Of note, it's less so that you discard the activity, but since you already made the request, you may as well go through with what you received back.

          So if you get a Delete and a backreference shows the object alive and well, then just process it as an Update if you so wish.

          https://codeberg.org/fediverse/fep/pulls/665/files

          1 Reply Last reply
          0
          • devnull@socialhub.activitypub.rocksundefined devnull@socialhub.activitypub.rocks

            Hi all,

            Some discussion regarding NodeBB's handling of soft deleted posts and Discourse's parallel implementation prompted the creation of this FEP, which attempts to describe how the concept of soft deletion can be published without the introduction of new activities—using as:Delete as-is and relying on a backreference check for Tombstone in order to signal a soft delete.

            https://codeberg.org/fediverse/fep/src/branch/main/fep/4f05/fep-4f05.md

            helge@socialhub.activitypub.rocksundefined This user is from outside of this forum
            helge@socialhub.activitypub.rocksundefined This user is from outside of this forum
            helge@socialhub.activitypub.rocks
            wrote on last edited by
            #9

            Hi @devnull

            this regards soft deletion + context collections (as a collection of posts). This topic started at

            https://codeberg.org/silverpill/feps/issues/19

            I'm curious what should happen if the context contains three elements ap-obj, reply, and reply2. reply2 is a reply of reply. Now reply is deleted. How many elements does the context then contain?

            @silverpill said that for mitra the context would contain 1 element ap-obj.

            The scenario as Gherkin:

            Background: Given A new user called "Alice" And A new user called "Bob" And An ActivityPub object called "ap-obj"Scenario: Reply to reply with parent reply deleted Given "Alice" replied to "ap-obj" with "Nice post!" as "reply" And "Bob" replied to "reply" with "Good point!" as "reply2" When "Alice" deletes "reply" Then For "Alice", the "context" collection of "ap-obj" contains "?" elements
            julian@activitypub.spaceundefined 1 Reply Last reply
            0
            • helge@socialhub.activitypub.rocksundefined helge@socialhub.activitypub.rocks

              Hi @devnull

              this regards soft deletion + context collections (as a collection of posts). This topic started at

              https://codeberg.org/silverpill/feps/issues/19

              I'm curious what should happen if the context contains three elements ap-obj, reply, and reply2. reply2 is a reply of reply. Now reply is deleted. How many elements does the context then contain?

              @silverpill said that for mitra the context would contain 1 element ap-obj.

              The scenario as Gherkin:

              Background: Given A new user called "Alice" And A new user called "Bob" And An ActivityPub object called "ap-obj"Scenario: Reply to reply with parent reply deleted Given "Alice" replied to "ap-obj" with "Nice post!" as "reply" And "Bob" replied to "reply" with "Good point!" as "reply2" When "Alice" deletes "reply" Then For "Alice", the "context" collection of "ap-obj" contains "?" elements
              julian@activitypub.spaceundefined This user is from outside of this forum
              julian@activitypub.spaceundefined This user is from outside of this forum
              julian@activitypub.space
              wrote on last edited by
              #10

              Hey Helge.

              Per my understanding, when processing a deletion of reply, you would not presume deletion of any or all downstream objects. Only the referenced object is deleted.

              Deleting multiple objects at once would require multiple activities, or perhaps a single (and as-yet undefined) "batch" style activity.

              1 Reply Last reply
              0
              • helge@socialhub.activitypub.rocksundefined This user is from outside of this forum
                helge@socialhub.activitypub.rocksundefined This user is from outside of this forum
                helge@socialhub.activitypub.rocks
                wrote on last edited by
                #11

                It is not about deleting the objects, it's about if they are in the context collection or not.

                If I understand you correctly, we would have before Alice deletes her reply

                context[ap-obj] = [ap-obj, reply, repl2]

                and

                context[ap-obj] = [ap-obj, repl2]

                afterwards

                julian@activitypub.spaceundefined 1 Reply Last reply
                0
                • helge@socialhub.activitypub.rocksundefined helge@socialhub.activitypub.rocks

                  It is not about deleting the objects, it's about if they are in the context collection or not.

                  If I understand you correctly, we would have before Alice deletes her reply

                  context[ap-obj] = [ap-obj, reply, repl2]

                  and

                  context[ap-obj] = [ap-obj, repl2]

                  afterwards

                  julian@activitypub.spaceundefined This user is from outside of this forum
                  julian@activitypub.spaceundefined This user is from outside of this forum
                  julian@activitypub.space
                  wrote on last edited by
                  #12

                  Yes, that's correct. Deletion of one object will not affect membership of downstream objects in the context collection.

                  1 Reply Last reply
                  0
                  • silverpill@mitra.socialundefined This user is from outside of this forum
                    silverpill@mitra.socialundefined This user is from outside of this forum
                    silverpill@mitra.social
                    wrote on last edited by
                    #13

                    @julian @helge I'll mention in FEP-f228 that behavior differs between implementations.

                    1 Reply Last reply
                    0
                    • devnull@socialhub.activitypub.rocksundefined devnull@socialhub.activitypub.rocks

                      Hi all,

                      Some discussion regarding NodeBB's handling of soft deleted posts and Discourse's parallel implementation prompted the creation of this FEP, which attempts to describe how the concept of soft deletion can be published without the introduction of new activities—using as:Delete as-is and relying on a backreference check for Tombstone in order to signal a soft delete.

                      https://codeberg.org/fediverse/fep/src/branch/main/fep/4f05/fep-4f05.md

                      claire@socialhub.activitypub.rocksundefined This user is from outside of this forum
                      claire@socialhub.activitypub.rocksundefined This user is from outside of this forum
                      claire@socialhub.activitypub.rocks
                      wrote last edited by
                      #14

                      Hi!

                      Sorry for being late to the party.

                      I understand the need to be able to undo deletions, this is something we face at Mastodon for the edge case of appealing moderation decisions (currently, most moderation decisions can be reversed upon appeal, but not post deletion).

                      I have some concern with the FEP as it stands regarding performances, and ensuring consistency wrt. chronology of events, caching and possible out-of-order activities.

                      Indeed, performance-wise, the FEP asks recipients of a \Delete\ to fetch the object that has just been deleted. This means that for a post that has, over its lifetime, reached a thousand different servers, in addition to ideally reaching all of those servers again (either directly or through inbox forwarding), the authoring server must now handle all of these servers fetching the now-deleted post all at once. I fear this is an especially bad instance of the thundering herd issue.

                      As for ensuring consistency wrt. chronology of events, we face a lot of challenges:

                      • depending on their architecture, servers may emit outgoing activities (or process incoming ones) out-of-order (for instance, Mastodon queues jobs into work queues, but if there are multiple workers, a later job can finish before an earlier job does)
                      • due to network failures, servers may fail to deliver an activity on time and retry later
                      • due to caching (e.g. Mastodon offers short-time caching on reverse proxies, but does not invalidate the reverse-proxy cache when the resource is changed), fetched data might actually be older than just-delivered data

                      The ActivityPub primer makes note of this but offers no solutions besides “The receiving server, if it receives an activity that refers to an unknown activity, should store that activity for later processing.” While this is relatively easy to do when an object cannot be brought back once it’s deleted, this breaks done if you can undo the \Delete\, and I have seen no solution offered for that in the current FEP.

                      Using \published\ in activities and \published\/\updated\ or similar in objects might help with that, but I’m afraid this might not be enough because of the seconds resolution of \xsd:Datetime\ (and it would require extra care that the lifecycle of an object is indeed serialized with a monotonic time).

                      julian@activitypub.spaceundefined 1 Reply Last reply
                      0
                      • julian@activitypub.spaceundefined julian@activitypub.space shared this topic
                      • claire@socialhub.activitypub.rocksundefined claire@socialhub.activitypub.rocks

                        Hi!

                        Sorry for being late to the party.

                        I understand the need to be able to undo deletions, this is something we face at Mastodon for the edge case of appealing moderation decisions (currently, most moderation decisions can be reversed upon appeal, but not post deletion).

                        I have some concern with the FEP as it stands regarding performances, and ensuring consistency wrt. chronology of events, caching and possible out-of-order activities.

                        Indeed, performance-wise, the FEP asks recipients of a \Delete\ to fetch the object that has just been deleted. This means that for a post that has, over its lifetime, reached a thousand different servers, in addition to ideally reaching all of those servers again (either directly or through inbox forwarding), the authoring server must now handle all of these servers fetching the now-deleted post all at once. I fear this is an especially bad instance of the thundering herd issue.

                        As for ensuring consistency wrt. chronology of events, we face a lot of challenges:

                        • depending on their architecture, servers may emit outgoing activities (or process incoming ones) out-of-order (for instance, Mastodon queues jobs into work queues, but if there are multiple workers, a later job can finish before an earlier job does)
                        • due to network failures, servers may fail to deliver an activity on time and retry later
                        • due to caching (e.g. Mastodon offers short-time caching on reverse proxies, but does not invalidate the reverse-proxy cache when the resource is changed), fetched data might actually be older than just-delivered data

                        The ActivityPub primer makes note of this but offers no solutions besides “The receiving server, if it receives an activity that refers to an unknown activity, should store that activity for later processing.” While this is relatively easy to do when an object cannot be brought back once it’s deleted, this breaks done if you can undo the \Delete\, and I have seen no solution offered for that in the current FEP.

                        Using \published\ in activities and \published\/\updated\ or similar in objects might help with that, but I’m afraid this might not be enough because of the seconds resolution of \xsd:Datetime\ (and it would require extra care that the lifecycle of an object is indeed serialized with a monotonic time).

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

                        Regarding the performance issue, and avoiding the thundering herd problem, one could simply embed the object itself (so, a Delete with an expanded Tombstone in object) into the activity. You could additionally sign it (LD Signature) or attach a proof (Object Integrity Proofs) if necessary.

                        As for sub-second resolution of updated/published... is xsd:Datetime required? I've honestly just been sending ISO Strings, which include millisecond-level accuracy.

                        1 Reply Last reply
                        0
                        • julian@activitypub.spaceundefined This user is from outside of this forum
                          julian@activitypub.spaceundefined This user is from outside of this forum
                          julian@activitypub.space
                          wrote last edited by
                          #16

                          @claire@social.sitedethib.com I re-read the text of the FEP and noted the following:

                          > When a Delete activity is encountered, the referenced object MAY be either the full object or a reference to one.
                          >
                          > If object is a reference, the server MUST request the object (via its id) from the origin server directly.

                          Emphasis is mine. In situations where you choose to embed the full object in the activity, then you are not bound by the MUST to refetch the object.

                          Now, when talking about hard deletes, you cannot literally embed a non-existent object, so a re-fetch would be necessary, although I am hoping that 404 handlers are a great deal faster.

                          I like published. I can add that in to the FEP if it makes it easier to handle situations where multiple Deletes and Updates are encountered out-of-rder due to network congestion, parallel processing, etc.

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


                          Feed RSS
                          FEP-4f05: Soft Deletion

                          Gli ultimi otto messaggi ricevuti dalla Federazione
                          • julian@activitypub.spaceundefined
                            julian@activitypub.space

                            @claire@social.sitedethib.com I re-read the text of the FEP and noted the following:

                            > When a Delete activity is encountered, the referenced object MAY be either the full object or a reference to one.
                            >
                            > If object is a reference, the server MUST request the object (via its id) from the origin server directly.

                            Emphasis is mine. In situations where you choose to embed the full object in the activity, then you are not bound by the MUST to refetch the object.

                            Now, when talking about hard deletes, you cannot literally embed a non-existent object, so a re-fetch would be necessary, although I am hoping that 404 handlers are a great deal faster.

                            I like published. I can add that in to the FEP if it makes it easier to handle situations where multiple Deletes and Updates are encountered out-of-rder due to network congestion, parallel processing, etc.

                            read more

                          • julian@activitypub.spaceundefined
                            julian@activitypub.space

                            Regarding the performance issue, and avoiding the thundering herd problem, one could simply embed the object itself (so, a Delete with an expanded Tombstone in object) into the activity. You could additionally sign it (LD Signature) or attach a proof (Object Integrity Proofs) if necessary.

                            As for sub-second resolution of updated/published... is xsd:Datetime required? I've honestly just been sending ISO Strings, which include millisecond-level accuracy.

                            read more

                          • claire@socialhub.activitypub.rocksundefined
                            claire@socialhub.activitypub.rocks

                            Hi!

                            Sorry for being late to the party.

                            I understand the need to be able to undo deletions, this is something we face at Mastodon for the edge case of appealing moderation decisions (currently, most moderation decisions can be reversed upon appeal, but not post deletion).

                            I have some concern with the FEP as it stands regarding performances, and ensuring consistency wrt. chronology of events, caching and possible out-of-order activities.

                            Indeed, performance-wise, the FEP asks recipients of a \Delete\ to fetch the object that has just been deleted. This means that for a post that has, over its lifetime, reached a thousand different servers, in addition to ideally reaching all of those servers again (either directly or through inbox forwarding), the authoring server must now handle all of these servers fetching the now-deleted post all at once. I fear this is an especially bad instance of the thundering herd issue.

                            As for ensuring consistency wrt. chronology of events, we face a lot of challenges:

                            depending on their architecture, servers may emit outgoing activities (or process incoming ones) out-of-order (for instance, Mastodon queues jobs into work queues, but if there are multiple workers, a later job can finish before an earlier job does)due to network failures, servers may fail to deliver an activity on time and retry laterdue to caching (e.g. Mastodon offers short-time caching on reverse proxies, but does not invalidate the reverse-proxy cache when the resource is changed), fetched data might actually be older than just-delivered data

                            The ActivityPub primer makes note of this but offers no solutions besides “The receiving server, if it receives an activity that refers to an unknown activity, should store that activity for later processing.” While this is relatively easy to do when an object cannot be brought back once it’s deleted, this breaks done if you can undo the \Delete\, and I have seen no solution offered for that in the current FEP.

                            Using \published\ in activities and \published\/\updated\ or similar in objects might help with that, but I’m afraid this might not be enough because of the seconds resolution of \xsd:Datetime\ (and it would require extra care that the lifecycle of an object is indeed serialized with a monotonic time).

                            read more

                          • silverpill@mitra.socialundefined
                            silverpill@mitra.social

                            @julian @helge I'll mention in FEP-f228 that behavior differs between implementations.

                            read more

                          • julian@activitypub.spaceundefined
                            julian@activitypub.space

                            Yes, that's correct. Deletion of one object will not affect membership of downstream objects in the context collection.

                            read more

                          • helge@socialhub.activitypub.rocksundefined
                            helge@socialhub.activitypub.rocks

                            It is not about deleting the objects, it's about if they are in the context collection or not.

                            If I understand you correctly, we would have before Alice deletes her reply

                            context[ap-obj] = [ap-obj, reply, repl2]

                            and

                            context[ap-obj] = [ap-obj, repl2]

                            afterwards

                            read more

                          • julian@activitypub.spaceundefined
                            julian@activitypub.space

                            Hey Helge.

                            Per my understanding, when processing a deletion of reply, you would not presume deletion of any or all downstream objects. Only the referenced object is deleted.

                            Deleting multiple objects at once would require multiple activities, or perhaps a single (and as-yet undefined) "batch" style activity.

                            read more

                          • helge@socialhub.activitypub.rocksundefined
                            helge@socialhub.activitypub.rocks

                            Hi @devnull

                            this regards soft deletion + context collections (as a collection of posts). This topic started at

                            https://codeberg.org/silverpill/feps/issues/19

                            I'm curious what should happen if the context contains three elements ap-obj, reply, and reply2. reply2 is a reply of reply. Now reply is deleted. How many elements does the context then contain?

                            @silverpill said that for mitra the context would contain 1 element ap-obj.

                            The scenario as Gherkin:

                            Background: Given A new user called "Alice" And A new user called "Bob" And An ActivityPub object called "ap-obj"Scenario: Reply to reply with parent reply deleted Given "Alice" replied to "ap-obj" with "Nice post!" as "reply" And "Bob" replied to "reply" with "Good point!" as "reply2" When "Alice" deletes "reply" Then For "Alice", the "context" collection of "ap-obj" contains "?" elements
                            read more
                          @pierobosio@soc.bosio.info
                          Running NodeBB v4.7.2 Contributors
                          Post suggeriti
                          • Login

                          • Login or register to search.
                          • First post
                            Last post