Re: [Neo4j] performance issues with ubuntu

2011-06-01 Thread Marco Gerber
Hi Peter

Sounds interesting. I think small transactions are a common use case and being 
able to use them would boost neo4j into new spheres :-)

Btw, congratulation for the whole project. Nice api, simple concepts. Well done!

Cheers,
Marco



-Original Message-
From: user-boun...@lists.neo4j.org on behalf of Peter Neubauer
Sent: Tue 31.05.2011 18:06
To: Neo4j user discussions
Subject: Re: [Neo4j] performance issues with ubuntu
 
Marco,
yes, small transaction require many disk flushes, so you are seeing the
limits of the OS IO. However, we are working on a MUCH faster mode of
relaxed writing, apart from minimizing the number of files to flush. We hope
to have these optimizations as part of 1.4, which means they will appear
hopefully in the next milestones.

HTH.

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Tue, May 31, 2011 at 5:45 PM, Marco Gerber mger...@junisphere.netwrote:

 Hello everybody

 The performance issue results from a too small transaction size. If I
 commit only after 1000 traversials, the execution time for every traversial
 speeds up to ~ 300 times. The same thing happens on windows where the speed
 is near infinity :-). It seems, that there are two problems with the current
 implementation (also tested with 1.4.M03). One with the case of handling
 transactions on linux itself and the other with handling small transactions
 with good performance in general.

 jm2c,
 Marco


 -Original Message-
 From: user-boun...@lists.neo4j.org on behalf of Marco Gerber
 Sent: Tue 31.05.2011 08:58
 To: Neo4j user discussions
 Subject: Re: [Neo4j] performance issues with ubuntu

 Hello everybody

 A collection of reference benchmarks would be great, but completely
 independent of this, my problem is making my application on linux as
 performant as on windows.

 Thanks guys,
 Marco


 -Original Message-
 From: user-boun...@lists.neo4j.org on behalf of Rick Bullotta
 Sent: Mon 30.05.2011 18:02
 To: j...@neotechnology.com; user@lists.neo4j.org
 Subject: Re: [Neo4j] performance issues with ubuntu

 Hi, Jim.

 Not really thinking of benchmarks, which I agree are tricky to define and
 even trickier to standardize.  Plus, given the nearly infinitely cool things
 you can do with neo, it borders on impossible.

 Rather, I'm just thinking of wikifying some of the platform specific best
 practices and gotchas/known issues for each.

 Rick

 - Reply message -
 From: Jim Webber j...@neotechnology.com
 Date: Mon, May 30, 2011 11:55 am
 Subject: [Neo4j] performance issues with ubuntu
 To: Neo4j user discussions user@lists.neo4j.org

 Hi Rick,

 I concur that we should perhaps have some perf figures, but it's one of
 those things that's easier said than done.

 For instance, right now we have performance tests running as part of the
 Windows/Linux/Mac continuous build and we will fail the build if we drop on
 those numbers. Yet creating representative benchmarks (similar to the TPC-X
 benchmarks perhaps) is not only difficult, but will almost certainly be of
 no use to users or customers when choosing a graph database or in designing
 out their own solutions because your access patterns are likely to be so
 different from the benchmark patterns.

 But if the community could come together and loosely agree upon some
 representative benchmarks that would be useful to them
 (platform/setup/access pattern) then we could get something into our build
 and publishing numbers with a little effort.

 Jim


 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user



 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user


___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] finding commonalities between people

2011-06-01 Thread John Bale
Peter,

I have thinks partially working.

sending: script=g.v(1); works perfectly

however sending: script=n=g.v(1); fails with
= javax.script.ScriptException: groovy.lang.MissingPropertyException: No
such property: n for class: Script3

if I try sending: script=n=g.v(1); fails with
= org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed:\nScript6.groovy: 49: unexpected char: 0x @ line 49, column 3.\n
  \n\n ^\n\n1 error\n

So the question is, how can I assign a variable?




On Tue, May 31, 2011 at 11:46 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:

 Now the files should be uploaded.

 Have fun!

 Cheers,

 /peter neubauer

 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org   - Your high performance graph database.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


 On Tue, May 31, 2011 at 10:28 PM, John Bale nos...@gmail.com wrote:

  Peter, you're the best! Will start working on integrating this tonight.
 
 
  On Tue, May 31, 2011 at 11:25 PM, Peter Neubauer 
  peter.neuba...@neotechnology.com wrote:
 
   John,
   what maven version are you running?
  
   Anyway, uploaded a locally built version of the community server to
  
  
  
 
 http://dl.dropbox.com/u/5925006/neo4j-dist/neo4j-community-1.4-SNAPSHOT-unix.tar.gzand
   the Gremlin plugin jar (drop it into $NEO4J_HOME/plugins) at
  
  
  
 
 http://dl.dropbox.com/u/5925006/neo4j-dist/neo4j-gremlin-plugin-0.1-SNAPSHOT.jar
  
   Lemme know how it goes, it should behave according to the tests at
  
  
  
 
 https://github.com/neo4j/neo4j-gremlin-plugin/blob/master/features/start-and-stop.featureand
  
  
 
 https://github.com/neo4j/neo4j-gremlin-plugin/blob/master/src/test/java/org/neo4j/server/plugin/gremlin/GremlinPluginFunctionalTest.java
  
   Cheers,
  
   /peter neubauer
  
   GTalk:  neubauer.peter
   Skype   peter.neubauer
   Phone   +46 704 106975
   LinkedIn   http://www.linkedin.com/in/neubauer
   Twitter  http://twitter.com/peterneubauer
  
   http://www.neo4j.org   - Your high performance graph
  database.
   http://startupbootcamp.org/- Öresund - Innovation happens HERE.
   http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
 party.
  
  
   On Tue, May 31, 2011 at 10:19 PM, John Bale nos...@gmail.com wrote:
  
Peter,
   
Got the community git, mvn clean install and it's returning test
   failures.
Results :
   
Failed tests:
   
   
  
 
  
 shouldGet204WhenRemovingAValidRelationship(org.neo4j.server.rest.RemoveRelationshipFunctionalTest)
   
Tests in error:
   
Tests run: 468, Failures: 56, Errors: 23, Skipped: 13
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.6:test
 (default-test)
  on
