igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [igraph] persisting graphs


From: venura.2.mendis
Subject: RE: [igraph] persisting graphs
Date: Thu, 18 Sep 2008 17:20:00 +0100

Thanks for the info Tamas. Shelves do look quite cool. Every other day I
discover another good thing about python!

The only problem is for my application I would like to query multiple
graphs. i.e. select a number of graphs that contain a given vertex
label. I can do this in memory currently but I would like to develop a
more scalable solution. Hence I was thinking by storing it as XML I
could query the graphs and select the ones I want. I could also
serialise the graphs and store them in a relational DB but thought this
would be wasteful given the structure of graphs.

Thanks,
Venura

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf
Of Tamas Nepusz
Sent: 17 September 2008 16:40
To: Help for igraph users
Subject: Re: [igraph] persisting graphs

Hi,

It depends on the size of your graph -- GraphML can be a waste of space
due to its verbose syntax. You might consider gzipping the GraphML file
after saving and before retrieving, but that adds a speed penalty. GML
seems a good compromise for me between GraphML and plain edge list
representations: GML is able to handle attributes and such and it still
takes less space.

OTOH, if you are using Python only and the only place where you load or
save your graph objects is Python, you might consider Python
serialisation and the shelve module:

http://docs.python.org/lib/module-shelve.html

This allows you to store an arbitrary number of Python objects
(including igraph graphs) on disk and retrieve them by key as needed.

-- 
Tamas

On Wed, 2008-09-17 at 16:33 +0100, address@hidden wrote:
> Hi,
> 
> Can anyone recommend the best way to store/persist an igraph object?
Is
> it writing a Graphml file or equivalent to the filesystem? Or is there
a
> better way. I was thinking of generating a graphml file and storing it
> on a native xml database. This would let me run xqueries on the graphs
> and load the ones that I want.
> I'd appreciate any comments.
> 
> Thanks,
> Venura  




_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

[Prev in Thread] Current Thread [Next in Thread]