Re: [Neo4j] neo4j-python Database Connection Pooling

2010-12-22 Thread Tobias Ivarsson
Hi James,

Neo4j-python uses the Neo4j Embedding capabilities. This means that there is
no such thing as a connection, and thus nothing to pool.
You definitely don't want to startup and shut down the database for each
request. What you want to do is tie the lifecycle of Neo4j to the lifecycle
of your application.
The fact that Neo4j-python embeds Neo4j has one drawback though. It limits
you to only being able to use the Neo4j database from one process.
This is a shortcoming we intend to solve in Q1 of 2011.

Cheers,
Tobias

On Tue, Dec 21, 2010 at 7:43 PM, James Thornton ja...@jamesthornton.comwrote:

 Hello -

 How do you set up a connection pool in neo4j-python? -- I am new to
 neo4. I am working on setting up neo4j-python in Pyramid (the new
 Pylons), and I don't want to build up and tear down DB connections
 each time.

 Thank you.

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




-- 
Tobias Ivarsson tobias.ivars...@neotechnology.com
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] LuceneSail queries returning empty result

2010-12-22 Thread Mattias Persson
Your exception is thrown because you've got a '*' as the first
character of your query. By default the lucene query parser doesn't
allow this, but you can override that by a call to
QueryParser#setAllowLeadingWildcard(boolean). How you would do that in
your setting I don't know, though.

Den tisdag 21 december 2010 skrev Schmidt, Dennisdennis.schm...@sap.com:
 Hi all,

 I am currently using the LuceneSail on top of a 
 DirectTypeHierarchyInferencer, ForwardChainingRDFSInferencer and a 
 MemoryStore.
 When using the following query, the LuceSail is obviously already working 
 somehow, since the queries are roughly twice as fast as before. Still not the 
 real performance gain I was expecting from using Lucene (side note: the 
 Strings are in fact only short text snippets of usually no more than 30 
 characters).
 
 SELECT entity, name, type
 FROM {entity} rdfs:label {name} rdf:type {type}
 WHERE name LIKE *search this* IGNORE CASE
 
 The LuceneSail homepage 
 (http://dev.nepomuk.semanticdesktop.org/wiki/LuceneSail) introduces a 
 different query format for using LuceneSail, so I was using this instead to 
 see what happens. I changed the query to look like this then:
 
 PREFIX search:http://www.openrdf.org/contrib/lucenesail#
 SELECT ?entity ?name ?type WHERE {
 ?entity search:matches ?match ;
         rdf:type ?type .
 ?match  search:query *search this* . }
 
 I only changed from SERQL to SPARQL because SPARQL was used in the example as 
 well. With this, the query is being executed correctly (meaning no Exceptions 
 or anything) but then, there are never any  results returned and the query 
 execution is blazingly fast (which leads me to the conclusion it is in fact 
 not executed as expected).

 So am I missing something there or what might be the reason? Another to me 
 unexpected behaviour is that, when using a wildcard character at the 
 beginning of a search string, I get the following error message. Why can I 
 not use a wildcard at the beginning here? Doesn't make any sense to me.
 
 org.openrdf.sail.lucene.LuceneQueryIterator - There was a problem evaluating 
 query '*search this*' for property 'null!
 org.apache.lucene.queryParser.ParseException: Cannot parse '*search this*': 
 '*' or '?' not allowed as first character in WildcardQuery
 

 Thanks a lot in advance,
 Dennis

 ___
 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] REST support for neo4j-spatial

2010-12-22 Thread Peter Neubauer
Jan,
there are a number of things to it. Right now, we are working on
exposing some of the spatial functionality via JRuby and the Neo4j
ruby bindings in order to make it easy and bloggable, especially
regarding OpenStreetMap operation. After that, we are planning 2
things:

1. Look into integration into the Neo4j Index API

2. If integrated as an index, this will automatically be available in
the REST API as just one more available index, if you drop the
Neo4j-Spatial jars into /plugins.