project neo4j-server: There are test failures.
[ERROR]
[ERROR] Please refer to
/Users/m/Work/neo-community/server/target/surefire-reports for the
individual test results.
[ERROR] - [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
  the
   -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug
 logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please
read the following articles:
[ERROR] [Help 1]
   
 http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with
  the
command
[ERROR]   mvn goals -rf :neo4j-server
   
   
On Tue, May 31, 2011 at 10:52 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:
   
 John,
 yes, sunshine and the graphmatching lib have just moved into the
community
 build and thus are not deployed to the repos yet by the
 buildserver.
   Just
 build the community repo with

 mvn clean install and you should get them installed into your local
   repo.
 Then, in the packaging repo, you only should need to build the
   standalone
 project, QA is doing smoketests and other stuff ensuring that the
   server
is
 really booting on all platforms, installing plugins etc.

 Cheers,

 /peter neubauer

 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org   - Your high performance graph
database.
 http://startupbootcamp.org/- Öresund - Innovation happens
 HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
   party.


 On Tue, May 31, 2011 at 9:49 PM, John Bale nos...@gmail.com
 

Re: [Neo4j] finding commonalities between people

2011-06-01 Thread Peter Neubauer
John,
you need to URL encode if you are sending complex scripts. Look at
https://github.com/neo4j/neo4j-gremlin-plugin/blob/master/src/test/java/org/neo4j/server/plugin/gremlin/GremlinPluginFunctionalTest.javafor
the URL encoded script. That will translate into

send-a-gremlin-script,-json-encoded.txt
send-a-gremlin-script,-url-encoded.txt
[~/code/neo/neo4j-gremlin-plugin/target/rest-api] $cat
send-a-gremlin-script,-json-encoded.txt
[[rest-api-send-a-gremlin-script,-json-encoded]]
=== Send a Gremlin Script, JSON encoded ===

_Example request_

* *+POST+*  +
http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script+
* *+Accept:+* +application/json+
* *+Content-Type:+* +application/json+
[source,javascript]

{script:i = g.v(4);i.outE.inV}



_Example response_

* *+200:+* +OK
* *+Content-Type:+* +application/json+
[source,javascript]

[ {
  outgoing_relationships : 
http://localhost:7474/db/data/node/3/relationships/out;,
  data : {
name : you
  },
  traverse : http://localhost:7474/db/data/node/3/traverse/{returnType};,
  all_typed_relationships : 
http://localhost:7474/db/data/node/3/relationships/all/{-list||types},
  property : http://localhost:7474/db/data/node/3/properties/{key};,
  self : http://localhost:7474/db/data/node/3;,
  properties : http://localhost:7474/db/data/node/3/properties;,
  outgoing_typed_relationships : 
http://localhost:7474/db/data/node/3/relationships/out/{-list||types},
  incoming_relationships : 
http://localhost:7474/db/data/node/3/relationships/in;,
  extensions : {
FunctionalTestPlugin : {
  connected_nodes : 
http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/connected_nodes
,
  pathToReference : 
http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/pathToReference
,
  getThisNodeOrById : 
http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/getThisNodeOrById
,
  createRelationships : 
http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/createRelationships
,
  getRelationshipsBetween : 
http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/getRelationshipsBetween

},
GraphCloner : {
  clonedSubgraph : 
http://localhost:7474/db/data/ext/GraphCloner/node/3/clonedSubgraph;
}
  },
  create_relationship : 
http://localhost:7474/db/data/node/3/relationships;,
  all_relationships : 
http://localhost:7474/db/data/node/3/relationships/all;,
  incoming_typed_relationships : 
http://localhost:7474/db/data/node/3/relationships/in/{-list||types}
} ]


In the generated documentation. Doe that help?

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Wed, Jun 1, 2011 at 11:27 AM, John Bale nos...@gmail.com wrote:

 Peter,

 I have thinks partially working.

 sending: script=g.v(1); works perfectly

 however sending: script=n=g.v(1); fails with
 = javax.script.ScriptException: groovy.lang.MissingPropertyException: No
 such property: n for class: Script3

 if I try sending: script=n=g.v(1); fails with
 = org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
 failed:\nScript6.groovy: 49: unexpected char: 0x @ line 49, column 3.\n
  \n\n ^\n\n1 error\n

 So the question is, how can I assign a variable?




 On Tue, May 31, 2011 at 11:46 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

  Now the files should be uploaded.
 
  Have fun!
 
  Cheers,
 
  /peter neubauer
 
  GTalk:  neubauer.peter
  Skype   peter.neubauer
  Phone   +46 704 106975
  LinkedIn   http://www.linkedin.com/in/neubauer
  Twitter  http://twitter.com/peterneubauer
 
  http://www.neo4j.org   - Your high performance graph
 database.
  http://startupbootcamp.org/- Öresund - Innovation happens HERE.
  http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
  On Tue, May 31, 2011 at 10:28 PM, John Bale nos...@gmail.com wrote:
 
   Peter, you're the best! Will start working on integrating this tonight.
  
  
   On Tue, May 31, 2011 at 11:25 PM, Peter Neubauer 
   peter.neuba...@neotechnology.com wrote:
  
John,
what maven version are you running?
   
Anyway, uploaded a locally built version of the community server to
   
   
   
  
 
 http://dl.dropbox.com/u/5925006/neo4j-dist/neo4j-community-1.4-SNAPSHOT-unix.tar.gzand
the Gremlin plugin jar (drop it into $NEO4J_HOME/plugins) at
   
   
   
  
 
 http://dl.dropbox.com/u/5925006/neo4j-dist/neo4j-gremlin-plugin-0.1-SNAPSHOT.jar
   
Lemme know how it goes, it should behave according to the tests at
   
   
   
  
 
 

Re: [Neo4j] finding commonalities between people

2011-06-01 Thread John Bale
Works like a charm.

Maybe it would be helpful to others if the JSON part was mentioned in the
neo4j-gremlin-plugin github README.



On Wed, Jun 1, 2011 at 12:38 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:

 John,
 you need to URL encode if you are sending complex scripts. Look at

 https://github.com/neo4j/neo4j-gremlin-plugin/blob/master/src/test/java/org/neo4j/server/plugin/gremlin/GremlinPluginFunctionalTest.javafor
 the URL encoded script. That will translate into

 send-a-gremlin-script,-json-encoded.txt
 send-a-gremlin-script,-url-encoded.txt
 [~/code/neo/neo4j-gremlin-plugin/target/rest-api] $cat
 send-a-gremlin-script,-json-encoded.txt
 [[rest-api-send-a-gremlin-script,-json-encoded]]
 === Send a Gremlin Script, JSON encoded ===

 _Example request_

 * *+POST+*  +
 http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script+
 * *+Accept:+* +application/json+
 * *+Content-Type:+* +application/json+
 [source,javascript]
 
 {script:i = g.v(4);i.outE.inV}
 


 _Example response_

 * *+200:+* +OK
 * *+Content-Type:+* +application/json+
 [source,javascript]
 
 [ {
  outgoing_relationships : 
 http://localhost:7474/db/data/node/3/relationships/out;,
  data : {
name : you
  },
  traverse : http://localhost:7474/db/data/node/3/traverse/{returnType}
 ,
  all_typed_relationships : 
 http://localhost:7474/db/data/node/3/relationships/all/{-list||types},
  property : http://localhost:7474/db/data/node/3/properties/{key};,
  self : http://localhost:7474/db/data/node/3;,
  properties : http://localhost:7474/db/data/node/3/properties;,
  outgoing_typed_relationships : 
 http://localhost:7474/db/data/node/3/relationships/out/{-list||types},
  incoming_relationships : 
 http://localhost:7474/db/data/node/3/relationships/in;,
  extensions : {
FunctionalTestPlugin : {
  connected_nodes : 

 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/connected_nodes
 ,
  pathToReference : 

 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/pathToReference
 ,
  getThisNodeOrById : 

 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/getThisNodeOrById
 ,
  createRelationships : 

 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/createRelationships
 ,
  getRelationshipsBetween : 

 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/getRelationshipsBetween
 
},
GraphCloner : {
  clonedSubgraph : 
 http://localhost:7474/db/data/ext/GraphCloner/node/3/clonedSubgraph;
}
  },
  create_relationship : 
 http://localhost:7474/db/data/node/3/relationships;,
  all_relationships : 
 http://localhost:7474/db/data/node/3/relationships/all;,
  incoming_typed_relationships : 
 http://localhost:7474/db/data/node/3/relationships/in/{-list||types}
 } ]
 

 In the generated documentation. Doe that help?

 Cheers,

 /peter neubauer

 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org   - Your high performance graph database.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.
 http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


 On Wed, Jun 1, 2011 at 11:27 AM, John Bale nos...@gmail.com wrote:

  Peter,
 
  I have thinks partially working.
 
  sending: script=g.v(1); works perfectly
 
  however sending: script=n=g.v(1); fails with
  = javax.script.ScriptException: groovy.lang.MissingPropertyException:
 No
  such property: n for class: Script3
 
  if I try sending: script=n=g.v(1); fails with
  = org.codehaus.groovy.control.MultipleCompilationErrorsException:
 startup
  failed:\nScript6.groovy: 49: unexpected char: 0x @ line 49, column
 3.\n
   \n\n ^\n\n1 error\n
 
  So the question is, how can I assign a variable?
 
 
 
 
  On Tue, May 31, 2011 at 11:46 PM, Peter Neubauer 
  peter.neuba...@neotechnology.com wrote:
 
   Now the files should be uploaded.
  
   Have fun!
  
   Cheers,
  
   /peter neubauer
  
   GTalk:  neubauer.peter
   Skype   peter.neubauer
   Phone   +46 704 106975
   LinkedIn   http://www.linkedin.com/in/neubauer
   Twitter  http://twitter.com/peterneubauer
  
   http://www.neo4j.org   - Your high performance graph
  database.
   http://startupbootcamp.org/- Öresund - Innovation happens HERE.
   http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
 party.
  
  
   On Tue, May 31, 2011 at 10:28 PM, John Bale nos...@gmail.com wrote:
  
Peter, you're the best! Will start working on integrating this
 tonight.
   
   
On Tue, May 31, 2011 at 11:25 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:
   
 John,
 what maven version are you running?

 Anyway, uploaded a locally built version of the community server to



   
  
 
 

[Neo4j] Password sent in plain text via email?

2011-06-01 Thread Todd Chaffee
I was kind of shocked to see my password sent via email in plain text at the
bottom of the monthly mailing list notification from
mailman-ow...@lists.neo4j.org.  Any way to suppress that part of the
message?

-- 

MIKAMAI | Making Media Social
http://mikamai.com
+447868260229
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Password sent in plain text via email?

2011-06-01 Thread Tim McNamara
That's standard with mailman. There's a big warning when you add your
password that explains this: https://lists.neo4j.org/mailman/listinfo/user

Tim McNamara
Professional \\  paperlessprojects.com
Personal \\  @timClicks http://twitter.com/timClicks  |  timmcnamara.co.nz



On 1 June 2011 23:42, Todd Chaffee t...@mikamai.com wrote:

 I was kind of shocked to see my password sent via email in plain text at
 the
 bottom of the monthly mailing list notification from
 mailman-ow...@lists.neo4j.org.  Any way to suppress that part of the
 message?

 --

 MIKAMAI | Making Media Social
 http://mikamai.com
 +447868260229
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Password sent in plain text via email?

2011-06-01 Thread Peter Neubauer
Todd,
I have disabled the monthly password reminder now in order to avoid this. Is
anyone fine with that?

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Wed, Jun 1, 2011 at 1:42 PM, Todd Chaffee t...@mikamai.com wrote:

 I was kind of shocked to see my password sent via email in plain text at
 the
 bottom of the monthly mailing list notification from
 mailman-ow...@lists.neo4j.org.  Any way to suppress that part of the
 message?

 --

 MIKAMAI | Making Media Social
 http://mikamai.com
 +447868260229
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] finding commonalities between people

