Developers Meeting 7 : A standard way to query in ActivityPub

Meeting Minutes here


Following Developers Meeting 6 : Groups and Improving C2S (ended) :

Please note: Due to upcoming holidays it will be the first TUE of the month, July 5.

(not the second one)

2022-07-05T16:00:00Z

  • 5pm UTC / 12am EST / 9am PST

with an open end.

We had a very long meeting, 2.5 hours.
We spoke about the context field and “Potential Actions attached to objects” and Sebastian demoed approaches to taxonomies. Nilesh Trivedi demoed things which he built from learnawesome.org and an editor for graphs. Will Murphy solved a thing with gup.pe and talked about how immers.space is doing it and Guy started GitHub - guysoft/fedigroup: A federated simple group and Chris Moser does GitHub - yuforium/api: Yuforium API Server and GitHub - yuforium/ui etc.

We discovered further how we can use the context field for Groups and Topics and give meaning to it.
In the next meeting we would like to find a standard way to query and have a look into SPARQL and GraphQL and other possibilities.

Agenda:

  • 5min : 40s-introductions/reintroductions

  • maybe quick brainstorming about the CFP/sessions for Fedi Camp

  • demos

Call For Proposals

Please reply below to propose an agenda item. Please consider doing some ahead-of-time work to articulate the item, and linking it in your proposal so others can come prepared to build consensus or raise objections that we can discuss in our limited time together.

Example Agenda Proposal

PROPOSAL:

Actor (@userOrFediHandle)durationcontent

Read this for more on agendas.


Calendar subscribe

Tuesday Meeting URL / Join here


PS:

Upcoming, August
Bildschirmfoto 2022-06-09 um 17.43.46

The event was announced in German and it will take place “on the ass of the heath”.

It filled quickly, so there is no english version but I’m happy to answer any questions in any language.

Any reason SPARQL can’t be used for this? Would be good not to invent something new unless required.

The reason is that at the moment nobody uses SPARQL.

Would be good not to invent something new unless required.

Said the same in the meeting.

at the moment nobody uses SPARQL

That sounds like a testable hypothesis that can be invalidated by an existence proof. RDF and SPARQL: New in Wolfram Language 12

Argh, in ActivityPub I meant, man.
Fine things do use it of course.

Personally I am using SPARQL each day for https://www.wikidata.org/ and its implementation in redaktor. As I said in the meeting, I like SPARQL (but fine with GraphQL as well) …

I don’t mean to be pedantic. Just trying to understand the argument.

GraphQL Foundation is hosted by Linux Foundation.
Not a bad choice but then you’ll have to convince them to care about rdf (or not).

Still think: just use Sparql.

There’s an argument to be made that sparql is ‘more expressive than needed’ for activitypub use cases.
In that case, profile sparql, i.e. define a subset of sparql that is strictly needed, e.g. some common queries that activitypub deployments need.

Which begs the question?

What do people need to query that isn’t in the AP spec (or other community specs)?

“General purpose querying” is much harder than domain-specific querying. The former is solved by SPARQL, but it’s hard to implement because it’s so general. Let’s learn from that and define the domain-specific queries that people are ostensibly blocked by?

What do people need to query that isn’t in the AP spec (or other community specs)?

Pops up nearly each day, so will ask the next.
Personally same things than e.g. in twitter
“posted before/after/between”
“posted from/to”
“only type=Image”
“context about Harold and Maude or Robert Frank”
etc.

1 Like

I’m using SPARQL! rdf-pub is supporting SPARQL.

