Skip to content
  • Categories
  • Recent
  • Popular
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

NodeBB-ActivityPub Bridge Test Instance

  1. Home
  2. Categories
  3. General Discussion
  4. AP Test (community.nodebb.org)
  5. Unique activity IDs

Unique activity IDs

Scheduled Pinned Locked Moved AP Test (community.nodebb.org)
activitypub
4 Posts 4 Posters 73 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.
  • julian@community.nodebb.orgJ This user is from outside of this forum
    julian@community.nodebb.orgJ This user is from outside of this forum
    julian@community.nodebb.org
    wrote on last edited by
    #1

    Is there a requirement that an activity ID be unique?

    Reason why I ask is it seems prudent to save a list of encountered activities, and drop those that have been seen before.

    However that caused me to run head-first into a NodeBB regression because we ourselves don't actually send unique activity IDs.

    For example, a Follow-Undo(Follow)-Follow chain would have the two Follows with the same ID, since we just construct them ad-hoc based on request data.

    Easy fix is to throw in a timestamp there, but it got me wondering about whether there were uniqueness expectations at all, or whether I was being overzealous in checking for it.

    hrefna@hachyderm.ioH evan@cosocial.caE silverpill@mitra.socialS 3 Replies Last reply
    1
    • julian@community.nodebb.orgJ julian@community.nodebb.org

      Is there a requirement that an activity ID be unique?

      Reason why I ask is it seems prudent to save a list of encountered activities, and drop those that have been seen before.

      However that caused me to run head-first into a NodeBB regression because we ourselves don't actually send unique activity IDs.

      For example, a Follow-Undo(Follow)-Follow chain would have the two Follows with the same ID, since we just construct them ad-hoc based on request data.

      Easy fix is to throw in a timestamp there, but it got me wondering about whether there were uniqueness expectations at all, or whether I was being overzealous in checking for it.

      hrefna@hachyderm.ioH This user is from outside of this forum
      hrefna@hachyderm.ioH This user is from outside of this forum
      hrefna@hachyderm.io
      wrote on last edited by
      #2

      @julian That's… an excellent question.

      So the requirement as I understand it is that the id must be publicly resolvable, which would imply a uniqueness constraint.

      Still, the verbage doesn't say that it must be a publicly resolvable _to the object in question_ IIRC? I'd have to look this up to confirm it and am not in a position to do so right now, but that's an interesting question.

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

        Is there a requirement that an activity ID be unique?

        Reason why I ask is it seems prudent to save a list of encountered activities, and drop those that have been seen before.

        However that caused me to run head-first into a NodeBB regression because we ourselves don't actually send unique activity IDs.

        For example, a Follow-Undo(Follow)-Follow chain would have the two Follows with the same ID, since we just construct them ad-hoc based on request data.

        Easy fix is to throw in a timestamp there, but it got me wondering about whether there were uniqueness expectations at all, or whether I was being overzealous in checking for it.

        evan@cosocial.caE This user is from outside of this forum
        evan@cosocial.caE This user is from outside of this forum
        evan@cosocial.ca
        wrote on last edited by
        #3

        @julian there is absolutely a uniqueness expectation in there.

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

          Is there a requirement that an activity ID be unique?

          Reason why I ask is it seems prudent to save a list of encountered activities, and drop those that have been seen before.

          However that caused me to run head-first into a NodeBB regression because we ourselves don't actually send unique activity IDs.

          For example, a Follow-Undo(Follow)-Follow chain would have the two Follows with the same ID, since we just construct them ad-hoc based on request data.

          Easy fix is to throw in a timestamp there, but it got me wondering about whether there were uniqueness expectations at all, or whether I was being overzealous in checking for it.

          silverpill@mitra.socialS This user is from outside of this forum
          silverpill@mitra.socialS This user is from outside of this forum
          silverpill@mitra.social
          wrote on last edited by
          #4

          @julian Yes, IDs should be unique:

          >All Objects in [ActivityStreams] should have unique global identifiers. ActivityPub extends this requirement; all objects distributed by the ActivityPub protocol MUST have unique global identifiers, unless they are intentionally transient

          -- https://www.w3.org/TR/activitypub/#obj-id

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


          • Login

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