2011-06-01 Thread Peter Neubauer
Ok,
great! Let the list know how things work out for you! Also, I added this to
https://github.com/neo4j/neo4j-gremlin-plugin/blob/master/README.markdown .

Then, the documentation will eventually be generated and be part of
docs.neo4j.org when this is packaged as a standard Neo4j Server plugin. Hope
to get to that next week.

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Wed, Jun 1, 2011 at 12:27 PM, John Bale nos...@gmail.com wrote:

 Works like a charm.

 Maybe it would be helpful to others if the JSON part was mentioned in the
 neo4j-gremlin-plugin github README.



 On Wed, Jun 1, 2011 at 12:38 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

  John,
  you need to URL encode if you are sending complex scripts. Look at
 
 
 https://github.com/neo4j/neo4j-gremlin-plugin/blob/master/src/test/java/org/neo4j/server/plugin/gremlin/GremlinPluginFunctionalTest.javafor
  the URL encoded script. That will translate into
 
  send-a-gremlin-script,-json-encoded.txt
  send-a-gremlin-script,-url-encoded.txt
  [~/code/neo/neo4j-gremlin-plugin/target/rest-api] $cat
  send-a-gremlin-script,-json-encoded.txt
  [[rest-api-send-a-gremlin-script,-json-encoded]]
  === Send a Gremlin Script, JSON encoded ===
 
  _Example request_
 
  * *+POST+*  +
  http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script+
  * *+Accept:+* +application/json+
  * *+Content-Type:+* +application/json+
  [source,javascript]
  
  {script:i = g.v(4);i.outE.inV}
  
 
 
  _Example response_
 
  * *+200:+* +OK
  * *+Content-Type:+* +application/json+
  [source,javascript]
  
  [ {
   outgoing_relationships : 
  http://localhost:7474/db/data/node/3/relationships/out;,
   data : {
 name : you
   },
   traverse : 
 http://localhost:7474/db/data/node/3/traverse/{returnType}
  ,
   all_typed_relationships : 
  http://localhost:7474/db/data/node/3/relationships/all/{-list||types},
   property : http://localhost:7474/db/data/node/3/properties/{key};,
   self : http://localhost:7474/db/data/node/3;,
   properties : http://localhost:7474/db/data/node/3/properties;,
   outgoing_typed_relationships : 
  http://localhost:7474/db/data/node/3/relationships/out/{-list||types},
   incoming_relationships : 
  http://localhost:7474/db/data/node/3/relationships/in;,
   extensions : {
 FunctionalTestPlugin : {
   connected_nodes : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/connected_nodes
  ,
   pathToReference : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/pathToReference
  ,
   getThisNodeOrById : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/getThisNodeOrById
  ,
   createRelationships : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/createRelationships
  ,
   getRelationshipsBetween : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/getRelationshipsBetween
  
 },
 GraphCloner : {
   clonedSubgraph : 
  http://localhost:7474/db/data/ext/GraphCloner/node/3/clonedSubgraph;
 }
   },
   create_relationship : 
  http://localhost:7474/db/data/node/3/relationships;,
   all_relationships : 
  http://localhost:7474/db/data/node/3/relationships/all;,
   incoming_typed_relationships : 
  http://localhost:7474/db/data/node/3/relationships/in/{-list||types}
  } ]
  
 
  In the generated documentation. Doe that help?
 
  Cheers,
 
  /peter neubauer
 
  GTalk:  neubauer.peter
  Skype   peter.neubauer
  Phone   +46 704 106975
  LinkedIn   http://www.linkedin.com/in/neubauer
  Twitter  http://twitter.com/peterneubauer
 
  http://www.neo4j.org   - Your high performance graph
 database.
  http://startupbootcamp.org/- Öresund - Innovation happens HERE.
  http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
  On Wed, Jun 1, 2011 at 11:27 AM, John Bale nos...@gmail.com wrote:
 
   Peter,
  
   I have thinks partially working.
  
   sending: script=g.v(1); works perfectly
  
   however sending: script=n=g.v(1); fails with
   = javax.script.ScriptException: groovy.lang.MissingPropertyException:
  No
   such property: n for class: Script3
  
   if I try sending: script=n=g.v(1); fails with
   = org.codehaus.groovy.control.MultipleCompilationErrorsException:
  startup
   failed:\nScript6.groovy: 49: unexpected char: 0x @ line 49, column
  3.\n
