Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

as:Replace proposal: something replaced something else #538

Open
pietercolpaert opened this issue May 8, 2023 · 12 comments
Open

as:Replace proposal: something replaced something else #538

pietercolpaert opened this issue May 8, 2023 · 12 comments

Comments

@pietercolpaert
Copy link

pietercolpaert commented May 8, 2023

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
Copy link
Author

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

@csarven
Copy link
Member

csarven commented May 11, 2023

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
Copy link
Collaborator

evanp commented May 24, 2023

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
Copy link
Author

@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
Copy link
Author

@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
Copy link
Collaborator

evanp commented May 25, 2023

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
Copy link
Author

Ok, just for reference linking the related issue on history here: #539

@evanp
Copy link
Collaborator

evanp commented Jun 7, 2023

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

@pietercolpaert
Copy link
Author

@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
Copy link
Collaborator

evanp commented Sep 26, 2023

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
Copy link
Author

But see #538 (comment) → I’m not working on a fediverse related project, I’m only using the vocabulary

@pietercolpaert
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants