Remodelling Prefix
nodes
#190
romain-fontugne
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
That's actually a good point, I thought this would create more problems, but if we just reverse the order of operations it should work (it should also bypass the automatic creation of the unique contraint). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Currently it is incredibly hard to find the relationship between a
BGPPrefix
and its coveringRIRPrefix
if they are not the same prefix. Because we don't have aPART_OF
relationship between these nodes.However, simply adding this
PART_OF
relationship would not solve the problem. Because each node can have multiple types and if we embed the type of the source/destination nodes in theprefix_types
property we would remodel the graph structure in the property and queries would become overly complicated.Solution
The cleanest solution we can think of is to:
BGPPrefix
1.1.1.0/24 and another node for theRIRPrefix
1.1.1.0/24.PART_OF
relationships between all the different types of prefixes, here we allow prefixes to be of the same size. E.g., theBGPPrefix
1.1.1.0/24 isPART_OF
theRIRPrefix
1.1.1.0/24 and vice versa.PART_OF
relationships between nodes of the same type, but this time only to covering prefixes.This will create some backward compatibilities (see below) but the benefits (possibility to relate different types of prefixes, cleaner modelling, and simplified queries) overweight the inconveniences.
Backward compatibility issues
prefix_types
relationship is not needed anymore. So it will be removed. This is a good thing queries will be easier to write.Prefix
, then a lot of the current queries would still work. For example,(:AS)-[:ORIGINATE]-(:Prefix)
is still valid even though it is not the preferred way to write this pattern. This would also ease the post-processing step where we find out all the prefix types that are in the graph.In this case, we will have multiple
Prefix
nodes with the sameprefix
attribute. This is currently not possible because of the constraint we add when we create the nodes. So we should create nodes using the specific type and then add thePrefix
label (the opposite of what we are doing now).Beta Was this translation helpful? Give feedback.
All reactions