\n\n ^\n\n1 error\n
  
   So the question is, how can I assign a variable?
  
  
  
  
   On Tue, May 31, 2011 at 11:46 PM, Peter Neubauer 
   peter.neuba...@neotechnology.com wrote:
  
Now the files should be uploaded.
  

Re: [Neo4j] Announcing structr 0.3

2011-06-01 Thread Peter Neubauer
Awesome Axel,
and congrats to the team developing this. Will be exciting to take an test
drive!

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Wed, Jun 1, 2011 at 5:17 AM, Javier de la Rosa ver...@gmail.com wrote:

 On Tue, May 31, 2011 at 22:01, Axel Morgner a...@morgner.de wrote:
  tonight, we released a first public version (v0.3) of structr.
  Basically, structr is a CMS based on Neo4j. Source code is available at
  github [1].

 Congratulations for the work, it looks really interesting. I think is
 the logical step into the NoSQL scene.


 --
 Javier de la Rosa
 http://versae.es
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j is Finalist of the JAX-Awards

2011-06-01 Thread Michael Hunger
I never thought we would make it into the finals. Really cool.

If you'd like us to win this, please vote for us. We could spend the money for 
instance on behalf of our user groups.

http://vote.jax-awards.com/

Cheers

Michael

P.S. Please spread the word :)
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Unmanaged Extensions

2011-06-01 Thread hajons
Hi, 

Did you solve the ResourceConfig problem? 

/Håkan

--
View this message in context: 
http://neo4j-user-list.438527.n3.nabble.com/Unmanaged-Extensions-tp2660066p3010994.html
Sent from the Neo4J User List mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j is Finalist of the JAX-Awards

2011-06-01 Thread Peter Neubauer
Michael,
congrats to a terrific talk, you rocked it - wish I had been there!

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Wed, Jun 1, 2011 at 3:10 PM, Michael Hunger 
michael.hun...@neotechnology.com wrote:

 I never thought we would make it into the finals. Really cool.

 If you'd like us to win this, please vote for us. We could spend the money
 for instance on behalf of our user groups.

 http://vote.jax-awards.com/

 Cheers

 Michael

 P.S. Please spread the word :)
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Experiencing errors with JSON parsing in neo4j-shell

2011-06-01 Thread Ian Robinson
Hi Warren

If you surround the entire map with quotes, and use single quotes for keys
and values, it should work:

mkrel -c -d i -t DOMAIN_OF --np {'app':'foobar'}

Kind regards

ian

-- 
Director of Customer Success, Neo Technology
http://neotechnology.com
UK: +44 7974 144424
Skype: iansrobinson

On 31 May 2011 19:16, Pfeffer, Warren warren.pfef...@credit-suisse.comwrote:

 Hello All,

Experiencing errors with JSON parsing in neo4j-shell

Version neo4j-community-1.4.M02 running on 64bit SLES-10 with
 Java 1.6.0_01-b06

I tried all manner of quoting the JSON but no luck.

Thanks in advance for any insight into this problem.

WP

 neo4j-sh (0)$ help mkrel

 Creates a relationship to a new or existing node, f.ex:
 mkrel -ct KNOWS (will create a relationship to a new node)
 mkrel -t KNOWS 123 (will create a relationship to node with id 123).

  -c Supplied if there should be created a new node.
  --cd   Go to the created node, like doing 'cd'.
  -d The direction: OUTGOING, INCOMING, o, i.
  --np   Properties (a json map) to set for the new node (if one is
 created).
  --rp   Properties (a json map) to set for the new relationship.
  -t The relationship type.
  -v Verbose mode: display created nodes/relationships.

 neo4j-sh (0)$ mkrel -c -d i -t DOMAIN_OF --np {app:foobar}
 org.neo4j.shell.util.json.JSONException: A JSONObject text must end with
 '}' at character 1


 ===
 Please access the attached hyperlink for an important electronic
 communications disclaimer:
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html

 ===

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Still can't connect with jython

