Introducing New Fediverse Software, Goofed v0.0.1, Minimum Viable Shitpost Edition
https://scrapetacular.ydns.eu/activities/50114ac8-fd26-47cd-8fe0-ad97f0027c5e
Introducing New Fediverse Software, Goofed v0.0.1, Minimum Viable Shitpost Edition
https://scrapetacular.ydns.eu/activities/50114ac8-fd26-47cd-8fe0-ad97f0027c5e
That sounds pretty fun, I like your extremist take on things.
If you want to federate votes in an efficient way, consider doing them in batches, like this - https://codeberg.org/rimu/pyfedi/src/branch/main/docs/fep-4248.md. Sending batches means building up a queue, etc which is a pain in the ass so you might want to just receive batches and send individually.
You can do nested comments more efficiently by doing a single query for all the comments on a post and then constructing the comment tree in Go, rather than using multiple SQL queries. It’s a bit tricky to code but you can copy PieFed’s code - https://codeberg.org/rimu/pyfedi/src/commit/68d6799be5c321f9abf84d136cafef6de6e3aafb/app/post/util.py#L141
Whoa senpai noticed me. There actually is a recursive query format in the latest sqlite for this exact situation, Postgres may have something similar, I just thought a list is fine for the web UI. I’ll have to benchmaxx and pick a strategy for the API.
I actually read that FEP. In my code that is too shameful to release yet, I look for an Object, then look for its Type, then figure out how to deserialize the rest of the object, but this object doesn’t have one. Would it be possible to do something like this:
{
"object": {
"type": "LikeCollection",
"likes": [like1, like2, ..etc]
}
}
Or is that weird. Spare a thought for those in less dynamic languages :D
There is a discussion but it’s an email chain between myself, Lemmy, Mbin, NodeBB so not really out in the open.
I’m thinking of using the normal OrderedCollection structure that AP has - https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection. An object of type ’OrderedCollection’ with an array of ‘items’.
I think so? I guess a Like has to happen before an Unlike, would the collection have multiple possible activity types in it?
While I have your ear, I don’t know how yet but I’d like it to be easier for devs to collaborate over AP for anything not involving security.
Yes theoretically you could have any type in there but votes are the biggest inefficiency in the system so I’ve only implemented it for them.
There are some nodebb forums that federate with us, which are intended for AP dev discussions - [email protected] for example. Not very active. Also some Matrix channels, again not exactly humming. Everyone is pretty focused on their own projects, really.