3. Write some spatial server plugins that can expose more targeted
spatial queries, see
http://components.neo4j.org/neo4j-examples/1.2-SNAPSHOT/server-plugins.html

We hope to have the first index-integration going in January, but
don't quote me on 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Dec 21, 2010 at 9:09 PM, Jan Boonen jan.boo...@geodan.nl wrote:
 I don't know if people have already spoken about this topic on the chat,
 but if so, could anyone post the outcome of the discussion on REST
 support for neo4j-spatial?

 Many thanks,

 Jan

 Sounds fine to me. The main idea behind this suggestion is to support
 concurrent access and the new server component. I can think of many use
 cases where data is inserted in aa database from any type of client and
 the result is accessed via e.g. geoserver. Currently we'd use PostGIS
 for such an architecture, but Neo4j looks very promising for many projects.

 Anyway, if you need some support in this area, I'm willing to talk about
 cooperation. Drop me a line if needed.

 Cheers,

 Jan

 On 17-11-2010 18:13, Craig Taverner wrote:
 Very interesting option. I think I need to chat to the neo4j rest guys
 tomorrow to find out a little more about what would be required to make this
 happen.

 On Wed, Nov 17, 2010 at 5:41 PM, Javier de la Rosaver...@gmail.com   
 wrote:

 On Wed, Nov 17, 2010 at 10:46, Jan Boonenjan.boo...@geodan.nl   wrote:
 I was wondering if someone is planning to support REST for
 neo4j-spatial. It would be great for example if we can connect GeoTools
 to a Neo4j REST server.
 +1



 --
 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 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] Problem connecting database

2010-12-22 Thread Peter Neubauer
Boris,
in the server component,
dependency
  groupIdcom.sun.jersey/groupId
  artifactIdjersey-server/artifactId
  version1.4/version
/dependency

is used.

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Dec 22, 2010 at 2:35 PM, Boris Zielinski
boris.zielin...@informatik.hu-berlin.de wrote:
 Hi all,
 im new to neo4j and just set up a database on a linux box.
 This part was easy.DB works testing it with the curl examples.
 Now i was trying to connect to that database using Java -
 im using the Create Simple Graph example.
 I downloaded and imported external jars, jersey client and core.
 Trying to run the examle script i keep getting the error :
 java.lang.NoClassDefFoundError: javax/ws/rs/ext/Providers
 Some google brings out Class Providers is not part of all releases of
 jersey.
 so what release do i have to use to get it work - or did i miss
 something different?
 Cheers
 Boris
 ___
 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] REST support for neo4j-spatial

2010-12-22 Thread Jan Boonen
Sounds great. Thanks for answering my question and keep up the good work!

 Jan,
 there are a number of things to it. Right now, we are working on
 exposing some of the spatial functionality via JRuby and the Neo4j
 ruby bindings in order to make it easy and bloggable, especially
 regarding OpenStreetMap operation. After that, we are planning 2
 things:

 1. Look into integration into the Neo4j Index API

 2. If integrated as an index, this will automatically be available in
 the REST API as just one more available index, if you drop the
 Neo4j-Spatial jars into /plugins.

 3. Write some spatial server plugins that can expose more targeted
 spatial queries, see
 http://components.neo4j.org/neo4j-examples/1.2-SNAPSHOT/server-plugins.html

 We hope to have the first index-integration going in January, but
 don't quote me on 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



 On Tue, Dec 21, 2010 at 9:09 PM, Jan Boonenjan.boo...@geodan.nl  wrote:
 I don't know if people have already spoken about this topic on the chat,
 but if so, could anyone post the outcome of the discussion on REST
 support for neo4j-spatial?

 Many thanks,

 Jan

 Sounds fine to me. The main idea behind this suggestion is to support
 concurrent access and the new server component. I can think of many use
 cases where data is inserted in aa database from any type of client and
 the result is accessed via e.g. geoserver. Currently we'd use PostGIS
 for such an architecture, but Neo4j looks very promising for many projects.

 Anyway, if you need some support in this area, I'm willing to talk about
 cooperation. Drop me a line if needed.

 Cheers,

 Jan

 On 17-11-2010 18:13, Craig Taverner wrote:
 Very interesting option. I think I need to chat to the neo4j rest guys
 tomorrow to find out a little more about what would be required to make 
 this
 happen.

 On Wed, Nov 17, 2010 at 5:41 PM, Javier de la Rosaver...@gmail.com 
 wrote:

 On Wed, Nov 17, 2010 at 10:46, Jan Boonenjan.boo...@geodan.nl wrote:
 I was wondering if someone is planning to support REST for
 neo4j-spatial. It would be great for example if we can connect GeoTools
 to a Neo4j REST server.
 +1



 --
 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 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] Problem connecting database