2011-06-01 Thread Boris Kizelshteyn
So I have built jpype+jython+neo4j python on an Fedora machine and it seems
to work. The weird thing is that I never installed neo4j on its own. I have
a directory called /neo4j-db/path in the jython directory and that's it.
Where is the rest of the db (server, tools, etc?). What I'm really trying to
do is get this working on my AWS instance which is ubuntu and there
everything is installed discretely and I thought logically, but when I call
the db I get:

 import
neo4j
 graphdb = neo4j.GraphDatabase(
/opt/neo4j/neo4j-community-1.4.M02/data/graph.db )
Traceback (most recent call last):
  File stdin, line 1, in module
  File /opt/jython/jython-2.5.2/Lib/site-packages/neo4j/__init__.py, line
522, in __new__
neo = core.load_neo(resource_uri, params)
  File /opt/jython/jython-2.5.2/Lib/site-packages/neo4j/_core.py, line
332, in load_neo
return load_neo(resource_uri, parameters)
  File /opt/jython/jython-2.5.2/Lib/site-packages/neo4j/_core.py, line
225, in load_neo
return GraphDatabase(resource_uri, settings, config, log)
  File /opt/jython/jython-2.5.2/Lib/site-packages/neo4j/_core.py, line
230, in __init__
neo = backend.load_neo(resource_uri, settings)
  File
/opt/jython/jython-2.5.2/Lib/site-packages/neo4j/_backend/__init__.py,
line 74, in load_neo
return impl(resource_uri, implementation.make_map(settings))
at
org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:148)
at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:123)
at
org.neo4j.kernel.EmbeddedGraphDbImpl.init(EmbeddedGraphDbImpl.java:89)
at
org.neo4j.kernel.EmbeddedGraphDatabase.init(EmbeddedGraphDatabase.java:76)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.python.core.PyReflectedConstructor.constructProxy(PyReflectedConstructor.java:210)

org.neo4j.kernel.impl.transaction.TransactionFailureException:
org.neo4j.kernel.impl.transaction.TransactionFailureException: Could not
create data source [nioneodb], see nested exception for cause of error

Please, Please help!
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Experiencing errors with JSON parsing in neo4j-shell

2011-06-01 Thread Peter Neubauer
Added the example to the docs.

https://github.com/neo4j/community/commit/a4aba19e2ad1abcee14207c97b80d69d22455e86

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Wed, Jun 1, 2011 at 6:07 PM, Ian Robinson ian.robin...@neotechnology.com
 wrote:

 Hi Warren

 If you surround the entire map with quotes, and use single quotes for keys
 and values, it should work:

 mkrel -c -d i -t DOMAIN_OF --np {'app':'foobar'}

 Kind regards

 ian

 --
 Director of Customer Success, Neo Technology
 http://neotechnology.com
 UK: +44 7974 144424
 Skype: iansrobinson

 On 31 May 2011 19:16, Pfeffer, Warren warren.pfef...@credit-suisse.com
 wrote:

  Hello All,
 
 Experiencing errors with JSON parsing in neo4j-shell
 
 Version neo4j-community-1.4.M02 running on 64bit SLES-10 with
  Java 1.6.0_01-b06
 
 I tried all manner of quoting the JSON but no luck.
 
 Thanks in advance for any insight into this problem.
 
 WP
 
  neo4j-sh (0)$ help mkrel
 
  Creates a relationship to a new or existing node, f.ex:
  mkrel -ct KNOWS (will create a relationship to a new node)
  mkrel -t KNOWS 123 (will create a relationship to node with id 123).
 
   -c Supplied if there should be created a new node.
   --cd   Go to the created node, like doing 'cd'.
   -d The direction: OUTGOING, INCOMING, o, i.
   --np   Properties (a json map) to set for the new node (if one is
  created).
   --rp   Properties (a json map) to set for the new relationship.
   -t The relationship type.
   -v Verbose mode: display created nodes/relationships.
 
  neo4j-sh (0)$ mkrel -c -d i -t DOMAIN_OF --np {app:foobar}
  org.neo4j.shell.util.json.JSONException: A JSONObject text must end with
  '}' at character 1
 
 
 
 ===
  Please access the attached hyperlink for an important electronic
  communications disclaimer:
  http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
 
 
 ===
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] BatchInserter exhausting heap...?

2011-06-01 Thread Paul Bandler
I have a simple program that uses the BatchInserter to load rows from a SQL 
database and am running it on a modestly configured Windows machine with 2GB of 
RAM and setting the max heap to 500M.

Initially it was running out of memory quite soon so I introduced a flush after 
every 5000 nodes and it appeared that all was well.  But having got further in 
the data load it appears to hop along nicely but the memory allocated (simply 
visible using windows task manager) grows and grows until I suspect it's 
reached its max heap size and it's written about 2M nodes then abruptly stops 
making any further discernible progress.  It doesn't fail, just the logging 
I've put in to log every 5000 nodes has stopped and the CPU is 100% used - 
garbage collecting I suspect.

