Salta al contenuto
0
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
  • Home
  • Piero Bosio
  • Blog
  • Mondo
  • Fediverso
  • News
  • Categorie
  • Old Web Site
  • Recenti
  • Popolare
  • Tag
  • Utenti
Skin
  • Chiaro
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Scuro
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Predefinito (Cerulean)
  • Nessuna skin
Collassa

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. Categorie
  3. Technical Discussion
  4. Deleting a post vs deleting an entire comment tree

Deleting a post vs deleting an entire comment tree

Pianificato Fissato Bloccato Spostato Technical Discussion
deletionthreadiverseactivitypub
65 Post 15 Autori 126 Visualizzazioni
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • nutomic@lemmy.mlundefined nutomic@lemmy.ml

    This is slightly different from OP as you are talking about deleting a reply (ie Note) with children, while OP is about deleting a top-level post with children. Nevertheless both can be represented in the same way over federation.

    Just sending out an individual Delete for every Object. I like this option the least, but it is very easy to implement and needs no changes in other software to work.

    This would be terrible for performance when removing dozens or hundreds of comments at once. Rule of thumb should be one activity for one user action.

    Make the target of the Delete an array. I’m honestly 50/50 on whether this is actually spec compliant, it’s not clear to me that it isn’t;

    The problem with this is that some platforms might get the idea to delete multiple unrelated comments with a single activity, or even comments in different posts. Handling that would make the receiving logic unnecessarily complicated, and would also make it complicated to combine the modlog entries.

    Same as option 1, a new property like removeChildren;

    This is the simplest and best option.

    julian@activitypub.spaceundefined Questo utente è esterno a questo forum
    julian@activitypub.spaceundefined Questo utente è esterno a questo forum
    julian@activitypub.space
    scritto su ultima modifica di
    #21

    I do agree that with_replies, or similar, would be the easiest approach, but I don't think it is the most specific.

    The bool suggests that all replies to a given object are deleted. However, you do not know whether your idea of what the reply tree is matches that of the originating server (which replies are included, etc.?)

    Remove(Context), on the other hand does imply both that the container is deleted, and all of its replies, which are dereferenceable by resolving the context directly. It also has the benefit of being able to provide a pointer to where it was removed from, which is useful.

    So to me it's not just a matter of preference, but that there are additional benefits to Remove

    I will of course concede that it is more work to deliver Remove.

    cc thisismissem

    1 Risposta Ultima Risposta
    0
    • mariusor@metalhead.clubundefined mariusor@metalhead.club

      @julian @jdp23 well, a Delete can be operated on an array of objects. :D

      Send one with all the objects that are affected from the local instance (and probably you must keep in mind that not all replies might be).

      julian@activitypub.spaceundefined Questo utente è esterno a questo forum
      julian@activitypub.spaceundefined Questo utente è esterno a questo forum
      julian@activitypub.space
      scritto su ultima modifica di
      #22

      mariusor@metalhead.club let's ask helge@mymath.rocks what implementor support for Delete(Array) looks like LOL

      mariusor@metalhead.clubundefined 1 Risposta Ultima Risposta
      0
      • julian@activitypub.spaceundefined julian@activitypub.space

        mariusor@metalhead.club let's ask helge@mymath.rocks what implementor support for Delete(Array) looks like LOL

        mariusor@metalhead.clubundefined Questo utente è esterno a questo forum
        mariusor@metalhead.clubundefined Questo utente è esterno a questo forum
        mariusor@metalhead.club
        scritto su ultima modifica di
        #23

        @julian as long as it's in the spec, I don't really care.

        If we all bow to inferior implementations the ecosystem will stagnate. Mastodon's quirks have done enough damage in my opinion. My choice is to be brave and build for the future.

        PS. Not to brag or anything (🤞) but my implementation can operate on activities with arrays as object, actor, etc.

        One thing where you can lead the way (because the threadiverse would really benefit from it) is to accept arrays in inReplyTo (where you put all the ancestors of the current post, not just the parent).

        @helge

        trwnh@mastodon.socialundefined 1 Risposta Ultima Risposta
        0
        • mariusor@metalhead.clubundefined mariusor@metalhead.club

          @nutomic I solved this by having an the instance be an actor that is an intermediary for all operations. All activities get CC'ed to the followers of the user actor, and of the instance actor. (replace instance with community/group, whatever you use as an aggregate element for your implementation)

          This should cover all interested parties imho.

          The potential downside is that instances need to explicitly operate between themselves with follow operations (which conveniently also solves the problem of unwanted interactions with less savory corners of the fediverse).

          Like I said, a problem of addressing. :P

          nutomic@lemmy.mlundefined Questo utente è esterno a questo forum
          nutomic@lemmy.mlundefined Questo utente è esterno a questo forum
          nutomic@lemmy.ml
          scritto su ultima modifica di
          #24

          I'm sure that approach works as well. This would have been worth discussing 4 or 5 years ago when I was just implementing federation in Lemmy for the first time. By now FEP-1b12 is already an established standard which is used by various platforms, and it would be completely unfeasible to replace it with something else.

          mariusor@metalhead.clubundefined 1 Risposta Ultima Risposta
          1
          • nutomic@lemmy.mlundefined Questo utente è esterno a questo forum
            nutomic@lemmy.mlundefined Questo utente è esterno a questo forum
            nutomic@lemmy.ml
            scritto su ultima modifica di
            #25

            I fail to see what the fundamental difference is. If you are unsure about the target with Delete/Object, you can also resolve the context of Object to figure that out. Anyway the instance where the Group is hosted is always the authority, so the state there is the correct one.

            Actually I would rather think of this from a different perspective, namely from the perspective of the mod who clicks the remove button. That would happen when a post is offtopic or violates the rules, and then the intent clearly is to remove all replies as they are not useful. It wouldnt make sense to leave up a single reply two levels deep just because it wasnt included in the context for some reason.

            1 Risposta Ultima Risposta
            1
            • silverpill@mitra.socialundefined Questo utente è esterno a questo forum
              silverpill@mitra.socialundefined Questo utente è esterno a questo forum
              silverpill@mitra.social
              scritto su ultima modifica di
              #26

              @julian This sounds like an implementation detail to me. Some fedi platforms delete a child object when its parent is deleted, others don't.

              If you want to make the removal of a subtree explicit, I'd recommend a Remove where object is an array (similar to what @mariusor suggested):

              Remove(object: Note[], target: Context)
              

              This also helps with migrating away from Announce(Delete). I saw your FEP draft, will provide more feedback once I read it in full.

              @rimu @nutomic @melroy @BentiGorlich

              julian@activitypub.spaceundefined 1 Risposta Ultima Risposta
              0
              • nutomic@lemmy.mlundefined nutomic@lemmy.ml

                I'm sure that approach works as well. This would have been worth discussing 4 or 5 years ago when I was just implementing federation in Lemmy for the first time. By now FEP-1b12 is already an established standard which is used by various platforms, and it would be completely unfeasible to replace it with something else.

                mariusor@metalhead.clubundefined Questo utente è esterno a questo forum
                mariusor@metalhead.clubundefined Questo utente è esterno a questo forum
                mariusor@metalhead.club
                scritto su ultima modifica di
                #27

                @nutomic if you're implying that I should have spoken sooner, I'm pretty sure I did. I remember exchanging messages with both you and @dessalines when you started lemmy...

                I have no specific memory about this topic, but to my recollection lemmy federation was pushed as fait-accomplit at one point without me seeing any previous research on your guys part.

                nutomic@lemmy.mlundefined 1 Risposta Ultima Risposta
                0
                • silverpill@mitra.socialundefined silverpill@mitra.social

                  @julian This sounds like an implementation detail to me. Some fedi platforms delete a child object when its parent is deleted, others don't.

                  If you want to make the removal of a subtree explicit, I'd recommend a Remove where object is an array (similar to what @mariusor suggested):

                  Remove(object: Note[], target: Context)
                  

                  This also helps with migrating away from Announce(Delete). I saw your FEP draft, will provide more feedback once I read it in full.

                  @rimu @nutomic @melroy @BentiGorlich

                  julian@activitypub.spaceundefined Questo utente è esterno a questo forum
                  julian@activitypub.spaceundefined Questo utente è esterno a questo forum
                  julian@activitypub.space
                  scritto su ultima modifica di
                  #28

                  silverpill@mitra.social mm I may have been premature regarding phasing out Announce(Delete).

                  nutomic@lemmy.ml made it clear that it wasn't going anywhere, and I will remove the "backwards compatibility" label from it in my draft.

                  1 Risposta Ultima Risposta
                  1
                  • mariusor@metalhead.clubundefined mariusor@metalhead.club

                    @nutomic if you're implying that I should have spoken sooner, I'm pretty sure I did. I remember exchanging messages with both you and @dessalines when you started lemmy...

                    I have no specific memory about this topic, but to my recollection lemmy federation was pushed as fait-accomplit at one point without me seeing any previous research on your guys part.

                    nutomic@lemmy.mlundefined Questo utente è esterno a questo forum
                    nutomic@lemmy.mlundefined Questo utente è esterno a questo forum
                    nutomic@lemmy.ml
                    scritto su ultima modifica di
                    #29

                    Back then I didnt understand federation so well yet, so its possible that I didnt get what you were saying. And once I got the federation working there wasnt much reason to redo it in a different way which would effectively do the same thing.

                    1 Risposta Ultima Risposta
                    0
                    • thisismissem@hachyderm.ioundefined thisismissem@hachyderm.io

                      @nutomic > Make the target of the Delete an array

                      It technically is because of JSON-LD (everything can be an array), however, software may not support it because it's pretty common for devs to treat AP as JSON instead of JSON-LD, so doing an assessment of compatibility would be suggested

                      trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                      trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                      trwnh@mastodon.social
                      scritto su ultima modifica di
                      #30

                      @thisismissem @nutomic it's not a JSON-LD thing. it's the lack of schematic constraint within the Activity Vocabulary. any property not defined as "functional" can have more than one value.

                      1 Risposta Ultima Risposta
                      0
                      • mariusor@metalhead.clubundefined mariusor@metalhead.club

                        @julian as long as it's in the spec, I don't really care.

                        If we all bow to inferior implementations the ecosystem will stagnate. Mastodon's quirks have done enough damage in my opinion. My choice is to be brave and build for the future.

                        PS. Not to brag or anything (🤞) but my implementation can operate on activities with arrays as object, actor, etc.

                        One thing where you can lead the way (because the threadiverse would really benefit from it) is to accept arrays in inReplyTo (where you put all the ancestors of the current post, not just the parent).

                        @helge

                        trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                        trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                        trwnh@mastodon.social
                        scritto su ultima modifica di
                        #31

                        @mariusor @julian @helge i don't think "all the ancestors" makes sense for inReplyTo. by doing that, you are claiming that your post is a response to every post in the thread above it. multiple inReplyTo still makes sense but should be used only where you are actually responding to certain things. if you want ancestors, define a property "ancestors" which is a list of ancestors ordered in a specific way (like in the mastodon api)

                        mariusor@metalhead.clubundefined 1 Risposta Ultima Risposta
                        0
                        • trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                          trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                          trwnh@mastodon.social
                          scritto su ultima modifica di
                          #32

                          @julian @rimu @nutomic @melroy @BentiGorlich is this a problem? it seems to only be a problem if you require the others to behave exactly as you do. the same "issue" applies to any activity in general. say you send a Delete; the others can do what they want:
                          - purge all children
                          - orphan all backlinked objects
                          - replace with a tombstone
                          - rewrite content to say "this post is deleted"
                          - ignore your activity as unauthorized or invalid or spam

                          the intent could be clearer...

                          trwnh@mastodon.socialundefined 1 Risposta Ultima Risposta
                          0
                          • trwnh@mastodon.socialundefined trwnh@mastodon.social

                            @julian @rimu @nutomic @melroy @BentiGorlich is this a problem? it seems to only be a problem if you require the others to behave exactly as you do. the same "issue" applies to any activity in general. say you send a Delete; the others can do what they want:
                            - purge all children
                            - orphan all backlinked objects
                            - replace with a tombstone
                            - rewrite content to say "this post is deleted"
                            - ignore your activity as unauthorized or invalid or spam

                            the intent could be clearer...

                            trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                            trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                            trwnh@mastodon.social
                            scritto su ultima modifica di
                            #33

                            @julian @rimu @nutomic @melroy @BentiGorlich the complicating factor here is not what other people do, but that you would be using the terms incorrectly or imprecisely according to their definition. this happens all the time in natural language where people sometimes use words they don't fully understand or use them with definitions not matching consensus. it's how we get people saying "literally" for things that are not literal, and other such slang.

                            julian@activitypub.spaceundefined 1 Risposta Ultima Risposta
                            0
                            • trwnh@mastodon.socialundefined trwnh@mastodon.social

                              @julian @rimu @nutomic @melroy @BentiGorlich the complicating factor here is not what other people do, but that you would be using the terms incorrectly or imprecisely according to their definition. this happens all the time in natural language where people sometimes use words they don't fully understand or use them with definitions not matching consensus. it's how we get people saying "literally" for things that are not literal, and other such slang.

                              julian@activitypub.spaceundefined Questo utente è esterno a questo forum
                              julian@activitypub.spaceundefined Questo utente è esterno a questo forum
                              julian@activitypub.space
                              scritto su ultima modifica di
                              #34

                              trwnh@mastodon.social it's less so that I want receivers to do what I want (the ship has sailed on that), but rather that we have the opportunity to provide some guidance on preferred behaviour.

                              What's clear here is that there are going to be two separate actions, "Delete object and all children, recursively", or "Delete object but retain children".

                              We're discussing the best way to represent those two actions.

                              cc rimu@piefed.social nutomic@lemmy.ml silverpill@mitra.social

                              1 Risposta Ultima Risposta
                              0
                              • jenniferplusplus@hachyderm.ioundefined Questo utente è esterno a questo forum
                                jenniferplusplus@hachyderm.ioundefined Questo utente è esterno a questo forum
                                jenniferplusplus@hachyderm.io
                                scritto su ultima modifica di
                                #35

                                @julian @mariusor @helge
                                fwiw, letterbook is fine with that
                                https://github.com/Letterbook/Letterbook/blob/6bf60b1b3d37a8b5d49a1d2554bfd5e4468f00de/Source/Letterbook.Api/ActivityPub/ActorController.cs#L309

                                1 Risposta Ultima Risposta
                                1
                                • trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                                  trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                                  trwnh@mastodon.social
                                  scritto su ultima modifica di
                                  #36

                                  @julian @rimu @nutomic @silverpill well, you typically have no authority over "children", so you can't actually delete them. you can treat them as deleted locally (equivalent to garbage collection for orphan references), but as far as the outside world is concerned, you just deleted one object.

                                  i think people should be more aware that orphaned references can and will happen. i'd personally leave them be. link rot is a thing, and those links aren't necessarily invalid, they're just stale.

                                  trwnh@mastodon.socialundefined 1 Risposta Ultima Risposta
                                  0
                                  • trwnh@mastodon.socialundefined trwnh@mastodon.social

                                    @julian @rimu @nutomic @silverpill well, you typically have no authority over "children", so you can't actually delete them. you can treat them as deleted locally (equivalent to garbage collection for orphan references), but as far as the outside world is concerned, you just deleted one object.

                                    i think people should be more aware that orphaned references can and will happen. i'd personally leave them be. link rot is a thing, and those links aren't necessarily invalid, they're just stale.

                                    trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                                    trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                                    trwnh@mastodon.social
                                    scritto su ultima modifica di
                                    #37

                                    @julian @rimu @nutomic @silverpill put another way, there is no difference between a link that doesn't resolve because the resource was deleted and a link that doesn't resolve because the server was down or a link that doesn't resolve because you don't have authorization to see it. it's just a link that doesn't resolve, as far as you're concerned.

                                    the same thing applies to moderation, not just deletion. a direct link might resolve, but the link is omitted from a curated view.

                                    trwnh@mastodon.socialundefined 1 Risposta Ultima Risposta
                                    0
                                    • trwnh@mastodon.socialundefined trwnh@mastodon.social

                                      @julian @rimu @nutomic @silverpill put another way, there is no difference between a link that doesn't resolve because the resource was deleted and a link that doesn't resolve because the server was down or a link that doesn't resolve because you don't have authorization to see it. it's just a link that doesn't resolve, as far as you're concerned.

                                      the same thing applies to moderation, not just deletion. a direct link might resolve, but the link is omitted from a curated view.

                                      trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                                      trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                                      trwnh@mastodon.social
                                      scritto su ultima modifica di
                                      #38

                                      @julian @rimu @nutomic @silverpill essentially the difference between the two actions only exists internally, not externally.

                                      whether to use a Delete or a Remove is a separate issue of semantics and authority.

                                      whether to use an array of objects is a separate issue of batching and partial failure. semantically, there is no issue. "john deleted 10 posts" makes sense as a statement.

                                      julian@activitypub.spaceundefined 1 Risposta Ultima Risposta
                                      0
                                      • trwnh@mastodon.socialundefined trwnh@mastodon.social

                                        @julian @rimu @nutomic @silverpill essentially the difference between the two actions only exists internally, not externally.

                                        whether to use a Delete or a Remove is a separate issue of semantics and authority.

                                        whether to use an array of objects is a separate issue of batching and partial failure. semantically, there is no issue. "john deleted 10 posts" makes sense as a statement.

                                        julian@activitypub.spaceundefined Questo utente è esterno a questo forum
                                        julian@activitypub.spaceundefined Questo utente è esterno a questo forum
                                        julian@activitypub.space
                                        scritto su ultima modifica di julian@activitypub.space
                                        #39

                                        trwnh@mastodon.social nobody's deleting anything. We're only dealing with removing content.

                                        (Which I now realize I worded incorrectly in OP, heh)

                                        That it's a Delete is incidental (and unfortunate wording)

                                        1 Risposta Ultima Risposta
                                        0
                                        • trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                                          trwnh@mastodon.socialundefined Questo utente è esterno a questo forum
                                          trwnh@mastodon.social
                                          scritto su ultima modifica di
                                          #40

                                          @julian you used the word Delete throughout, so i used the same word. either way, you might consider a policy of treating a context deletion as orphaning all items in the context and then you can optionally garbage-collect them. or not. it's up to you, really!

                                          julian@activitypub.spaceundefined 1 Risposta Ultima Risposta
                                          0

                                          Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

                                          Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

                                          Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

                                          Registrati Accedi
                                          Rispondi
                                          • Risposta alla discussione
                                          Effettua l'accesso per rispondere
                                          • Da Vecchi a Nuovi
                                          • Da Nuovi a Vecchi
                                          • Più Voti


                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          Feed RSS
                                          Deleting a post vs deleting an entire comment tree
                                          @pierobosio@soc.bosio.info
                                          V4.10.1 Contributors
                                          • Accedi

                                          • Accedi o registrati per effettuare la ricerca.
                                          • Primo post
                                            Ultimo post