2010-12-22 Thread Boris Zielinski
Peter, thanks for the quick help.
For those who encounter the same problem:
i solved it by using jersey client and core 1.5.ea08 jars (may work with
1.4 too).
since the jars appear to miss some classes(!), i added the missing
classes from source manually.now i works like charm.
Cheers
Boris

 Am 22.12.2010 14:59, schrieb Peter Neubauer:
 Boris,
 in the server component,
 dependency
   groupIdcom.sun.jersey/groupId
   artifactIdjersey-server/artifactId
   version1.4/version
 /dependency
 
 is used.
 
 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
 
 On Wed, Dec 22, 2010 at 2:35 PM, Boris Zielinski
 boris.zielin...@informatik.hu-berlin.de wrote:
 Hi all,
 im new to neo4j and just set up a database on a linux box.
 This part was easy.DB works testing it with the curl examples.
 Now i was trying to connect to that database using Java -
 im using the Create Simple Graph example.
 I downloaded and imported external jars, jersey client and core.
 Trying to run the examle script i keep getting the error :
 java.lang.NoClassDefFoundError: javax/ws/rs/ext/Providers
 Some google brings out Class Providers is not part of all releases of
 jersey.
 so what release do i have to use to get it work - or did i miss
 something different?
 Cheers
 Boris
 ___
 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] Fatty Stack Trace to Lift your Spirits

2010-12-22 Thread Marko Rodriguez
Hi Neo4jians,

So I bumped Blueprints 0 .4-SNAPSHOT to use 1.2M06 and during the test suite 
evaluation, I was getting fatty stack traces being thrown all up in my face 
left, right, and yes, center.

My random thought on the matter---Luca and I have been having *potentially* 
similar problems with OrientDB and shutting down, opening, and deleting the DB 
really fast. Don't know if this is the same issue now showing up in Neo4j? The 
TestSuite will, in general, create a graph (directory), use it, close it, open 
it, delete the directory, create a new graph (directory), etc. Is the OS not 
having happy good time? Why happy good time with 1.2M05?

Solve my problem or be destroyed,
Marko.



Testing testClear...
- 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)java.lang.RuntimeException:
 org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: 
