Lemmy-helper as prototype of Lemmy to Lemmy replication of posts/comments by community - back-filling content #4
Replies: 3 comments 3 replies
-
Ok, taking a stab at a URGENT Drastically needed to cope with federation performance scaling problems, API implementation for Lemmy to Lemmy replication. /api/syncshare/comments This focuses on the internals of Lemmy database structure for:
Parameters to these API: dbid - integer database ID key, typically used with > or < than opearation. The site already exposes these raw ID numbers for http://lemmy.ml/post/xxxx to the public, so go forward with that established precedence. api should return a count of records and indicate if the limit is reached. Avoid edge cases where you ask for 300 and get exactly 300 and do not know if you should query for another page. Keep it simple, sally, KISS
|
Beta Was this translation helpful? Give feedback.
-
the Lemmy comments table is an interesting problem. Comments are tied to a post, but with current 0.18.1 era federation - I've raised issues about the timing of that.. Such as, what happens when a post fails to replicate between peer servers and comments do come in (timing issue between sender HTTP retries and sequence).
So query of comments by community and by origin-of-comment (local vs duplicate of a federated comment from another server) is an issue to discuss. |
Beta Was this translation helpful? Give feedback.
-
/api/syncshare/comments What to do about votes. A lot of logic in Lemmy about votes isn't that different from "saves", it is about showing an end-user in the user interlace which posts/comments they have already saved or voted on. A peer server doesn't have that user logging-in to read their own saved and voted posts/comments. So that granular of data isn't needed. |
Beta Was this translation helpful? Give feedback.
-
The command-line interface (CLI) of lemmy-helper is already evolving into a prototype of back-fill for Community posts and comments within Lemmy. I'd like to see the main Lemmy rust add some API for more raw query of the Posts/Comments focused on the internal database record id and published timestamps....
Beta Was this translation helpful? Give feedback.
All reactions