-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This aims to fix the super node problem by introducing proxy nodes (which works like the partition node before), except that we introduce proxy nodes in application layer only when needed. This commit focuses on how to make users a seamless use experience as if the proxy node does not exist. What is not clear right now is, if A is a super node, and A connects to a number of vertices with different labels (and possibly different properties like timestamp). Let's say we have a proxy node for A, Vpa, then how many edges should we create between Va and Vpa? 1) Create 0 edge between Va and proxies. We store id(Vpa) as a vertex property in Va. Every time we need to traverse from Va, we always fetch Vpa, and do the traversal from there. Let's say Va -.-.-.-> Vpa -------> Vb, then when we traverse from Vb, we will find Vpa first, and then we retrieve Va because Vpa is just a proxy for Va. This is very similar if not exactly the same as vertex-cut partition in JanusGraph. 2) Create 1 edge between Va and each Vpa. No specific benefit; drawback is, this edge will be queried, which means we need to remove this edge. 3) Create 1 edge per label between Va and and each Vpa. Benefit is that for queries with label constraint that does not apply here, we don't even need to traverse Vpa because it won't be found with this label. Drawback is also very obvious, if Vpa ---label1---> Vb1, and Vpa ---label2---> Vb2, then if we traverse from Vb1 to Va, we will see two edges, unless we somehow see that we use label1 to go from Vb1 to Vpa thus we shall only use label1 to go from Vpa to Va. This is very cumbersome so we shall not use it. This commit actually uses 3) which makes it very difficult to pass all tests. 4) Create one proxy node for a particular edge type (label + props). Suppose edges are all very similar except for a few properties. Then for each unique edge type, we create a proxy node. Benefit is we can fully utilize VCI because these edges actually represent all physical edges. Drawback is this is very application-specific. For example, if we only need rundate in traversal, then one or more proxy nodes will represent a particular rundate. If original query is g.V(Va).outE().has("rundate", "20210512").inV(), then we can utilize VCI for rundate on Va. Note that there is only 1 edge between Va and each proxy node. Another big challenge of 2, 3, and 4 is how to control edge traversal. If Vpa connects to Vb1 and Vb2, we must avoid wrong traversal from Vb1 to Vb2 via Vpa (when the user aims to traverse from Vb1 to Va), which is difficult in practice. This commit uses option (1): Create proxy nodes but don't draw connection between canonical node and proxy node Signed-off-by: Boxuan Li <[email protected]>
- Loading branch information
Showing
13 changed files
with
328 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.