feat: add primitive type based Read Dao interface #319
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.
Summary
Approach Trade-Off
Walk through possible approaches where one generic API that can support multiple metadata entities.
Part A. Rest.li model
Part B. Dao
T
from Dao level to method level, so that we don't need to register multiple Dao.Conclusion
My preference is A.2 and B.3. A.1 is a legacy concept we moved away from. I prefer B.3 since it has a clear decouple between dao and API layer. Through the offline discussion with @yangyangv2, I want to acknowledge that we need to have good input validation and a base client library that can ease (de)serialization for users.
Following two sequence diagram demonstrate the flow.
Read sequence diagram. Following prs will implement this flow.
urn
,aspect
(FQCN),metadata
are string typeWrite sequence diagram. Write will not be prioritized for now but listed to make sure it's future-proof.
urn
,aspect
(FQCN),metadata
are string typeChecklist