NativeFSLock@/private/tmp/blueprints_test/index/lucene/relationship/edges/write.lock
at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:581)
at 
org.neo4j.index.impl.lucene.CommitContext.ensureWriterInstantiated(CommitContext.java:60)
at 
org.neo4j.index.impl.lucene.LuceneCommand$AddRelationshipCommand.perform(LuceneCommand.java:211)
at 
org.neo4j.index.impl.lucene.LuceneTransaction.doCommit(LuceneTransaction.java:231)
at 
org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:319)
at 
org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.commit(XaResourceManager.java:447)
at 
org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.commit(XaResourceHelpImpl.java:65)
at 
org.neo4j.kernel.impl.transaction.TransactionImpl.doCommit(TransactionImpl.java:517)
at 
org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:623)
at 
org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:586)
at 
org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:105)
at 
org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:86)
at 
com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.autoStopTransaction(Neo4jGraph.java:331)
at 
com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.addEdge(Neo4jGraph.java:216)
at 
com.tinkerpop.blueprints.pgm.GraphTestSuite.testClear(GraphTestSuite.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.doTestSuite(Neo4jGraphTest.java:94)
at 
com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.testGraphTestSuite(Neo4jGraphTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed 
out: 

[Neo4j] I built my metamodel, now what?

2010-12-22 Thread Adam Mendlik
I've been looking at the metamodel component and found a few good examples
of how to create a metamodel. My question is, once it's created, what can I
do with it? Say I create a 'Person' metamodel class with properties like
first_name (string), last_name (string), birthday (date), etc. Can I then
instantiate an object of the 'Person' class and have the property
restictions automatically applied? In other words, can I create a node that
is associated with a particular metamodel class and use some generic
interface to set properties that enforces the metamodel restrictions?
Or is the metamodel component mainly a way to store the metamodel
information and it is left up to the programmer to inspect it and enforce
the rules defined within it?

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


Re: [Neo4j] New Index API replacing the old one in REST

2010-12-22 Thread Peter Neubauer
Hi there,
do things work better with the 1.2.M06 milstone?

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Dec 21, 2010 at 3:03 AM, J T jt4websi...@googlemail.com wrote:
 Unfortunately I get an undefined class error when trying to add a node using
 curl.

 I'll investigate a bit further tomorrow and replu properly then.


 On Mon, Dec 20, 2010 at 10:30 PM, Peter Neubauer 
 peter.neuba...@neotechnology.com wrote:

 Well,
 just tried the download. That one doesn't even start since there are
 dependencies missing. Need to check why that is happening tomorrow.
 But
 http://buildbox.neo4j.org/hudson/job/neo4j-standalone/ws/trunk/target/neo4j-1.2-SNAPSHOT-unix.tar.gz
 should work, just tried it.

 From the beginning, there are not indexes, so oyu can create one (on nodes)
 with

 curl -HContent-Type:application/json -X POST -d
 'http://localhost:7474/db/data/node/123;'
 http://localhost:7474/db/data/index/node/my_nodes/foo/bar

 then, surfing to http://localhost:7474/db/data/index/node should show
 you the HTML rendering (in Firefox) or the JSON representation of that
 index. Same for relatoinships.

 Does that work?

 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



 On Mon, Dec 20, 2010 at 9:57 PM, J T jt4websi...@googlemail.com wrote:
  Peter,
 
  You say the version of the server (with relationship indexes) be
 available
  in M06.
 
  Is it already available in the snapshot download ?
 
  e.g. thsi one: http://neo4j.org/get?file=neo4j-1.2-SNAPSHOT-unix.tar.gz??
 
  I tried earlier but that didnt seem to have any rest index support.
 
  JT
 
 
 
  On Mon, Dec 20, 2010 at 4:48 PM, Peter Neubauer 
  peter.neuba...@neotechnology.com wrote:
 
  Javier,
  look at
 
 http://components.neo4j.org/neo4j-server/0.1-SNAPSHOT/rest.html#Listing_node_indexes
  for the version that will come out now. Pretty similar to the old way
  except that it supports even relationship indexes.
 
  Let us know if you have any questions!
 
  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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
 
 
 
  On Mon, Dec 20, 2010 at 1:03 PM, Peter Neubauer
  peter.neuba...@neotechnology.com wrote:
   Javier,
   we are trying to be compatible with the existing API, but will move it
   to a location that is future prove (that is, for the more powerful
   indexing features there will be new URLs added). Will decide on the
   location after lunch :)
  
   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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
 party.
  
  
  
   On Mon, Dec 20, 2010 at 12:21 PM, Javier de la Rosa ver...@gmail.com
 
  wrote:
   On Mon, Dec 20, 2010 at 12:18, Peter Neubauer
   peter.neuba...@neotechnology.com wrote:
   Graphytes,
   the exposure of the new Index on relationships and nodes in the
 Neo4j
   REST API will be part of M06, so anyone using the Index in their
   bindings will need to switch to that API. I am thinking of the PHP,
   .NET, Ruby and Perl bindings (Max, @onewheelgood, Javier and all
   others).
  
   Great news!
   Where is the documentation to apply the new changes on the index
  behaviour?
  
  
  
   --
   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 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] Visualisation tools for Neo4J 1.2?