Is there something I should be doing periodically in addition to theindex 
flush to stop the heap exhaustion?  My code is really simple, here's the method 
for loading nodes from each table:-

  public long restoreCollection() {
resolveSql();
_log.debug(restore collection: + getCollectionName() +  using: 
+ _sql +  and: + Arrays.deepToString(_columns));
final BatchInserterIndex _index = makeIndex();
final long collectionNode = _inserter.createNode(MapUtil.map(name,
getCollectionName()));
 
_log.debug(Query db...);
getJdbcTemplate().query(_sql, new Object[] {},
new RowCallbackHandler() {
public void processRow(ResultSet row) throws SQLException {
final MapString, Object properties = 
extractproperties(row);
long node = _inserter.createNode(properties);
_inserter.createRelationship(node, collectionNode,
RdmRelationship.MEMBER_OF, null);
if (_index != null)
for (DbColumn col : _columns) {
if (col.isIndexed())
_index.add(node, MapUtil.map(col.getName(),
properties.get(col.getName(;
}
_collectionSize++;
if ((_collectionSize % FLUSH_INTERVAL == 0)) {
if (_index != null)
_index.flush();
_log.debug(Added node: + _collectionSize
+  to:  + getCollectionName());
}
}
});
 
// long collectionNode = -1;
if (_index != null) {
_index.flush();
}
_log.debug(Completed restoring  + _collectionSize +  to: 
+ getCollectionName());
return collectionNode;
}
 

and then around that a higher level function that handles all tables:-

public void run() {
throwIfNull(_restorers, Restorers missing);
throwIfNull(_inserter, Batch inserter missing);
int totalNodes = 0;
int totalRelationships = 0;
try {
for (CollectionRestorer r : _restorers) {
long collection = r.restoreCollection();
totalNodes += r.getCollectionSize();
_inserter.createRelationship(_inserter.getGraphDbService()
.getReferenceNode().getId(), collection,
RdmRelationship.CLASS_EXTENT, null);
}
for (ParentChildRelationshipBuilder r : _relators) {
r.makeRelationships();
totalRelationships += r.getRelations();
 
}
} finally {
_inserter.shutdown();
_log.info(Batch inserter shutdown.  Created:  + totalNodes +  
nodes and 
+ totalRelationships +  relationships);
}
}
 
Any suggestions welcome.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] BatchInserter exhausting heap...?

2011-06-01 Thread Michael Hunger
you could use cache_type=weak
in the db properties

you can easily introspect java programs (heap) using jmap jconsole or visualvm

what version of neo4j are you using?

index.flush just sets a flag for immediate index querying

Sent from my iBrick4


Am 01.06.2011 um 19:18 schrieb Paul Bandler pband...@cseuk.co.uk:

 I have a simple program that uses the BatchInserter to load rows from a SQL 
 database and am running it on a modestly configured Windows machine with 2GB 
 of RAM and setting the max heap to 500M.
 
 Initially it was running out of memory quite soon so I introduced a flush 
 after every 5000 nodes and it appeared that all was well.  But having got 
 further in the data load it appears to hop along nicely but the memory 
 allocated (simply visible using windows task manager) grows and grows until I 
 suspect it's reached its max heap size and it's written about 2M nodes then 
 abruptly stops making any further discernible progress.  It doesn't fail, 
 just the logging I've put in to log every 5000 nodes has stopped and the CPU 
 is 100% used - garbage collecting I suspect.
 
 Is there something I should be doing periodically in addition to theindex 
 flush to stop the heap exhaustion?  My code is really simple, here's the 
 method for loading nodes from each table:-
 
  public long restoreCollection() {
resolveSql();
_log.debug(restore collection: + getCollectionName() +  using: 
+ _sql +  and: + Arrays.deepToString(_columns));
final BatchInserterIndex _index = makeIndex();
final long collectionNode = _inserter.createNode(MapUtil.map(name,
getCollectionName()));
 
_log.debug(Query db...);
getJdbcTemplate().query(_sql, new Object[] {},
new RowCallbackHandler() {
public void processRow(ResultSet row) throws SQLException {
final MapString, Object properties = 
 extractproperties(row);
long node = _inserter.createNode(properties);
_inserter.createRelationship(node, collectionNode,
RdmRelationship.MEMBER_OF, null);
if (_index != null)
for (DbColumn col : _columns) {
if (col.isIndexed())
_index.add(node, MapUtil.map(col.getName(),
properties.get(col.getName(;
}
_collectionSize++;
if ((_collectionSize % FLUSH_INTERVAL == 0)) {
if (_index != null)
_index.flush();
_log.debug(Added node: + _collectionSize
+  to:  + getCollectionName());
}
}
});
 
// long collectionNode = -1;
if (_index != null) {
_index.flush();
}
_log.debug(Completed restoring  + _collectionSize +  to: 
+ getCollectionName());
return collectionNode;
}
 
 
 and then around that a higher level function that handles all tables:-
 
public void run() {
throwIfNull(_restorers, Restorers missing);
throwIfNull(_inserter, Batch inserter missing);
int totalNodes = 0;
int totalRelationships = 0;
try {
for (CollectionRestorer r : _restorers) {
long collection = r.restoreCollection();
totalNodes += r.getCollectionSize();
_inserter.createRelationship(_inserter.getGraphDbService()
.getReferenceNode().getId(), collection,
RdmRelationship.CLASS_EXTENT, null);
}
for (ParentChildRelationshipBuilder r : _relators) {
r.makeRelationships();
totalRelationships += r.getRelations();
 
}
} finally {
_inserter.shutdown();
_log.info(Batch inserter shutdown.  Created:  + totalNodes +  
 nodes and 
+ totalRelationships +  relationships);
}
}
 
 Any suggestions welcome.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] BatchInserter exhausting heap...?

2011-06-01 Thread Paul Bandler
Is that simply set as a system property or via the Map passed as the second 
parameter to the BatchInserterImpl constructor?  I've tried both and doesn't 
seem to help.  Is there some way I can verify that it's being used?

I'm using 1.3 

On 1 Jun 2011, at 18:49, Michael Hunger wrote:

 you could use cache_type=weak
 in the db properties
 
 you can easily introspect java programs (heap) using jmap jconsole or visualvm
 
 what version of neo4j are you using?
 
 index.flush just sets a flag for immediate index querying
 
 Sent from my iBrick4
 
 
 Am 01.06.2011 um 19:18 schrieb Paul Bandler pband...@cseuk.co.uk:
 
 I have a simple program that uses the BatchInserter to load rows from a SQL 
 database and am running it on a modestly configured Windows machine with 2GB 
 of RAM and setting the max heap to 500M.
 
 Initially it was running out of memory quite soon so I introduced a flush 
 after every 5000 nodes and it appeared that all was well.  But having got 
 further in the data load it appears to hop along nicely but the memory 
 allocated (simply visible using windows task manager) grows and grows until 
 I suspect it's reached its max heap size and it's written about 2M nodes 
 then abruptly stops making any further discernible progress.  It doesn't 
 fail, just the logging I've put in to log every 5000 nodes has stopped and 
 the CPU is 100% used - garbage collecting I suspect.
 
 Is there something I should be doing periodically in addition to the
 index flush to stop the heap exhaustion?  My code is really simple, here's 
 the method for loading nodes from each table:-
 
 public long restoreCollection() {
  resolveSql();
  _log.debug(restore collection: + getCollectionName() +  using: 
  + _sql +  and: + Arrays.deepToString(_columns));
  final BatchInserterIndex _index = makeIndex();
  final long collectionNode = _inserter.createNode(MapUtil.map(name,
  getCollectionName()));
 
  _log.debug(Query db...);
  getJdbcTemplate().query(_sql, new Object[] {},
  new RowCallbackHandler() {
  public void processRow(ResultSet row) throws SQLException {
  final MapString, Object properties = 
 extractproperties(row);
  long node = _inserter.createNode(properties);
  _inserter.createRelationship(node, collectionNode,
  RdmRelationship.MEMBER_OF, null);
  if (_index != null)
  for (DbColumn col : _columns) {
  if (col.isIndexed())
  _index.add(node, MapUtil.map(col.getName(),
  properties.get(col.getName(;
  }
  _collectionSize++;
  if ((_collectionSize % FLUSH_INTERVAL == 0)) {
  if (_index != null)
  _index.flush();
  _log.debug(Added node: + _collectionSize
  +  to:  + getCollectionName());
  }
  }
  });
 
  // long collectionNode = -1;
  if (_index != null) {
  _index.flush();
  }
  _log.debug(Completed restoring  + _collectionSize +  to: 
  + getCollectionName());
  return collectionNode;
  }
 
 
 and then around that a higher level function that handles all tables:-
 
  public void run() {
  throwIfNull(_restorers, Restorers missing);
  throwIfNull(_inserter, Batch inserter missing);
  int totalNodes = 0;
  int totalRelationships = 0;
  try {
  for (CollectionRestorer r : _restorers) {
  long collection = r.restoreCollection();
  totalNodes += r.getCollectionSize();
  _inserter.createRelationship(_inserter.getGraphDbService()
  .getReferenceNode().getId(), collection,
  RdmRelationship.CLASS_EXTENT, null);
  }
  for (ParentChildRelationshipBuilder r : _relators) {
  r.makeRelationships();
  totalRelationships += r.getRelations();
 
  }
  } finally {
  _inserter.shutdown();
  _log.info(Batch inserter shutdown.  Created:  + totalNodes +  
 nodes and 
  + totalRelationships +  relationships);
  }
  }
 
 Any suggestions welcome.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] BatchInserter exhausting heap...?

2011-06-01 Thread Michael Hunger
props passed in to the batchinserter
look into messages log
you see the different gc behaviour

Michael

Sent from my iBrick4


Am 01.06.2011 um 20:44 schrieb Paul Bandler pband...@cseuk.co.uk:

 Is that simply set as a system property or via the Map passed as the second 
 parameter to the BatchInserterImpl constructor?  I've tried both and doesn't 
 seem to help.  Is there some way I can verify that it's being used?
 
 I'm using 1.3 
 
 On 1 Jun 2011, at 18:49, Michael Hunger wrote:
 
 you could use cache_type=weak
 in the db properties
 
 you can easily introspect java programs (heap) using jmap jconsole or 
 visualvm
 
 what version of neo4j are you using?
 
 index.flush just sets a flag for immediate index querying
 
 Sent from my iBrick4
 
 
 Am 01.06.2011 um 19:18 schrieb Paul Bandler pband...@cseuk.co.uk:
 
 I have a simple program that uses the BatchInserter to load rows from a SQL 
 database and am running it on a modestly configured Windows machine with 
 2GB of RAM and setting the max heap to 500M.
 
 Initially it was running out of memory quite soon so I introduced a flush 
 after every 5000 nodes and it appeared that all was well.  But having got 
 further in the data load it appears to hop along nicely but the memory 
 allocated (simply visible using windows task manager) grows and grows until 
 I suspect it's reached its max heap size and it's written about 2M nodes 
 then abruptly stops making any further discernible progress.  It doesn't 
 fail, just the logging I've put in to log every 5000 nodes has stopped and 
 the CPU is 100% used - garbage collecting I suspect.
 
 Is there something I should be doing periodically in addition to the
 index flush to stop the heap exhaustion?  My code is really simple, here's 
 the method for loading nodes from each table:-
 
 public long restoreCollection() {
 resolveSql();
 _log.debug(restore collection: + getCollectionName() +  using: 
 + _sql +  and: + Arrays.deepToString(_columns));
 final BatchInserterIndex _index = makeIndex();
 final long collectionNode = _inserter.createNode(MapUtil.map(name,
 getCollectionName()));
 
 _log.debug(Query db...);
 getJdbcTemplate().query(_sql, new Object[] {},
 new RowCallbackHandler() {
 public void processRow(ResultSet row) throws SQLException {
 final MapString, Object properties = 
 extractproperties(row);
 long node = _inserter.createNode(properties);
 _inserter.createRelationship(node, collectionNode,
 RdmRelationship.MEMBER_OF, null);
 if (_index != null)
 for (DbColumn col : _columns) {
 if (col.isIndexed())
 _index.add(node, MapUtil.map(col.getName(),
 properties.get(col.getName(;
 }
 _collectionSize++;
 if ((_collectionSize % FLUSH_INTERVAL == 0)) {
 if (_index != null)
 _index.flush();
 _log.debug(Added node: + _collectionSize
 +  to:  + getCollectionName());
 }
 }
 });
 
 // long collectionNode = -1;
 if (_index != null) {
 _index.flush();
 }
 _log.debug(Completed restoring  + _collectionSize +  to: 
 + getCollectionName());
 return collectionNode;
 }
 
 
 and then around that a higher level function that handles all tables:-
 
 public void run() {
 throwIfNull(_restorers, Restorers missing);
 throwIfNull(_inserter, Batch inserter missing);
 int totalNodes = 0;
 int totalRelationships = 0;
 try {
 for (CollectionRestorer r : _restorers) {
 long collection = r.restoreCollection();
 totalNodes += r.getCollectionSize();
 _inserter.createRelationship(_inserter.getGraphDbService()
 .getReferenceNode().getId(), collection,
 RdmRelationship.CLASS_EXTENT, null);
 }
 for (ParentChildRelationshipBuilder r : _relators) {
 r.makeRelationships();
 totalRelationships += r.getRelations();
 
 }
 } finally {
 _inserter.shutdown();
 _log.info(Batch inserter shutdown.  Created:  + totalNodes +  
 nodes and 
 + totalRelationships +  relationships);
 }
 }
 
 Any suggestions welcome.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 

[Neo4j] LuceneIndex IllegalArgumentException

2011-06-01 Thread John Howard
Hello,

We have been consistently getting the following exception from neo4j index.
java.lang.IllegalArgumentException: Illegal Capacity: -11
at java.util.ArrayList.init(ArrayList.java:110)
at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:271)
at org.neo4j.index.impl.lucene.LuceneIndex.get(LuceneIndex.java:187)
at strategic.poc.NeoSearch.getNodes(NeoSearch.java:250)

Scenario:
We are trying to update Nodes by creating  new relationships. Before we
create a new relationship, we find the existing node by key/value.
If we update less than say 20 nodes(ie, create one new relationship to each
node), there's no problem.
However if we update say 25 or 30 or 50 nodes, we get the above exceptions
when we try to lookup for a node based on key/value.

Here's the code which does the lookup in the index to find a node:

public IndexHits getNodes(String key, String value)
{
 Index index = graphDb.index().forNodes( testIndex );
 value = value.toLowerCase();
 return index.get(key, value);  // line# 250

}

we are using neo4j1.4-M02 binaries, standalone version.
By the way, we are able to create almost 5000 new nodes in one
transacwithout any problem. We dont do lookups when creating a new node.
It's only when updating it breaks.

Is something wrong with the way we are searching or is it a bug in
LuceneIndex?
Is there a workaround?


Thank you.

John
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] How to embed neo4j to OSGI env without spring?

2011-06-01 Thread Super Wang
Hi folks,

I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without
Spring) as a component, so I can keep a single instance of graph database
and can make it available for all other bundles.

Any ideas about how to implement this?

Thank you very much.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j Gremlin plugin part of standard Neo4j Server

2011-06-01 Thread Peter Neubauer
Tada,
the Neo4j Gremlin Plugin now included in the default server distro, making
things a lot easier :)

Thanks Marko and Saikat for the great work, please report back issues
everyone!

http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Wed, Jun 1, 2011 at 12:27 PM, John Bale nos...@gmail.com wrote:

 Works like a charm.

 Maybe it would be helpful to others if the JSON part was mentioned in the
 neo4j-gremlin-plugin github README.



 On Wed, Jun 1, 2011 at 12:38 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

  John,
  you need to URL encode if you are sending complex scripts. Look at
 
 
 https://github.com/neo4j/neo4j-gremlin-plugin/blob/master/src/test/java/org/neo4j/server/plugin/gremlin/GremlinPluginFunctionalTest.javafor
  the URL encoded script. That will translate into
 
  send-a-gremlin-script,-json-encoded.txt
  send-a-gremlin-script,-url-encoded.txt
  [~/code/neo/neo4j-gremlin-plugin/target/rest-api] $cat
  send-a-gremlin-script,-json-encoded.txt
  [[rest-api-send-a-gremlin-script,-json-encoded]]
  === Send a Gremlin Script, JSON encoded ===
 
  _Example request_
 
  * *+POST+*  +
  http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script+
  * *+Accept:+* +application/json+
  * *+Content-Type:+* +application/json+
  [source,javascript]
  
  {script:i = g.v(4);i.outE.inV}
  
 
 
  _Example response_
 
  * *+200:+* +OK
  * *+Content-Type:+* +application/json+
  [source,javascript]
  
  [ {
   outgoing_relationships : 
  http://localhost:7474/db/data/node/3/relationships/out;,
   data : {
 name : you
   },
   traverse : 
 http://localhost:7474/db/data/node/3/traverse/{returnType}
  ,
   all_typed_relationships : 
  http://localhost:7474/db/data/node/3/relationships/all/{-list||types},
   property : http://localhost:7474/db/data/node/3/properties/{key};,
   self : http://localhost:7474/db/data/node/3;,
   properties : http://localhost:7474/db/data/node/3/properties;,
   outgoing_typed_relationships : 
  http://localhost:7474/db/data/node/3/relationships/out/{-list||types},
   incoming_relationships : 
  http://localhost:7474/db/data/node/3/relationships/in;,
   extensions : {
 FunctionalTestPlugin : {
   connected_nodes : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/connected_nodes
  ,
   pathToReference : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/pathToReference
  ,
   getThisNodeOrById : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/getThisNodeOrById
  ,
   createRelationships : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/createRelationships
  ,
   getRelationshipsBetween : 
 
 
 http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/3/getRelationshipsBetween
  
 },
 GraphCloner : {
   clonedSubgraph : 
  http://localhost:7474/db/data/ext/GraphCloner/node/3/clonedSubgraph;
 }
   },
   create_relationship : 
  http://localhost:7474/db/data/node/3/relationships;,
   all_relationships : 
  http://localhost:7474/db/data/node/3/relationships/all;,
   incoming_typed_relationships : 
  http://localhost:7474/db/data/node/3/relationships/in/{-list||types}
  } ]
  
 
  In the generated documentation. Doe that help?
 
  Cheers,
 
  /peter neubauer
 
  GTalk:  neubauer.peter
  Skype   peter.neubauer
  Phone   +46 704 106975
  LinkedIn   http://www.linkedin.com/in/neubauer
  Twitter  http://twitter.com/peterneubauer
 
  http://www.neo4j.org   - Your high performance graph
 database.
  http://startupbootcamp.org/- Öresund - Innovation happens HERE.
  http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
  On Wed, Jun 1, 2011 at 11:27 AM, John Bale nos...@gmail.com wrote:
 
   Peter,
  
   I have thinks partially working.
  
   sending: script=g.v(1); works perfectly
  
   however sending: script=n=g.v(1); fails with
   = javax.script.ScriptException: groovy.lang.MissingPropertyException:
  No
   such property: n for class: Script3
  
   if I try sending: script=n=g.v(1); fails with
   = org.codehaus.groovy.control.MultipleCompilationErrorsException:
  startup
   failed:\nScript6.groovy: 49: unexpected char: 0x @ line 49, column
  3.\n
\n\n ^\n\n1 error\n
  
   So the question is, how can I assign a variable?
  
  
  
  
   On Tue, May 31, 2011 at 11:46 PM, Peter Neubauer 
   peter.neuba...@neotechnology.com wrote:
  
Now the files should be uploaded.
   
Have fun!
   
Cheers,
   
/peter neubauer
   
GTalk:  

Re: [Neo4j] How to embed neo4j to OSGI env without spring?

2011-06-01 Thread Andreas Kollegger
Hey,

The Neo4j libraries should be usable within OSGi, though we're a bit lax in 
keeping on top of that. The best approach would be to use one bundle to 
instantiate the database and advertise the reference as a service for use by 
other bundles. 

Cheers,
Andreas

On Jun 1, 2011, at 8:25 PM, Super Wang wrote:

 Hi folks,
 
 I'm new to neo4j and I'm going to embed neo4j to my OSGI environment(without
 Spring) as a component, so I can keep a single instance of graph database
 and can make it available for all other bundles.
 
 Any ideas about how to implement this?
 
 Thank you very much.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user