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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add remote resource support #2
base: main
Are you sure you want to change the base?
add remote resource support #2
Changes from 10 commits
e767624
8b1237e
034c3dc
dd63456
5448bd2
41abcca
a3168c8
5125d33
5ed1756
f8d670a
4b5369f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your tests you always know before hand if you're dealing with a local or remote resource.
I feel like maybe there should be a
public Resource GetResource()
method whereResource
aggregates the local and remote resource looks something like:I suppose a Harmony user could implement it themselves. A join is probably trivial if projected tables are enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that's a good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there was a slight misunderstanding.
You added a
GetResources()
(plural). My suggestion was for looking up a single resource.I'm thinking about the case where I have a specific Resource ID, but I don't know if it's local or remote (or both), so I'd like to be able to get a
CrdtResource
just for that one resource.a
GetResource()
would also cover up the fact that local and remote resources are queried differently, which would be a small bonus.Can we do the join in SQL? I guess it doesn't matter for
GetResources()
(plural), because everything ends up in memory anyway.Also I wonder if
CrdtResource
is a misleading name: the local-resources are explicitly non-crdt values, because they're local only. 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh ok, that makes sense, yeah I can easily make that API (probably on top of the one I just made for now).
As for the name. Yeah that's true, I don't want to use just Resource as the class name as that's way too generic and there's other dotnet classes with the same name so I don't want the confusion. So maybe HarmonyResource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right
Resource
is heavily used 😆.I like
HarmonyResource
except for the fact that it would be the first type to use the wordHarmony
in it. 🤔Some more ideas:
UnifiedResource
HybridResource
Hybrid sounds coolest, but I think it almost sounds too cool and fancy.
Personally, I think I'd opt for
UnifiedResource
.