I assume that using the node with the highest degree would be a good starting point for finding the longest path also this should be useful for community detection and centrality. I have noticed that Neo4j do not store the degree of nodes as a property. It would be relatively inexpensive operation to just store this value when ever an edge was added.
Anyone know if this approach has been used in the past and why what appears to be a very useful metric is being ignored?
@whoiskieran
I have noticed that Neo4j do not store the degree of nodes as a property
not entirely true. We store on each node metadata which reports
# of relationship
# of releationships by type
# of relationships by type and direction
Although no Neo4j version details were provided in initial post if you run
PROFILE MATCH (n {id:123}) return count { (n)-[:FOLLOWS]->() } ;
this will utilize the metadata and not iterate over all FOLLOWS relationships for the given node and count 1 by 1. From the PROFILE you will see a reference to getDegree as evidence