2010-12-22 Thread Nat Pryce
I'm currently using Neo4J 1.0 because I find Neoclipse useful for
exploring my database structure and Neoclipse does not work with
version 1.2. But I'd like to take advantage of all the new features.
What out-of-the-box options exist for visualising v1.2 databases?

--Nat

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


Re: [Neo4j] Visualisation tools for Neo4J 1.2?

2010-12-22 Thread Peter Neubauer
Nat,
the current trunk NeoClipse version is running against Neo4j 1.2
builds. We are just sorting out the licensing in order to be able to
put it as a public download. Hope to solve this first thing after the
Holidays.

Otherwise, Gephi is coming along with lazy-traveral support (initially
just depth-limit, but really great to see it emerging), so that should
be an upcoming good option too as it matures.

If you need a NeoClipse prebuilt version now, contact me off-list and
I will get it to you!

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Dec 22, 2010 at 8:27 PM, Nat Pryce nat.pr...@gmail.com wrote:
 I'm currently using Neo4J 1.0 because I find Neoclipse useful for
 exploring my database structure and Neoclipse does not work with
 version 1.2. But I'd like to take advantage of all the new features.
 What out-of-the-box options exist for visualising v1.2 databases?

 --Nat

 www.natpryce.com
 ___
 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] Fatty Stack Trace to Lift your Spirits

2010-12-22 Thread Chris Gioran
On Wed, Dec 22, 2010 at 6:11 PM, Marko Rodriguez okramma...@gmail.com wrote:

 So I bumped Blueprints 0 .4-SNAPSHOT to use 1.2M06 and during the test suite 
 evaluation, I was getting fatty stack traces being thrown all up in my face 
 left, right, and yes, center.

As long as they are not coming from below, there is no reason for
alarm. However...

 My random thought on the matter---Luca and I have been having *potentially* 
 similar problems with OrientDB and shutting down, opening, and deleting the 
 DB really fast. Don't  know if this is the same issue now showing up in 
 Neo4j? The TestSuite will, in general, create a graph (directory), use it, 
 close it, open it, delete the directory, create a  new graph (directory), 
 etc. Is the OS not having happy good time? Why happy good time with 1.2M05?

I slapped up a loop doing pretty much that - create a db, store+index
a few things, close, [open, read, close] (in a loop), delete, do over,
for around 50 iterations. Using straight up (no tinkerpop stack)
vanilla 1.2M06 on Ubuntu 10.10. No problems so far. I will leave it to
run for a while, to teach my HDD some manners and I will check it
again later. That lock file left behind, however, smells like
crash/improper shutdown (or overlapping instances?). That really fast
open/shutdown cycle you speak of, how do you do it, shell script or
from main()? Does the problem appear in every cycle or intermittently?

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


Re: [Neo4j] Fatty Stack Trace to Lift your Spirits

