Re: [GENERAL] Efficiently storing a directed graph

2008-03-01 Thread Joe Conway
Kelly Jones wrote: I have a directed graph (nodes and edges) that I want to store "efficiently": given two nodes, I want to quickly find the shortest path between them. The graph is NOT acyclic (it's not a tree), is fairly "sparse" (about 1 edges for 2500 nodes), and changes occasionally. I

Re: [GENERAL] Efficiently storing a directed graph

2008-03-01 Thread Adam Rich
> I'm not married to using SQL: are there other efficient solutions to > store directed graphs? Could I hack something up in Perl or Ruby and > then serialize my in-memory graph to a file (for efficient > saving/reloading)? As far as a perl solution, I would suggest posting your problem on perlmon

Re: [GENERAL] Efficiently storing a directed graph

2008-03-01 Thread Peter Brawley
Kelly, I'm not married to using SQL: are there other efficient solutions to store directed graphs? Could I hack something up in Perl or Ruby and then serialize my in-memory graph to a file (for efficient saving/reloading)? Did you look at Dijkstra's algorithm? - Kelly Jones wrote: I hav

[GENERAL] Efficiently storing a directed graph

2008-03-01 Thread Kelly Jones
I have a directed graph (nodes and edges) that I want to store "efficiently": given two nodes, I want to quickly find the shortest path between them. The graph is NOT acyclic (it's not a tree), is fairly "sparse" (about 1 edges for 2500 nodes), and changes occasionally. I know PostgreSQL/MySQL