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

AS2 Ontology: Add missing ActivityPub definitions #571

Open
1 of 5 tasks
steve-bate opened this issue Dec 27, 2023 · 11 comments
Open
1 of 5 tasks

AS2 Ontology: Add missing ActivityPub definitions #571

steve-bate opened this issue Dec 27, 2023 · 11 comments

Comments

@steve-bate
Copy link

steve-bate commented Dec 27, 2023

Please Indicate One:

  • Editorial
  • Question
  • Feedback
  • Blocking Issue
  • Non-Blocking Issue

Please Describe the Issue:

Although ActivityPub is not part of ActivityStreams 2.0, the related vocabulary is included in the normative AS2 JSON-LD context. The related OWL definitions should also be added to the AS2 ontology file (or equivalent, such as a side-car file).

@evanp
Copy link
Collaborator

evanp commented Dec 27, 2023

So, I have questions! First of all, does it make sense for us to include all those definitions in the OWL file? I know it's helpful for the JSON-LD context file because then you just have to link the one big document. Is that as much of an issue for OWL? Or should we instead have an activitypub OWL file that is separate?

@evanp
Copy link
Collaborator

evanp commented Dec 27, 2023

The second thing I'll ask is that I'd love to get some help from volunteers on making these changes, IF we decide to do it. I'd rather no one do the work before we're sure it's necessary, just in case we swing the opposite way. I feel like this needs more discussion, and preferably some discussion at a CG meeting.

@csarven
Copy link
Member

csarven commented Dec 27, 2023

I don't think AP should have its own RDF/OWL just because AP uses the AS namespace.

Generally anything (within the context of a standard community / development body acknowledging it) that refers to the AS namespace should make its way into the source document. This is no different than terms being added to the HTML representation of https://www.w3.org/ns/activitystream . Note how it mentions AP and DID Core under "Extensions", in addition to AS.

Just to be clear regarding "we" (and some friendly caution): a term getting added to the AS2 JSON-LD context, the HTML, or the RDF/OWL representations, is not necessarily or entirely a Social Web CG decision but moreso a mutual understanding between communities using the space. Terms can be added provided it ticks all the boxes. ( See related discussion: w3c/ns#2 (comment) pending feedback from W3C Team for more clarity on this matter).

If an AS-based term is in the JSON-LD context document, it is already acknowledging the https://www.w3.org/ns/activitystreams# namespace. It is more about what representations are available from that URI ( cough cough related discussion: #416 (comment) ).

All that said, I think we should add the missing terms from AP as well as DID Core to the AS2 RDF/OWL.

@steve-bate
Copy link
Author

There are also widely-used terms in the AS2 namespace that are not part of the normative context (manuallyApprovesFollowers, sensitive, HashTag, movedTo). My focus, for now, is only on the normative AS2 terms.

@steve-bate
Copy link
Author

The second thing I'll ask is that I'd love to get some help from volunteers on making these changes, IF we decide to do it. I'd rather no one do the work before we're sure it's necessary, just in case we swing the opposite way. I feel like this needs more discussion, and preferably some discussion at a CG meeting.

I have some OWL definitions for ActivityPub already in my repo (very much WIP). My plan with the PRs I've submitted here was to address the easy/trivial issues before continued work on the AP changes. I agree that there's going to need to be some discussion about how to model some aspects of the AP extensions in OWL. I'm willing to help where I can.

@cristianolongoodhl
Copy link

Namespace is a relevant matter. For linked data and fair ontologies principles, accessing the URL of a property or a class one expects to get the property or class definition, depending on the value of the Accept header. For example, performing a GET request to https://www.w3.org/ns/activitystreams#target (i.e. as:target) with accepting text/html one would expect to get the textual description of the property in html format. Analogously, accepting the mime type for owl ontology one usually get the owl file where the property (or class) is defined. Defining additional constraints in a novel ontology, with its own namespace, where terms for other ontology are reused is quite usual. In this case a good practice would be to use the owl import mechanism to link the ontology where these terms are defined, but it is not mandatory. But, the case of activity pub is quite complex as it defines new properties (e.g. inbox) in the activity streams namespace. I have no suggestions about how to fix it. However, I would very glad to help in the development of an owl ontology for activity pub and activity streams, provided that commitments are clear.

@cristianolongoodhl
Copy link

With a fast search, I found two w3c documents about the topic:

  1. Principles of Good Practice for Managing RDF Vocabularies and OWL Ontologies and
  2. Best Practice Recipes for Publishing RDF Vocabularies.

In addition, I mention also Best Practices for Publishing Linked Data, which may be related.

Here I report a part of interest from the first mentioned document:

Where the resources that are the members of an RDF vocabulary are denoted by HTTP URIs, an HTTP GET request with the header field "accept=application/rdf+xml" against that URI should return an RDF/XML serialisation of an RDF graph that includes a description of the denoted resource.

Referencing only to the rdf+xml serialization probably should be considered outdated, so that this requirement should be extended to allow any of the rdf serializations.

Concluding, I think that in our case the only requirement we should meet is that when one deference any of the entities in activity pub or in the activity stream core, an rdf document which contains the description of the entity should be returned.

@cristianolongoodhl
Copy link

Considering that ActivityPub is an extension approved by the working group (see https://www.w3.org/ns/activitystreams#activitypub), an unusual but suitable solution may be

  • place activity pub definitions in a novel file available on the web
  • include this in activitystreams2.owl via an ontology import declaration.

@nightpool
Copy link
Collaborator

We are committed, non-normatively but still in the TR spec, to providing an RDF ontology for the as2 vocabulary. Providing a machine-readable ontology for all of the extensions and stuff in the context file is extreme scope creep and I don't think this community group should try and undertake it. What ends up being a "useful" ontology is so specific to what projects people are trying to work on and what ecosystems they use (For example, go-fed's ontology which does cover AP and AS2 and lots of extensions has to my knowledge never been reused by anyone outside of that project) that I don't think it's possible for the community group to provide an ontology that manages to be "everything to everybody". We can continue to provide the ontology for the items listed in https://www.w3.org/TR/activitystreams-vocabulary/, but I think a non-standards community org would be better suited to pick up the project of defining ontologies for other specs (probably multiple such orgs for different use-cases)

@csarven
Copy link
Member

csarven commented Apr 11, 2024

Generally any extension that is normatively referenced from a W3C specification, e.g., AP, DID, can be added to:

  • ActivityStreams 2.0 Terms
  • AS2 JSON-LD context
  • AS2 vocabulary (RDF/OWL)

To be clear, whether a particular implementation's ontology is used or not has no bearing on it being merged into AS2's. It is not any random thing out there that's squatting a term under the as2 namespace or adding something into their copy of the JSON-LD context or anything for that matter has any right. If there are new terms / extensions and so forth that's desired to be officially part of the AS2 material, they need to go through the process of having it picked up by a specification (in a nutshell).

That aside, projects can do whatever they need to in their own space.

@cristianolongoodhl
Copy link

I agree with the last two comments, however this issue focuses of ActivityPub, which is an official extension of as2, as one can see in https://www.w3.org/ns/activitystreams#x4-extensions, and whose terms are in the same namespace of as2.

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

5 participants