-
Notifications
You must be signed in to change notification settings - Fork 15
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
Implement Fetch protocol using Document return type #210
Conversation
PR Review ChecklistDo not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed. Trivial Change
Code
Architecture
|
AttributeType attribute_type = 3; | ||
message Leaf { | ||
oneof leaf { | ||
Empty empty = 1; |
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.
New field - nullable entries ( fetch { $x.name }
, where name
is card(0.1)
).
RelationType relation_type = 11; | ||
AttributeType attribute_type = 12; | ||
RoleType role_type = 13; | ||
ValueType value_type = 15; |
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.
We will at some point (soon) introduce fetch
-specific shorthands to retrieve more than the 'basic' information, such as type
, value_type
, and kind
:
fetch {
"x-type": type($x),
"x-kind": kind($x),
"attr-value-type": value_type($attr),
"type kind": kind($type_variable)
}
Encoding these as a general Leaf
is consistent. Now our ConceptDocument.Node
enum is fully "structural", ie only contains Lists, Maps, or Leaves, where everything that can be a leaf is some kinds of concepts, descriptions (like 'kind' or 'value_type'), or Empty.
@@ -32,20 +32,21 @@ message Query { | |||
message Ok { | |||
oneof ok { | |||
Empty empty = 1; | |||
ReadableConceptTreeStream readable_concept_tree_stream = 3; | |||
ConceptDocumentStream concept_document_stream = 3; |
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.
ConceptTree
becomes Document
and readable_concept
has disappeared everywhere!
// TODO: Add Type query_type | ||
// TODO: network optimisation: replace keys with IDs, sending keys in the header to rebuild the document on the client side | ||
// TODO: network optimisation: replace types (== mostly constant strings) with a IDs, sending types in the header to rebuild on the client side | ||
Type query_type = 2; |
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.
Added this already replacing your TODO
// TODO: network optimisation: replace keys with IDs, sending keys in the header to rebuild the document on the client side | ||
// TODO: network optimisation: replace types (== mostly constant strings) with a IDs, sending types in the header to rebuild on the client side |
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.
These are future work , not until benchmarking shows the need to squeeze the network.
Release notes: usage and product changes
We implement Fetch queries, which return concept Document streams.