Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For early review and testing with Pubky Nexus, this PR adds a feed of events (PUT and DELETE) for added or deleted files.
The API works as follows:
<homeserver base URL>/events/
(note the trailing/
)text/plain
response, made out lines separated with\n
charcursor
to be used for the next request. You should be able to parse it by getting the last 13 characters in the body.PUT
orDEL
followed by a space char then the pubky URL for the resource.limit
andcursor
query params, no reverse.The assumption, is that you will keep making requests until you get a response with header
content-length
= zero. Then you back off, and make the next request after some interval, if you don't, we will eventually add a rate-limiting anyways.Things left to discuss:
pubky-cursor
instead of last line? I am trying to avoid JSON because I dislike it as a dependency, especially when it is not needed.This is a stopgap or at least an incomplete solutions, since it only works for
realtimesync, but it fails in two situations:For both these cases, we simply have to use set-reconciliation, and for that, we need a Merkle tree of sorts.