I have been playing around with Rexster lately for graph requirements
in my web product. I'm trying to use it in a ruby on Rails project by
tweaking ActiveResource to interact over REST. So far, I'm finding it
perfect for all my product requirements. :)
However, database backup is one of the major concerns while choosing
an API abstraction layer for any database. I could not find any
documentation touching topics related to database backups and
importing backed-up data with Rexster.
It would be great if someone could point me to a documentation link
for reference.
P.S.: I remember stumbling upon a forum/thread mentioning similar
functionality (export/import graph to and from a csv file) available
via rexster-console, but I can't find it anymore.
> I have been playing around with Rexster lately for graph requirements > in my web product. I'm trying to use it in a ruby on Rails project by > tweaking ActiveResource to interact over REST. So far, I'm finding it > perfect for all my product requirements. :)
> However, database backup is one of the major concerns while choosing > an API abstraction layer for any database. I could not find any > documentation touching topics related to database backups and > importing backed-up data with Rexster.
> It would be great if someone could point me to a documentation link > for reference.
> P.S.: I remember stumbling upon a forum/thread mentioning similar > functionality (export/import graph to and from a csv file) available > via rexster-console, but I can't find it anymore.
> I have been playing around with Rexster lately for graph requirements > in my web product. I'm trying to use it in a ruby on Rails project by > tweaking ActiveResource to interact over REST. So far, I'm finding it > perfect for all my product requirements. :)
> However, database backup is one of the major concerns while choosing > an API abstraction layer for any database. I could not find any > documentation touching topics related to database backups and > importing backed-up data with Rexster.
> It would be great if someone could point me to a documentation link > for reference.
> P.S.: I remember stumbling upon a forum/thread mentioning similar > functionality (export/import graph to and from a csv file) available > via rexster-console, but I can't find it anymore.
However, I'm getting an error while trying to load this GraphML using
g.loadGraphML(filename)
rexster[groovy]> g.loadGraphML('graph.xml') ==>An error occurred while processing the script for language [groovy]: javax.script.ScriptException: java.lang.RuntimeException: id is a reserved property key
Similar behavior for load/saveGraphSON . I'm using rexster-0.8-SNAPSHOT.
It seems that you are using Rexster console. In that case, your code is executed at the server side via RexPro. The path is therefore relative to the Rexster server directory.
You may also use an URL instead of a filename:
g.loadGraphML(URL)
HTH, Pierre
On Wed, Feb 8, 2012 at 2:39 PM, Nikhil Lanjewar <nikhil010...@gmail.com>wrote:
> However, I'm getting an error while trying to load this GraphML using
> g.loadGraphML(filename)
> rexster[groovy]> g.loadGraphML('graph.xml') > ==>An error occurred while processing the script for language [groovy]: > javax.script.ScriptException: java.lang.RuntimeException: id is a reserved > property key
> Similar behavior for load/saveGraphSON . I'm using rexster-0.8-SNAPSHOT.
I'm running both, Rexster server and console from the same directory. So, I don't think this problem should arise. Also, the error reported by rexster console doesn't talk about a FileNotFoundException or something similar.
My saved GraphML contains an 'id' from the graph it was saved. IMO, g.saveGraphML shouldn't copy the 'id's if 'id' is a reserved property. Could you please let me know of your opinion on this?
> I'm running both, Rexster server and console from the same directory. So, I don't think this problem should arise. Also, the error reported by rexster console doesn't talk about a FileNotFoundException or something similar.
> My saved GraphML contains an 'id' from the graph it was saved. IMO, g.saveGraphML shouldn't copy the 'id's if 'id' is a reserved property. Could you please let me know of your opinion on this?
Apologies for a delayed response. My Rexster configuration in
rexster.xml includes two Neo4j databases, neo4j-reloaded and neo4j-
revolutions.
neo4j-reloaded corresponds to an existing Neo4j Community 1.6M03
instance's graph.db/ with ~2900 nodes.
neo4j-revolutions corresponds to a blank location.
Both, rexster server and console, are running from the same directory.
Following is the series of command-execution from rexster-console.
rexster[groovy]> rexster.graphNames
==>neo4j-revolutions
==>emptygraph
==>neo4j-reloaded
rexster[groovy]> g_reloaded = rexster.getGraph('neo4j-reloaded')
==>neo4jgraph[EmbeddedGraphDatabase [/home/incognito/Download/neo4j-
community-1.6.M03/data.orig/graph.db]]
rexster[groovy]> g_revolutions = rexster.getGraph('neo4j-revolutions')
==>neo4jgraph[EmbeddedGraphDatabase [/home/incognito/Download/neo4j-
community-1.6.M03/blank]]
rexster[groovy]> g_reloaded.saveGraphML('neo_reloaded.xml')
==>
rexster[groovy]> g_revolutions.loadGraphML('neo_reloaded.xml')
==>An error occurred while processing the script for language
[groovy]: javax.script.ScriptException: java.lang.RuntimeException: id
is a reserved property key
rexster[groovy]>
I've tried this with Neo4j Community 1.4 instance too and got same
results. Further I have also tried executing Gremlin scripts on my
Neo4j REST server instance with similar results. Here's how:
> On Feb 8, 2012, at 8:07 AM, Nikhil Lanjewar wrote:
> > Hey,
> > I'm running both, Rexster server and console from the same directory. So, I don't think this problem should arise. Also, the error reported by rexster console doesn't talk about a FileNotFoundException or something similar.
> > My saved GraphML contains an 'id' from the graph it was saved. IMO, g.saveGraphML shouldn't copy the 'id's if 'id' is a reserved property. Could you please let me know of your opinion on this?
mmh, this looks like a bug in that a graphml with an "id" property on a node will not be able to be imported in Blueprints. I think you should file a bug for this.
On Sun, Feb 12, 2012 at 8:37 AM, Nikhil Lanjewar <nikhil010...@gmail.com> wrote: > Hi Marko,
> Apologies for a delayed response. My Rexster configuration in > rexster.xml includes two Neo4j databases, neo4j-reloaded and neo4j- > revolutions.
> neo4j-reloaded corresponds to an existing Neo4j Community 1.6M03 > instance's graph.db/ with ~2900 nodes. > neo4j-revolutions corresponds to a blank location.
> Both, rexster server and console, are running from the same directory. > Following is the series of command-execution from rexster-console.
> rexster[groovy]> rexster.graphNames > ==>neo4j-revolutions > ==>emptygraph > ==>neo4j-reloaded > rexster[groovy]> g_reloaded = rexster.getGraph('neo4j-reloaded') > ==>neo4jgraph[EmbeddedGraphDatabase [/home/incognito/Download/neo4j- > community-1.6.M03/data.orig/graph.db]] > rexster[groovy]> g_revolutions = rexster.getGraph('neo4j-revolutions') > ==>neo4jgraph[EmbeddedGraphDatabase [/home/incognito/Download/neo4j- > community-1.6.M03/blank]] > rexster[groovy]> g_reloaded.saveGraphML('neo_reloaded.xml') > ==> > rexster[groovy]> g_revolutions.loadGraphML('neo_reloaded.xml') > ==>An error occurred while processing the script for language > [groovy]: javax.script.ScriptException: java.lang.RuntimeException: id > is a reserved property key > rexster[groovy]>
> I've tried this with Neo4j Community 1.4 instance too and got same > results. Further I have also tried executing Gremlin scripts on my > Neo4j REST server instance with similar results. Here's how:
>> On Feb 8, 2012, at 8:07 AM, Nikhil Lanjewar wrote:
>> > Hey,
>> > I'm running both, Rexster server and console from the same directory. So, I don't think this problem should arise. Also, the error reported by rexster console doesn't talk about a FileNotFoundException or something similar.
>> > My saved GraphML contains an 'id' from the graph it was saved. IMO, g.saveGraphML shouldn't copy the 'id's if 'id' is a reserved property. Could you please let me know of your opinion on this?
I can't seem to reproduce this error. Can you provide me the smallest possible GraphML example and step-by-step test to demonstrate your problem (preferably as an issue). I can then see where the problem lays.
> Apologies for a delayed response. My Rexster configuration in > rexster.xml includes two Neo4j databases, neo4j-reloaded and neo4j- > revolutions.
> neo4j-reloaded corresponds to an existing Neo4j Community 1.6M03 > instance's graph.db/ with ~2900 nodes. > neo4j-revolutions corresponds to a blank location.
> Both, rexster server and console, are running from the same directory. > Following is the series of command-execution from rexster-console.
> rexster[groovy]> rexster.graphNames > ==>neo4j-revolutions > ==>emptygraph > ==>neo4j-reloaded > rexster[groovy]> g_reloaded = rexster.getGraph('neo4j-reloaded') > ==>neo4jgraph[EmbeddedGraphDatabase [/home/incognito/Download/neo4j- > community-1.6.M03/data.orig/graph.db]] > rexster[groovy]> g_revolutions = rexster.getGraph('neo4j-revolutions') > ==>neo4jgraph[EmbeddedGraphDatabase [/home/incognito/Download/neo4j- > community-1.6.M03/blank]] > rexster[groovy]> g_reloaded.saveGraphML('neo_reloaded.xml') > ==> > rexster[groovy]> g_revolutions.loadGraphML('neo_reloaded.xml') > ==>An error occurred while processing the script for language > [groovy]: javax.script.ScriptException: java.lang.RuntimeException: id > is a reserved property key > rexster[groovy]>
> I've tried this with Neo4j Community 1.4 instance too and got same > results. Further I have also tried executing Gremlin scripts on my > Neo4j REST server instance with similar results. Here's how:
>> On Feb 8, 2012, at 8:07 AM, Nikhil Lanjewar wrote:
>>> Hey,
>>> I'm running both, Rexster server and console from the same directory. So, I don't think this problem should arise. Also, the error reported by rexster console doesn't talk about a FileNotFoundException or something similar.
>>> My saved GraphML contains an 'id' from the graph it was saved. IMO, g.saveGraphML shouldn't copy the 'id's if 'id' is a reserved property. Could you please let me know of your opinion on this?
Thanks for the response. Will add an issue shortly.
Could you please let me know what's the best location to add an issue about this? I don't think this is related exclusively to Rexster now. Seems more like a Blueprints issue. Can someone confirm?
If you can't reproduce the error using raw Blueprints and it only happens in Rexster, then put it in Rexster. If you can reproduce the error in raw Blueprints, then put it in Blueprints.
Raw Blueprints would look something like this:
GraphMLReader.inputGraph(graph, new FileInputStream("my.graphml"));
> Thanks for the response. Will add an issue shortly.
> Could you please let me know what's the best location to add an issue about this? I don't think this is related exclusively to Rexster now. Seems more like a Blueprints issue. Can someone confirm?