I’m struggeling with some issues in the moment and currently the auth server is down ;-(
But in principle you can query the public collection.
There is certainly still a lot to learn and, if necessary, to optimise.
From an authentication point of view, it will be exciting.
I’ll have to test that soon, but at the moment I’m still testing the public collection query.

The karte von morgen (kvm) adapter, that is doing a one way sync kvm → rdf-pub uses “hardcore” SPARQL to check, what entries are already in rdf-pub.

2 Likes

getting all kvm identifiers that are in the public collection
get some activities → the object names are currently bad!

Hey planning to come.
I am currently stuck with fedigoup because

  1. Mastadon is not showing up webfinger queries from it, but Pleroma does. Posted an issue + reproduction code and logs here:
    Account does not show up in search even when webfinger is called · Issue #18741 · mastodon/mastodon · GitHub

And I can’t seem to get a follow activety to work from Pleroma neither.

I am not sure if its a fastapi bug or something I am missing. If anyone could help me out that would be really helpful!

Since the meetup I did manage to deploy guppe groups and reproduce the issue with Pleroma. So we have now logs for that.

1 Like

Meeting Minutes

Super nice meeting, 7 people attended.
In the beginning we talked about an Ontology for the Fediverse
Repository and Pages at redaktor.github.io/vocab in 4 languages

Then we came to the core topic of the meeting and checked out the available alternatives for querying which included
• SPARQL inkl. json-rql
• GraphQL
• JSON-LD Framing Using JSON-LD Framing as a Query Language | david w barratt
and we weighted the Pros and Cons.
The common intent to use SPARQL was clear.

It took three hours until we had a final text.
So, all then remaining 4 people showed (yet) interest in the

Proposal
re. the Spec. section 4.1 Actor objects “The endpoints mapping MAY include the following properties:”

We specify a sparql property in the endpoints object of an Actor for querying the public collection of the AP instance you got the profile from.

Clients must set the content type as specified in the SPARQL specification (1) or to application/ld+json; profile=“ActivityStreams 2.0 Terms”.
In case of the latter this is expecting a query like

{
    "id": "myID",
    "type": ["Query"],
    "@where" : {
        "@type" : "Person", 
        "birthPlace" : { "name": { "@contains" : "London" }  }
    }  
}

The properties for the type Query are defined in json-rql - v0.6.2 | json-rql - v0.6.2


  1. SPARQL 1.1 Protocol

I will inform others about the final proposal.
Notes apart from voting:
It was said that the querying language used (in this case json-rql as default) should be specified in the Query Object to allow for other JSON-based extensions (e.g. GraphQL).


Other Topics

Later steffen brought up another important topic and so;
We did also talked about fedi.camp and doing a Call for Participation.

The problem will be: Fedi Camp is a huge physical camping and the Internet connection is limited.
We will discuss solutions with other organisers like if we do 1 live streaming with 1 camera, 1 mic and 1 projector attached and everyone switches off mobiles. Or if we do async sessions like about Topics or AMAs.
So that developers and users from anywhere can come together.
Then I will write a CFP here.

—-

Thanks to anyone who attended, happy holidays anyone.

boat (boat by hamish)

I found this by accident today. I haven’t looked at it, but it seems to fit the topic and might be interesting for one or the other Introduction | Ontop

Hi all,
currently i’ve trouble with the idea in the proposal :wink:
Because i’m not able to find out the public sparql endpoint, if i make a request with an anonymous user :wink:
I didn’t have an actor/profile to request.

See also: Standard for getting information about a ActivityPub Server

Fredy

Sorry, I do not understand “anonymous user”.
The “actor/profile” is the document where you find the sparql endpoint too.
It is the same document giving you the outbox/inbox/other endpoints.
In ActivityPub every user (Actor) MUST have outbox/inbox …
See #actor-objects

A not authenticated user.
If i didn’t know an actor on an instance, but want to query the public collection.

Ah, I see.
Well, this is not specified either anywhere. So I can only tell how it will work in redaktor:
Any instance in redaktor is itself a Group Actor.
This means if you ask the instance root URL it would deliver the ActivityStreams Actor representation in response to
application/ld+json; profile="https://www.w3.org/ns/activitystreams"

There you have sharedInbox.

Does that make sense in general or does a better way comes to anyones mind?
In my Opinion any instance should be reachable as an Actor anyway.
Then you can speak in the name of your instance and also do things like federated search.

PS: sorry for responding slowly, träwelling Deutsche Bahn much this week.

Hm, that an AP instance is an actor makes sence.
But in my opinion it’s more a application than a group.

Well, redaktor is itself an Application but a redaktor instance is
{"type": ["Group", "Service"]}
Just updated the Vocabulary Ontology with the new skohub branch.
I will document semantics there next week.

We tossed that idea around for a while here and decided that we shouldn’t put any constraints on the instance actor. Some may wish to present as a Group, some as an Application or Service, possibly even an Organization, and some perhaps as a Person (e,g, the admin).

We do not provide anything like a “public collection” which enumerates the site members. I’m not opposed to the idea, however if it existed, it must conform to local privacy expectations so people can choose to be unlisted in the site collection and the site admin can choose not to provide it at all.