2010-12-22 Thread Peter Neubauer
Mattias,
could this be related to the Index locking optimizations you have been doing?

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Dec 22, 2010 at 5:11 PM, Marko Rodriguez okramma...@gmail.com wrote:
 Hi Neo4jians,

 So I bumped Blueprints 0 .4-SNAPSHOT to use 1.2M06 and during the test suite 
 evaluation, I was getting fatty stack traces being thrown all up in my face 
 left, right, and yes, center.

 My random thought on the matter---Luca and I have been having *potentially* 
 similar problems with OrientDB and shutting down, opening, and deleting the 
 DB really fast. Don't know if this is the same issue now showing up in Neo4j? 
 The TestSuite will, in general, create a graph (directory), use it, close it, 
 open it, delete the directory, create a new graph (directory), etc. Is the OS 
 not having happy good time? Why happy good time with 1.2M05?

 Solve my problem or be destroyed,
 Marko.

 

 Testing testClear...
 - 
 org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)java.lang.RuntimeException:
  org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: 
 NativeFSLock@/private/tmp/blueprints_test/index/lucene/relationship/edges/write.lock
        at 
 org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:581)
        at 
 org.neo4j.index.impl.lucene.CommitContext.ensureWriterInstantiated(CommitContext.java:60)
        at 
 org.neo4j.index.impl.lucene.LuceneCommand$AddRelationshipCommand.perform(LuceneCommand.java:211)
        at 
 org.neo4j.index.impl.lucene.LuceneTransaction.doCommit(LuceneTransaction.java:231)
        at 
 org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:319)
        at 
 org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.commit(XaResourceManager.java:447)
        at 
 org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.commit(XaResourceHelpImpl.java:65)
        at 
 org.neo4j.kernel.impl.transaction.TransactionImpl.doCommit(TransactionImpl.java:517)
        at 
 org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:623)
        at 
 org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:586)
        at 
 org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:105)
        at 
 org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:86)
        at 
 com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.autoStopTransaction(Neo4jGraph.java:331)
        at 
 com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraph.addEdge(Neo4jGraph.java:216)
        at 
 com.tinkerpop.blueprints.pgm.GraphTestSuite.testClear(GraphTestSuite.java:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
 com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.doTestSuite(Neo4jGraphTest.java:94)
        at 
 com.tinkerpop.blueprints.pgm.impls.neo4j.Neo4jGraphTest.testGraphTestSuite(Neo4jGraphTest.java:43)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at 
 org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
        at 
 org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at 
 org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
        at 
 org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   

Re: [Neo4j] I built my metamodel, now what?

2010-12-22 Thread Niels Hoogeveen

The metamodel component only allows you to store meta information about the 
entities in the database and offers no further functionality, except for 
importing rdfs data. To use the metamodel component in an application to do 
constraint verification, you will have to write the logic yourself, although 
this quite a straight forward exercise. 
For my own projects I use a wrapper around Node and Relationship to make them 
metamodel aware, and don't use the standard API for node and relationship in 
any other parts of the software than in this wrapper. 
The current metamodel component as a modelling tool has a few shortcomings I 
ended up addressing in my own projects:
* It's not possible to model metaobjects (including namespaces)* It's not 
possible to model the referencenode* The metaobjects don't allow the modelling 
of graph layout (ie. dense versus bipartite layout). 
When using a bipartite layout, extra options become available: Relationships 
and Properties can have Relationships and Properties. It is not possible to 
directly model that in the current metamodel component. 
Niels
 Date: Wed, 22 Dec 2010 11:45:37 -0700
 From: amend...@gmail.com
 To: user@lists.neo4j.org
 Subject: [Neo4j] I built my metamodel, now what?
 
 I've been looking at the metamodel component and found a few good examples
 of how to create a metamodel. My question is, once it's created, what can I
 do with it? Say I create a 'Person' metamodel class with properties like
 first_name (string), last_name (string), birthday (date), etc. Can I then
 instantiate an object of the 'Person' class and have the property
 restictions automatically applied? In other words, can I create a node that
 is associated with a particular metamodel class and use some generic
 interface to set properties that enforces the metamodel restrictions?
 Or is the metamodel component mainly a way to store the metamodel
 information and it is left up to the programmer to inspect it and enforce
 the rules defined within it?
 
 Thanks,
 Adam
 ___
 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] Transaction and REST API

2010-12-22 Thread Ido Ran
Well, as you said there are number of ways to do it.
This post describe a way to do
ithttp://jcalcote.wordpress.com/2009/08/06/restful-transactions/,
but it's not the post that is the main issue but the comments below it.
There is still no consensus about what is the RESTful way of doing tx in
RESTful web service.

