Use trait instead of channel for API between node and doc crate#67
Merged
Conversation
5a21c87 to
af005f3
Compare
d83cbe6 to
5b76688
Compare
Merged
5b76688 to
d3785bd
Compare
adzialocha
approved these changes
Apr 24, 2025
Member
adzialocha
left a comment
There was a problem hiding this comment.
Looking all good! Thank you for this refactoring, you successfully reduce the channel surface as much as possible 😎
I only have minor comments.
This also renames the `aardvark-node::Document` to `aardvark-node::DocumentId`, since we now have the `SubscribableDocument` trait it should return a `DocumentId` not a `Document` that is actually only an id.
d3785bd to
daecc46
Compare
Creating and subscribing to a loro doc is quite straight forward. I think having an abstraction between the `Document` and loro makes the code unnecessarily more complicated. Also if we decide to run the CRDT in a distinct thread we can use the `Document` object directly since it's Send+Sync.
daecc46 to
23b2391
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.