w3c / activitystreams

Activity Streams 2.0
https://www.w3.org/TR/activitystreams-core/
Other
276 stars 61 forks source link

`as:Replace` proposal: something replaced something else #538

Open pietercolpaert opened 1 year ago

pietercolpaert commented 1 year ago

Type of issue: Question

Issue description

At this moment, only as:Update exists, without any specified modification system. I wonder if a as:Replace could help to describe a very simple way to update something through deprecation and fully overwriting it.

Example of what is proposed

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Replace",
  "summary": "Sally updated her note 1 from v1 to v2",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/notes/1",
  "origin":  "http://example.org/notes/1/v1",
  "target": "http://example.org/notes/1/v2"
}

Proposed text

URI: https://www.w3.org/ns/activitystreams#Replace Notes: Indicates that the actor has updated the object from a certain state (origin - optional) to another (target). Properties: Inherits all properties from Activity.

pietercolpaert commented 1 year ago

An alternative design could be using as:Update, but attaching semantics to origin and target when they’re set.

csarven commented 1 year ago

I think there are different but related cases here depending on the object in question.

The atomic activity is to Create object B and indicate that object A is a predecessor-version.

Server processing the activity may want to update object A to indicate that object B is a successor-version.

When the object of an Update activity is deemed to be latest-version, the server can update the associated predecessor-version and successor-version objects.

evanp commented 1 year ago

I don't think we have a clear answer for this question.

We have a number of properties that could provide the necessary information about an Update activity, namely, the version before the update, and the version after the update.

I can think of at least context, result as good candidates. However, there's not clear guidance from the AS2 spec; in fact, it's deliberately left vague.

One option for moving forward is to define guidance on using existing properties for "before" and "after".

A more rigourous approach would be creating a new extension with properties with specific semantics for beforeVersion and afterVersion.

This would probably be a good FEP unless it's something we want to work on in the SocialCG.

@pietercolpaert if this resolves your question, please feel free to close it and start the process for a FEP, etc.

pietercolpaert commented 1 year ago

@csarven I think the atomic version is really to replace the content related to notes/1 with notes/1/v2. If the server is still interested in keeping the history, it can optionally keep an event log based on this? I would leave defining what object gets links to its predecessor or successor up to the server to decide.

pietercolpaert commented 1 year ago

@evanp I’m not working on social media/fediverse use cases. I am using the activity streams vocabulary for data management of various collections of members (see Linked Data Event Streams), so I’m not interested in creating a FEP.

I currently don’t understand why as:Update couldn’t, in accordance with the other collection and content management activities, be seen as something that changes an object from → to. Any idea why the initial decision was made to keep the semantics of origin and target on top of as:Update undefined?

evanp commented 1 year ago

I can't remember. Is the reason important? You could check the meeting minutes archives.

It's clear in the spec that those properties are explicitly undefined.

If you're not interested in writing a FEP, there may be other ways to do a profile, like a SocialCG note.

It may make sense to package it with a history property, since they're related.

pietercolpaert commented 1 year ago

Ok, just for reference linking the related issue on history here: https://github.com/w3c/activitystreams/issues/539

evanp commented 1 year ago

@pietercolpaert are you available to start work on this definition?

pietercolpaert commented 1 year ago

@pietercolpaert are you available to start work on this definition?

Taking a holiday now, but I’m available in August. Can I do a PR here with a first proposal?

evanp commented 9 months ago

No, the right place to define Replace would be in a FEP. You should check here for process:

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

pietercolpaert commented 9 months ago

But see https://github.com/w3c/activitystreams/issues/538#issuecomment-1562553560 → I’m not working on a fediverse related project, I’m only using the vocabulary

pietercolpaert commented 9 months ago

Documenting the outcome of a follow-up discussion in a private thread:

There isn’t a process for making normative changes to only the Activity Streams 2.0 Vocabulary. We should draft an extension of AS that may be incorporated into the AS2 context doc; see the policy over here: https://w3c.github.io/activitystreams/draft-extensions-policy.html

First step for me is thus to document the vocabulary, use a namespace, and implement it.