For sure POST a tx start url and POST for commit (while holding a real
database tx) is not a good solution for me. It's not scalable and will block
users from even READ depend on my isolation level in the database.

I guess it all comes down to how specific my RESTful interface. In my
example the current need for tx is to create or delete both node and link,
then I might as well create a resource that handle it and work with it.
The problem off course is that later on (sooner then I think) I will need to
create two links in one tx, and then I will need a new resource for two
links and so on.

BULK resource are not so likable on RESTful people, but I guess it can work
really well for my case.
I'll create a BULK change resource, fill it with the changes I want to do
and finally change it state to commit which will then and only then start a
DB tx, do the changes (maybe check ETag to make sure nothing change in
between) and finally commit the tx.

That's what I'm thinking about it.

Ido

On Mon, Dec 20, 2010 at 9:42 PM, Christopher Schmidt 
fakod...@googlemail.com wrote:

 I written a couple of REST services and clients over the past years and it
 is always a subject of discussions: How to map transactions with a
 stateless
 RESTful service?

 We always did it like Neo4j, every REST call is a implicit transaction. If
 this is not sufficient we implemented BULK or combined calls for bulk
 deletions or creations etc. But the question is: Is it really impossible to
 implement transactions?

 We can use
 - the session context with invalidating a session or timeout is a rollback
 (this will be expensive...)
 - or POSTing a new transaction returning a Trx ID, subsequent write or
 update operations are containing a transaction ID
 - using custom HTTP header
 - (whatever)

 All this violates the stateless paradigm. But the reality of the Web is: we
 do have HTTP sessions, cookies, baskets etc. And scalability is a question
 of server implementation, isn't it?

 What do you think?

 On Mon, Dec 20, 2010 at 12:28 PM, Jim Webber j...@neotechnology.com
 wrote:

  Hi Ido,
 
  Those make good sense. And I think I have some reasonable RESTful
  approaches in mind for tackling them which don't need transactions (using
  Ian Robinson's typed links to forms approach here).
 
  1. Bulk create of nodes and relations:
   - PUT a set of nodes and relations to the server, relative to some node,
  or to the graph itself.
 
   - Work needed: define a graph format (e.g. using JSON) to describe nodes
  and relations.
 
  2. Remove relations:
   - GET a removal form (optional, will be cacheable for a long time
  anyway)
   - Populate the removal form with the nodes to be deleted, POST it to the
  server
   - Server responds with the URI of a (transient) resource that represents
  all the nodes and relations you previously specified.
   - DELETE the transient resource
 
   - Work needed: design a removal form (effectively a deletion
 manifest),
  a little processing logic on the server side
 
  3. Clone subgraphs
   - Use a form to select a start node, terminating condition (e.g. depth),
  POST its URI to the cloning URI with a traversal description (or just
  something as simple as a termination condition for a df/bf search) which
  itself is created by filling in a form.
 
   - Work needed: a clone algorithm for the server; form that allows us to
  describe the graph for the clone; URI to POST back the form to the graph.
 
 
 
  OK, so there's some substantial work to be done here. But there's a
  positive point to take away from this. In the latest milestone release we
  have a Plugin mechanism where end users are able to extend the behaviour
 of
  graphs/nodes in order to implement all these kinds of domain specific
  things.
 
  Right now as we're testing the new Plugin stuff, I'm going to implement a
  simple clone subgraph plugin. I'll post the code and the wire-level HTTP
  here when I'm done so you can see how you might implement similar stuff
 for
  your domain (the code will also be in SVN under
 examples/server-extension).
 
  Jim
 
  PS - It occurs to me though, that if 3rd party plugins become very
 popular,
  we could over time bring them into core and take some responsibility for
  them. Perhaps.
 
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 



 --
 Christopher
 twitter: @fakod
 blog: http://blog.fakod.eu
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list