0

I have a question about the BSF algorithm implementation in Memgraph. Are shortest path calculations optimized to work with dynamic and streaming graphs? In my data set, the number of nodes and edges will grow. I need to maintain a table of shortest path hops from a set of nodes. If I use Memgraph, will BFS be re-run each time or does Memgraph only traverse nodes relevant for shortest path updates?

KWriter
  • 1,024
  • 4
  • 22

1 Answers1

0

Memgraph has a bunch of stuff on the streaming side, but the current implementation of BFS is not incremental/dynamic. But, you can easily compose the solution by using BFS (https://memgraph.com/docs/memgraph/reference-guide/built-in-graph-algorithms#breadth-first-search), triggers (https://memgraph.com/docs/memgraph/how-to-guides/set-up-triggers), and query modules (https://memgraph.com/docs/memgraph/how-to-guides/query-modules)

It's not BSF, but there is something very similar in the streaming example (https://github.com/memgraph/example-streaming-app/blob/main/memgraph/queries/create_update_neighbors_trigger.cypher)

KWriter
  • 1,024
  • 4
  • 22