Email or username:

Password:

Forgot your password?
16 comments
marius

@grishka @activitypub

I've started formalizing what I'm using for filtering on #fedbox into a FEP[1].

> I’d like to discuss an easy way to query a collection, for example, using a well-defined query parameter or an HTTP header. You’d send a request to the collection ID URL, specifying the ID of the object you’re checking for.

In my implementation you use iri={url} of the item you're searching. If it's there you receive a collection with just it as an element.

[1] git.sr.ht/~mariusor/Fediverse-

@grishka @activitypub

I've started formalizing what I'm using for filtering on #fedbox into a FEP[1].

> I’d like to discuss an easy way to query a collection, for example, using a well-defined query parameter or an HTTP header. You’d send a request to the collection ID URL, specifying the ID of the object you’re checking for.

Gregory

@mariusor That's great. Now an interesting question: how does the web framework I'm using handle the same query parameter repeated multiple times?

marius

@grishka let me know if you end up using something like this, and/or if you have comments/feedback for the FEP I linked. :)

marius

@grishka let me know if you end up using something like this, and/or if you have comments/feedback for the FEP draft-draft I linked. :)

Gregory

@mariusor looks good to me, except one nitpick: since you allow querying on arbitrary object fields, the query parameter should probably be called "id", not "iri". Also, what about LD namespacing? Which context is assumed, if any?

Gregory

@mariusor also this could be abused for getting mutual friends (intersecting friend lists). Just gotta send several hundred IDs 😂

marius

@grishka Yes, I must admit I haven't thought the matter all the way through, just the immediate benefits.

I don't see that as abuse, but a good use of the API.

Gregory

@mariusor as VK shows, some people just add everyone as a friend. VK has a limit of 10000 friends per account.

Also, are you sure about *arbitrary* fields? I store everything in a relational database, so I can only really query on fields that have indexes on them unless I'm okay with it going through the entire table row by row (I'm not).

Maybe you should specify a response for when the query client asked for isn't possible to easily satisfy.

marius

@grishka I'm not sure I need to worry about that kind of optimization just yet. Whatever you might think, an individual server will never grow to the size of a VK. Worrying about it before you're 1% of the way there is not going to help you I believe.

Gregory replied to marius

@mariusor individual server? No. Most (all?) fediverse projects won't scale to a typical high-load infrastructure — most you could do is have the DB on a separate server. But you absolutely can have thousands, and even millions, of followers from all over the fediverse. Eugen, for example, has 467586 followers.

Gregory replied to Gregory

@mariusor I have "just" 200 followers on my Smithereen account, and it's already mildly frightening to watch the log as it spams each post at several tens of servers lol

Gregory replied to Gregory

@mariusor what I'm saying is that there's really no upper bound to the length of a collection. Especially when it's a collection that's the publicly-appendable kind. Group members, walls, forum topics, photo albums in groups, all those things. And you don't need a powerful server to host a collection with a million elements either.

marius replied to Gregory

@grishka well, I'm not sure what you're expecting from this. Some filtering is better than no filtering in my opinion.

Go Up