Re: [Neo4j] How to download neo4j 1.3 [for using jo4Neo]

2011-07-28 Thread BatiG
When I use nginx as a proxy and block the access to the port 7474, It seems
that the connection is lost when I'm on the web application...

If I understand, the instance of the neo4j ui server is running on jetty?
Why is not possible to configure jetty like we want?

thanks

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3206212.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] HyperRelationship example

2011-07-28 Thread Niels Hoogeveen

Hi John,
Thanks for showing an interest. 
The compile error you got was due to the fact that a removed class was still 
hanging around in the Git repo. I renamed BinaryRelationshipRoles into 
BinaryRelationshipRole, but the original file was still active in the Git repo. 
I fixed that.
I have been thinking about BDB too for this situation, because the graph 
database now stores some information about the associated nodes and their 
reverse lookup. This of course polutes the name/node space. It would be neat to 
offload this book keeping information to some persistent hashmap, so the 
implementation is completely transparent to the user.
I don't know how nicely BDB plays with Neo4J transactions. Does anyone have 
experience with this?
Another aspect is licencing. I am no legal buff, so maybe someone else can jump 
in and answer this. 
Personally, I don't mind adding BDB as a dependency, but it has to work well at 
the transaction level and licence wise, otherwise it's a no go for me. 
I would recommend you to start using maven. There is an Eclipse plugin 
m2eclipse, which allows you to use/maintain Maven projects from within Eclipse.
Niels

 Date: Thu, 28 Jul 2011 05:09:54 +0200
 From: cyuczie...@gmail.com
 To: user@lists.neo4j.org
 Subject: Re: [Neo4j] HyperRelationship example
 
 Hey Niels,
 
 I like xD
 this seems like a lot of work and professionally done; ie. something I could
 not have done (I don't have that kind of experience and focus). Gratz on
 that, I really appreciate seeing this.
 
 I cloned the repo from git, manually, with eclipse (not using maven - don't
 know how with eclipse)
 I am getting only about 3 compile errors, like:
 1) The type BinaryRelationshipRolesT must implement the inherited abstract
 method PropertyContainer.getId()
 2) The constructor PropertyTypeT(String, GraphDatabaseService) is not
 visible
 3) The return type is incompatible with
 RelationshipContainer.getRelationships()
 for
 org.neo4j.collections.graphdb.impl.RelationshipIterable.RelationshipIterable(IterableRelationship
 rels)
 
 
   Also, I am thinking to try and implement this on top of berkeleydb just
 for fun/benchmarking (so to speak) to compare between that and neo4j - since
 I am currently unsure which one to use for my hobby project (I like that
 berkeleydb's searches are 0-1ms instead of few seconds)
 
 Btw, would it be any interest to you if I were to fork your repo and add ie.
 AllTests.java for junit and the .project and related files for eclipse
 project in a pull or two ? as long as it doesn't seem useless or
 cluttering... (note however I never actually, yet, used forkpull but only
 read about it on github xD)
 
 Thanks to all, for wasting some time reading this,
 Greeting and salutations,
 John
 
 On Wed, Jul 27, 2011 at 8:48 PM, Niels Hoogeveen
 pd_aficion...@hotmail.comwrote:
 
 
  I just posted an example on how to use HyperRelationships:
 
 
  https://github.com/peterneubauer/graph-collections/wiki/HyperRelationship-example
 
  There is now a proper test for HyperRelationships, so I hereby push the
  software to Beta status.
 
  Please try out the Enhanced API and HyperRelationships and let me know what
  needs improvement.
 
  Niels
  ___
  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] strange problem while getting a node property

2011-07-28 Thread Jean-Sébastien Stoffen
Hi,
I've this strange problem when I try to collect data from the graph with 
the Java API in Groovy :

db.allNodes.each {node -
 cpt=0
 node.getRelationships().each {rel -
 cpt++
 }
 println (${node} ${cpt})
 println node.getPropertyKeys()
}

The iteration on each node is right working.
The iteration to count the relationships on each node is working too.

The call node.getPropertyKeys() gives me the list of the properties like 
this :
[nbrel, version, maintainer, section, architecture, package, priority, 
dataset, installedSize]

But,

If a call node.getProperty(package)
I receive this error :
Caught: org.neo4j.graphdb.NotFoundException: package property not found 
for NodeImpl#0

And, If I set the value just before, for test like this :
node.setProperty(package, test)
println node.getProperty(package)

I get the value.

So I can't get property which was not set by the node.setProperty method.
The initial data are copied into the graph with a perl script using the 
Neo4j REST interface.

Maybe I do something wrong,
I'm a newbie in both Neo4j and Groovy

Regards,
Jean-Sébastien Stoffen
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] strange problem while getting a node property

2011-07-28 Thread Niels Hoogeveen

When iterating over all nodes, you also pull the reference node (with id = 0), 
which probably doesn't have the requested property.
If you want to list all properties of a node, it's better to use a construct 
like:
for(String key: node.getPropertyKeys()){   
System.out.println(node.getProperty(key));}

 Date: Thu, 28 Jul 2011 13:18:50 +0200
 From: c-...@jsnet.be
 To: user@lists.neo4j.org
 Subject: [Neo4j] strange problem while getting a node property
 
 Hi,
 I've this strange problem when I try to collect data from the graph with 
 the Java API in Groovy :
 
 db.allNodes.each {node -
  cpt=0
  node.getRelationships().each {rel -
  cpt++
  }
  println (${node} ${cpt})
  println node.getPropertyKeys()
 }
 
 The iteration on each node is right working.
 The iteration to count the relationships on each node is working too.
 
 The call node.getPropertyKeys() gives me the list of the properties like 
 this :
 [nbrel, version, maintainer, section, architecture, package, priority, 
 dataset, installedSize]
 
 But,
 
 If a call node.getProperty(package)
 I receive this error :
 Caught: org.neo4j.graphdb.NotFoundException: package property not found 
 for NodeImpl#0
 
 And, If I set the value just before, for test like this :
 node.setProperty(package, test)
 println node.getProperty(package)
 
 I get the value.
 
 So I can't get property which was not set by the node.setProperty method.
 The initial data are copied into the graph with a perl script using the 
 Neo4j REST interface.
 
 Maybe I do something wrong,
 I'm a newbie in both Neo4j and Groovy
 
 Regards,
 Jean-Sébastien Stoffen
 ___
 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] strange problem while getting a node property

2011-07-28 Thread Chris Gioran
Hi Jean-Sébastien,

could you please tell us:

0. Are you sure that Node#0 is the one reporting that it has the
property key package?
1. How is the graph created? Specifically, how are the properties
added? The package property is being reported as existing, so it has
to get there somehow.
2. What version of Neo4j are you using?
3. Are the operations you described part of the same or different
transactions? The same instance of the database?

It would be very helpful if you provided a small piece of code that
reproduces what you see.

cheers,
CG

On Thu, Jul 28, 2011 at 2:18 PM, Jean-Sébastien Stoffen c-...@jsnet.be wrote:
 Hi,
 I've this strange problem when I try to collect data from the graph with
 the Java API in Groovy :

 db.allNodes.each {node -
     cpt=0
     node.getRelationships().each {rel -
             cpt++
         }
     println (${node} ${cpt})
     println node.getPropertyKeys()
 }

 The iteration on each node is right working.
 The iteration to count the relationships on each node is working too.

 The call node.getPropertyKeys() gives me the list of the properties like
 this :
 [nbrel, version, maintainer, section, architecture, package, priority,
 dataset, installedSize]

 But,

 If a call node.getProperty(package)
 I receive this error :
 Caught: org.neo4j.graphdb.NotFoundException: package property not found
 for NodeImpl#0

 And, If I set the value just before, for test like this :
 node.setProperty(package, test)
 println node.getProperty(package)

 I get the value.

 So I can't get property which was not set by the node.setProperty method.
 The initial data are copied into the graph with a perl script using the
 Neo4j REST interface.

 Maybe I do something wrong,
 I'm a newbie in both Neo4j and Groovy

 Regards,
 Jean-Sébastien Stoffen
 ___
 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] HyperRelationship example

2011-07-28 Thread John cyuczieekc
I don't know what you mean by this:
I don't know how nicely BDB plays with Neo4J transactions. 
I have some small experience with bdb java edition that is, but I'm not sure
what would their transaction have to do with neo4j transactions... if you
meant if you could make a wrapper such that you could use the same
format/interface neo4j uses for their transactions, then you can, I did some
attempt to that it works for me, also BDB Java Edition doesn't support
nested transactions either (the C++ version does), but emulating them to use
the same root/parent transaction is easy, my attempt is here:
https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
probably not much relevant though. But this file here:
https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
I made to use both neo4j and bdb to do the same thing, that is:
create nodes(uppercase named ones) with these rels:
ROOT_LIST -- START
ROOT_LIST -- half a million unique nodes
ROOT_LIST -- MIDDLE
ROOT_LIST -- another half a million unique nodes
ROOT_LIST -- END

then make both bdb and neo4j check if the following rels exist:
ROOT_LIST -- START
ROOT_LIST -- MIDDLE
ROOT_LIST -- END
(you probably saw this already in another post)
But both bdb and neo4j now use transactions... that is, in my test file.

About licensing, I'm not much into that but here's the license for Berkeley
DB Java Edition:
http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
Looks like New(or normal?) BSD license or something ...
also

Licensing

Berkeley DB is available under dual license:

   - Public license that requires that software that uses the Berkeley DB
   code be free/open source software; and
   - Closed source license for non-open source software.

If your code is not redistributed, no license is required (free for in-house
use).



from http://www.orafaq.com/wiki/Berkeley_DB#Licensing


I would totally use neo4j, if it would be as fast at searches :/ ie. BTree
storage of nodes/rels? (guessing)

But having 10mil rels, and seeing BDB checking if A--B in 0ms, and neo4j in
like 0 to 66 to 310 seconds (depending on its position)

is a show stopper for me, especially because I want to base everything on
just nodes (without properties) and their relationships. ie. make a set or
list of things, without having A ---[ENTRY]-- e ---[NEXT] --- e2  but
instead A-b-e-c-e2  where b and c are just nodes, and also
AllEntries-b  and AllNexts-c   (silly example with such less info tho)

Point is, I would do lots of searches a lot (imagine a real time program
running on top of nodes/rels, that is it's defined in and can access only
nodes), this would likely cause those ms to add up to seconds...


I installed maven (m2e) again, I guess I could use it, but it seems it
creates .jar , not sure if that's useful to me while I am coding... seems
better to use project/sources no? and maven only when ready to publish/get
the jar ; anyway I need to learn how to use it otherwise I'm getting errors
like this , when trying to build:

[ERROR]   The project org.neo4j:neo4j-graph-collections:1.5-SNAPSHOT
(E:\wrkspc\graph-collections\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: The repository system is offline but
the artifact org.neo4j:parent-central:pom:21 is not available in the local
repositor
y. and 'parent.relativePath' points at wrong local POM @ line 4, column 11
- [Help 2]



Anyway, with normal eclipse, I'm still showing 2 different errors:

1) in org.neo4j.collections.graphdb.ComparablePropertyTypeT

line 29: super(name, graphDb);

The constructor PropertyTypeT(String, GraphDatabaseService) is not visible

2) org.neo4j.collections.graphdb.impl.NodeLikeImpl.getRelationships()
The return type is incompatible with
RelationshipContainer.getRelationships()

3)
org.neo4j.collections.graphdb.impl.NodeLikeImpl.getRelationships(RelationshipType...)
The return type is incompatible with
RelationshipContainer.getRelationships(RelationshipType[])


John.

On Thu, Jul 28, 2011 at 12:52 PM, Niels Hoogeveen pd_aficion...@hotmail.com
 wrote:


 Hi John,
 Thanks for showing an interest.
 The compile error you got was due to the fact that a removed class was
 still hanging around in the Git repo. I renamed BinaryRelationshipRoles into
 BinaryRelationshipRole, but the original file was still active in the Git
 repo. I fixed that.
 I have been thinking about BDB too for this situation, because the graph
 database now stores some information about the associated nodes and their
 reverse lookup. This of course polutes the name/node space. It would be neat
 to offload this book keeping information to some persistent hashmap, so the
 implementation is completely transparent to the user.
 I don't know how nicely BDB plays with Neo4J transactions. Does anyone have
 experience with this?
 Another aspect is licencing. I am no legal buff, so maybe someone else can
 jump 

Re: [Neo4j] HyperRelationship example

2011-07-28 Thread Anders Nawroth
Hi!

I think the hard part about transactions is recovering after crashes and 
such.

Regarding finding A--B, have you tried using a relationship index? See:
http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/ReadableRelationshipIndex.html

/anders

On 07/28/2011 01:35 PM, John cyuczieekc wrote:
 I don't know what you mean by this:
 I don't know how nicely BDB plays with Neo4J transactions.
 I have some small experience with bdb java edition that is, but I'm not sure
 what would their transaction have to do with neo4j transactions... if you
 meant if you could make a wrapper such that you could use the same
 format/interface neo4j uses for their transactions, then you can, I did some
 attempt to that it works for me, also BDB Java Edition doesn't support
 nested transactions either (the C++ version does), but emulating them to use
 the same root/parent transaction is easy, my attempt is here:
 https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
 probably not much relevant though. But this file here:
 https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
 I made to use both neo4j and bdb to do the same thing, that is:
 create nodes(uppercase named ones) with these rels:
 ROOT_LIST --  START
 ROOT_LIST --  half a million unique nodes
 ROOT_LIST --  MIDDLE
 ROOT_LIST --  another half a million unique nodes
 ROOT_LIST --  END

 then make both bdb and neo4j check if the following rels exist:
 ROOT_LIST --  START
 ROOT_LIST --  MIDDLE
 ROOT_LIST --  END
 (you probably saw this already in another post)
 But both bdb and neo4j now use transactions... that is, in my test file.

 About licensing, I'm not much into that but here's the license for Berkeley
 DB Java Edition:
 http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
 Looks like New(or normal?) BSD license or something ...
 also
 
 Licensing

 Berkeley DB is available under dual license:

 - Public license that requires that software that uses the Berkeley DB
 code be free/open source software; and
 - Closed source license for non-open source software.

 If your code is not redistributed, no license is required (free for in-house
 use).

 

 from http://www.orafaq.com/wiki/Berkeley_DB#Licensing


 I would totally use neo4j, if it would be as fast at searches :/ ie. BTree
 storage of nodes/rels? (guessing)

 But having 10mil rels, and seeing BDB checking if A--B in 0ms, and neo4j in
 like 0 to 66 to 310 seconds (depending on its position)

 is a show stopper for me, especially because I want to base everything on
 just nodes (without properties) and their relationships. ie. make a set or
 list of things, without having A ---[ENTRY]--  e ---[NEXT] ---  e2  but
 instead A-b-e-c-e2  where b and c are just nodes, and also
 AllEntries-b  and AllNexts-c   (silly example with such less info tho)

 Point is, I would do lots of searches a lot (imagine a real time program
 running on top of nodes/rels, that is it's defined in and can access only
 nodes), this would likely cause those ms to add up to seconds...


 I installed maven (m2e) again, I guess I could use it, but it seems it
 creates .jar , not sure if that's useful to me while I am coding... seems
 better to use project/sources no? and maven only when ready to publish/get
 the jar ; anyway I need to learn how to use it otherwise I'm getting errors
 like this , when trying to build:

 [ERROR]   The project org.neo4j:neo4j-graph-collections:1.5-SNAPSHOT
 (E:\wrkspc\graph-collections\pom.xml) has 1 error
 [ERROR] Non-resolvable parent POM: The repository system is offline but
 the artifact org.neo4j:parent-central:pom:21 is not available in the local
 repositor
 y. and 'parent.relativePath' points at wrong local POM @ line 4, column 11
 -  [Help 2]



 Anyway, with normal eclipse, I'm still showing 2 different errors:

 1) in org.neo4j.collections.graphdb.ComparablePropertyTypeT

 line 29: super(name, graphDb);

 The constructor PropertyTypeT(String, GraphDatabaseService) is not visible

 2) org.neo4j.collections.graphdb.impl.NodeLikeImpl.getRelationships()
 The return type is incompatible with
 RelationshipContainer.getRelationships()

 3)
 org.neo4j.collections.graphdb.impl.NodeLikeImpl.getRelationships(RelationshipType...)
 The return type is incompatible with
 RelationshipContainer.getRelationships(RelationshipType[])


 John.

 On Thu, Jul 28, 2011 at 12:52 PM, Niels Hoogeveenpd_aficion...@hotmail.com
 wrote:


 Hi John,
 Thanks for showing an interest.
 The compile error you got was due to the fact that a removed class was
 still hanging around in the Git repo. I renamed BinaryRelationshipRoles into
 BinaryRelationshipRole, but the original file was still active in the Git
 repo. I fixed that.
 I have been thinking about BDB too for this situation, because the graph
 database now stores some information about the associated 

Re: [Neo4j] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Jim Webber
Hi Aseem,

When you GET a resource, you're asking for its state at a particular instant in 
time. GET's don't always return the same content, what's important about them 
is that clients can't be held responsible for any (unintended) side-effects of 
a GET operation. For example, if you GET the BBC new page now, and then GET it 
again in 20 minutes, the bytes you receive will almost certainly be different.

I think what's perhaps a bit odd in the paged traverser case is that clients do 
in fact trigger a state transition on GET which materially changes the 
response. Adding /next to the paged traverser URI does not change this, it just 
lengthens the URI.

Under the covers, the REST API is just using the traversal API and so gets back 
an IterableT which is forward-only. We can't (or rather won't) do things like 
?page=2 (or similar) because that would involve holding all the traversal state 
on the server which is one of the things paged traversers were meant to avoid 
(being kind to both the server and clients).

If you want to remember all traversal state on the client, that's OK. You can 
page through your own local data structures. In fact given the number of 
clients is likely to be larger than the number of servers, this makes sense 
since the memory burden is shared amongst the many clients, rather than being 
placed on the single server.

So, I'll buy that we've conflated a little too much into a single GET, but it's 
motivated by a sincere trade off to not overburden the server.

Jim



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


Re: [Neo4j] HyperRelationship example

2011-07-28 Thread John cyuczieekc
Hey Nawroth,
I attempted to try that at one time and for some reason I cannot remember I
concluded that it doesn't work for what I wanted, I will see what I can do
again, thanks!
findSinglePath is what I was using before.



On Thu, Jul 28, 2011 at 2:05 PM, Anders Nawroth and...@neotechnology.comwrote:

 Hi!

 I think the hard part about transactions is recovering after crashes and
 such.

 Regarding finding A--B, have you tried using a relationship index? See:

 http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/ReadableRelationshipIndex.html

 /anders

 On 07/28/2011 01:35 PM, John cyuczieekc wrote:
  I don't know what you mean by this:
  I don't know how nicely BDB plays with Neo4J transactions.
  I have some small experience with bdb java edition that is, but I'm not
 sure
  what would their transaction have to do with neo4j transactions... if you
  meant if you could make a wrapper such that you could use the same
  format/interface neo4j uses for their transactions, then you can, I did
 some
  attempt to that it works for me, also BDB Java Edition doesn't support
  nested transactions either (the C++ version does), but emulating them to
 use
  the same root/parent transaction is easy, my attempt is here:
 
 https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
  probably not much relevant though. But this file here:
 
 https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
  I made to use both neo4j and bdb to do the same thing, that is:
  create nodes(uppercase named ones) with these rels:
  ROOT_LIST --  START
  ROOT_LIST --  half a million unique nodes
  ROOT_LIST --  MIDDLE
  ROOT_LIST --  another half a million unique nodes
  ROOT_LIST --  END
 
  then make both bdb and neo4j check if the following rels exist:
  ROOT_LIST --  START
  ROOT_LIST --  MIDDLE
  ROOT_LIST --  END
  (you probably saw this already in another post)
  But both bdb and neo4j now use transactions... that is, in my test file.
 
  About licensing, I'm not much into that but here's the license for
 Berkeley
  DB Java Edition:
 
 http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
  Looks like New(or normal?) BSD license or something ...
  also
  
  Licensing
 
  Berkeley DB is available under dual license:
 
  - Public license that requires that software that uses the Berkeley
 DB
  code be free/open source software; and
  - Closed source license for non-open source software.
 
  If your code is not redistributed, no license is required (free for
 in-house
  use).
 
  
 
  from http://www.orafaq.com/wiki/Berkeley_DB#Licensing
 
 
  I would totally use neo4j, if it would be as fast at searches :/ ie.
 BTree
  storage of nodes/rels? (guessing)
 
  But having 10mil rels, and seeing BDB checking if A--B in 0ms, and neo4j
 in
  like 0 to 66 to 310 seconds (depending on its position)
 
  is a show stopper for me, especially because I want to base everything on
  just nodes (without properties) and their relationships. ie. make a set
 or
  list of things, without having A ---[ENTRY]--  e ---[NEXT] ---  e2  but
  instead A-b-e-c-e2  where b and c are just nodes, and also
  AllEntries-b  and AllNexts-c   (silly example with such less info tho)
 
  Point is, I would do lots of searches a lot (imagine a real time program
  running on top of nodes/rels, that is it's defined in and can access only
  nodes), this would likely cause those ms to add up to seconds...
 
 
  I installed maven (m2e) again, I guess I could use it, but it seems it
  creates .jar , not sure if that's useful to me while I am coding... seems
  better to use project/sources no? and maven only when ready to
 publish/get
  the jar ; anyway I need to learn how to use it otherwise I'm getting
 errors
  like this , when trying to build:
 
  [ERROR]   The project org.neo4j:neo4j-graph-collections:1.5-SNAPSHOT
  (E:\wrkspc\graph-collections\pom.xml) has 1 error
  [ERROR] Non-resolvable parent POM: The repository system is offline
 but
  the artifact org.neo4j:parent-central:pom:21 is not available in the
 local
  repositor
  y. and 'parent.relativePath' points at wrong local POM @ line 4, column
 11
  -  [Help 2]
 
 
 
  Anyway, with normal eclipse, I'm still showing 2 different errors:
 
  1) in org.neo4j.collections.graphdb.ComparablePropertyTypeT
 
  line 29: super(name, graphDb);
 
  The constructor PropertyTypeT(String, GraphDatabaseService) is not
 visible
 
  2) org.neo4j.collections.graphdb.impl.NodeLikeImpl.getRelationships()
  The return type is incompatible with
  RelationshipContainer.getRelationships()
 
  3)
 
 org.neo4j.collections.graphdb.impl.NodeLikeImpl.getRelationships(RelationshipType...)
  The return type is incompatible with
  RelationshipContainer.getRelationships(RelationshipType[])
 
 
  John.
 
  On Thu, Jul 28, 2011 at 12:52 PM, Niels Hoogeveen
 pd_aficion...@hotmail.com

Re: [Neo4j] update node properties via rest?

2011-07-28 Thread Jim Webber
Feature (though perhaps PUT) would be a better choice of method. POSTing a new 
set of properties can't update, because the semantics aren't clear - what would 
it mean if a property was missing, is that an effective DELETE, or an 
indication it should be left alone.

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


Re: [Neo4j] HyperRelationship example

2011-07-28 Thread Niels Hoogeveen

I checked the Git repo, and left two more files in that I had removed in my 
local project. (Note to self: When deleting or renaming files always update 
repo).
The repo is now up-to-date, and the most recent download installed perfectly 
using Maven.
What I meant by playing nice with Neo4j transactions is for the scenario where 
BDB would act as an IndexProvider for Neo4j. In such a scenario I would want to 
be able to commit, rollback in both Neo4j and BDB and make sure they both close 
properly and recover properly from error situations.
I found an implementation of a BDB IndexProvider in Peter Neubauer's Git repo, 
but I get an error when trying to build that project, so I would have to look 
into that.
With respect to you 10mil relations needing to check if A -- B, have you tried 
SortedTree in the collections component. This class has a containsNode method 
allowing you to check if A -- B. SortedTree is a Btree so the lookup should be 
much faster.
Niels


 Date: Thu, 28 Jul 2011 13:35:43 +0200
 From: cyuczie...@gmail.com
 To: user@lists.neo4j.org
 Subject: Re: [Neo4j] HyperRelationship example
 
 I don't know what you mean by this:
 I don't know how nicely BDB plays with Neo4J transactions. 
 I have some small experience with bdb java edition that is, but I'm not sure
 what would their transaction have to do with neo4j transactions... if you
 meant if you could make a wrapper such that you could use the same
 format/interface neo4j uses for their transactions, then you can, I did some
 attempt to that it works for me, also BDB Java Edition doesn't support
 nested transactions either (the C++ version does), but emulating them to use
 the same root/parent transaction is easy, my attempt is here:
 https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
 probably not much relevant though. But this file here:
 https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
 I made to use both neo4j and bdb to do the same thing, that is:
 create nodes(uppercase named ones) with these rels:
 ROOT_LIST -- START
 ROOT_LIST -- half a million unique nodes
 ROOT_LIST -- MIDDLE
 ROOT_LIST -- another half a million unique nodes
 ROOT_LIST -- END
 
 then make both bdb and neo4j check if the following rels exist:
 ROOT_LIST -- START
 ROOT_LIST -- MIDDLE
 ROOT_LIST -- END
 (you probably saw this already in another post)
 But both bdb and neo4j now use transactions... that is, in my test file.
 
 About licensing, I'm not much into that but here's the license for Berkeley
 DB Java Edition:
 http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
 Looks like New(or normal?) BSD license or something ...
 also
 
 Licensing
 
 Berkeley DB is available under dual license:
 
- Public license that requires that software that uses the Berkeley DB
code be free/open source software; and
- Closed source license for non-open source software.
 
 If your code is not redistributed, no license is required (free for in-house
 use).
 
 
 
 from http://www.orafaq.com/wiki/Berkeley_DB#Licensing
 
 
 I would totally use neo4j, if it would be as fast at searches :/ ie. BTree
 storage of nodes/rels? (guessing)
 
 But having 10mil rels, and seeing BDB checking if A--B in 0ms, and neo4j in
 like 0 to 66 to 310 seconds (depending on its position)
 
 is a show stopper for me, especially because I want to base everything on
 just nodes (without properties) and their relationships. ie. make a set or
 list of things, without having A ---[ENTRY]-- e ---[NEXT] --- e2  but
 instead A-b-e-c-e2  where b and c are just nodes, and also
 AllEntries-b  and AllNexts-c   (silly example with such less info tho)
 
 Point is, I would do lots of searches a lot (imagine a real time program
 running on top of nodes/rels, that is it's defined in and can access only
 nodes), this would likely cause those ms to add up to seconds...
 
 
 I installed maven (m2e) again, I guess I could use it, but it seems it
 creates .jar , not sure if that's useful to me while I am coding... seems
 better to use project/sources no? and maven only when ready to publish/get
 the jar ; anyway I need to learn how to use it otherwise I'm getting errors
 like this , when trying to build:
 
 [ERROR]   The project org.neo4j:neo4j-graph-collections:1.5-SNAPSHOT
 (E:\wrkspc\graph-collections\pom.xml) has 1 error
 [ERROR] Non-resolvable parent POM: The repository system is offline but
 the artifact org.neo4j:parent-central:pom:21 is not available in the local
 repositor
 y. and 'parent.relativePath' points at wrong local POM @ line 4, column 11
 - [Help 2]
 
 
 
 Anyway, with normal eclipse, I'm still showing 2 different errors:
 
 1) in org.neo4j.collections.graphdb.ComparablePropertyTypeT
 
 line 29: super(name, graphDb);
 
 The constructor PropertyTypeT(String, GraphDatabaseService) is not visible
 
 2) 

Re: [Neo4j] HyperRelationship example

2011-07-28 Thread John cyuczieekc
with relationshipindex seems to be working as fast, though I am not sure if
I am using it right ie.
doing this first time:
RelationshipIndex ri = graphDB.index().forRelationships( relsIndex );

and on each relationship created between sNode--eNode where eNode is any
random node, and sNode is the same on each call (in my case)
Relationship rel = sNode.createRelationshipTo( eNode, linkedRelType );
ri.add( rel, key, value );

and when checking if sNode--eNode exists:
final Relationship rel = ri.query( key, value, sNode, eNode
).getSingle();
if ( null == rel ) {
return false;
} else {
return true;
}

seems to me that using those `key` and `value` are useless, unless I'm
missing something; I'm probably using them wrongly but in my case I only
have one type of relationship.

In either case, the timings as good ~1ms, and no memory increase, so this
would seem like a good workaround; with findSinglePath the memory would
increase by 1 gig (for my test)

Thanks for suggesting to revisit RelationshipIndex, last time I dropped it I
think because I didn't know what to put on key/value.

Also, I get what Niels meant now by that play nice with transactions, that
if both neo4j and bdb recover the same things after crash/recovery or not...


On Thu, Jul 28, 2011 at 2:05 PM, Anders Nawroth and...@neotechnology.comwrote:

 Hi!

 I think the hard part about transactions is recovering after crashes and
 such.

 Regarding finding A--B, have you tried using a relationship index? See:

 http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/ReadableRelationshipIndex.html

 /anders

 On 07/28/2011 01:35 PM, John cyuczieekc wrote:
  I don't know what you mean by this:
  I don't know how nicely BDB plays with Neo4J transactions.
  I have some small experience with bdb java edition that is, but I'm not
 sure
  what would their transaction have to do with neo4j transactions... if you
  meant if you could make a wrapper such that you could use the same
  format/interface neo4j uses for their transactions, then you can, I did
 some
  attempt to that it works for me, also BDB Java Edition doesn't support
  nested transactions either (the C++ version does), but emulating them to
 use
  the same root/parent transaction is easy, my attempt is here:
 
 https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
  probably not much relevant though. But this file here:
 
 https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
  I made to use both neo4j and bdb to do the same thing, that is:
  create nodes(uppercase named ones) with these rels:
  ROOT_LIST --  START
  ROOT_LIST --  half a million unique nodes
  ROOT_LIST --  MIDDLE
  ROOT_LIST --  another half a million unique nodes
  ROOT_LIST --  END
 
  then make both bdb and neo4j check if the following rels exist:
  ROOT_LIST --  START
  ROOT_LIST --  MIDDLE
  ROOT_LIST --  END
  (you probably saw this already in another post)
  But both bdb and neo4j now use transactions... that is, in my test file.
 
  About licensing, I'm not much into that but here's the license for
 Berkeley
  DB Java Edition:
 
 http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
  Looks like New(or normal?) BSD license or something ...
  also
  
  Licensing
 
  Berkeley DB is available under dual license:
 
  - Public license that requires that software that uses the Berkeley
 DB
  code be free/open source software; and
  - Closed source license for non-open source software.
 
  If your code is not redistributed, no license is required (free for
 in-house
  use).
 
  
 
  from http://www.orafaq.com/wiki/Berkeley_DB#Licensing
 
 
  I would totally use neo4j, if it would be as fast at searches :/ ie.
 BTree
  storage of nodes/rels? (guessing)
 
  But having 10mil rels, and seeing BDB checking if A--B in 0ms, and neo4j
 in
  like 0 to 66 to 310 seconds (depending on its position)
 
  is a show stopper for me, especially because I want to base everything on
  just nodes (without properties) and their relationships. ie. make a set
 or
  list of things, without having A ---[ENTRY]--  e ---[NEXT] ---  e2  but
  instead A-b-e-c-e2  where b and c are just nodes, and also
  AllEntries-b  and AllNexts-c   (silly example with such less info tho)
 
  Point is, I would do lots of searches a lot (imagine a real time program
  running on top of nodes/rels, that is it's defined in and can access only
  nodes), this would likely cause those ms to add up to seconds...
 
 
  I installed maven (m2e) again, I guess I could use it, but it seems it
  creates .jar , not sure if that's useful to me while I am coding... seems
  better to use project/sources no? and maven only when ready to
 publish/get
  the jar ; anyway I need to learn how to use it otherwise I'm getting
 errors
  like this , when trying to build:
 
  [ERROR]   The 

Re: [Neo4j] HyperRelationship example

2011-07-28 Thread John cyuczieekc
nice, no errors now, thanks! I've been postponing checking stuff like
SortedTree or anything until the errors were gone...

I guess I could try SortedTree, but it's based on Nodes, and that would add
an extra unnecessary layer maybe?  still good to know I have this option and
the RelationshipIndex option thanks to Anders too. I'll have to see what to
do with both...

Thanks so far,
Good luck!
John

On Thu, Jul 28, 2011 at 3:04 PM, Niels Hoogeveen
pd_aficion...@hotmail.comwrote:


 I checked the Git repo, and left two more files in that I had removed in my
 local project. (Note to self: When deleting or renaming files always update
 repo).
 The repo is now up-to-date, and the most recent download installed
 perfectly using Maven.
 What I meant by playing nice with Neo4j transactions is for the scenario
 where BDB would act as an IndexProvider for Neo4j. In such a scenario I
 would want to be able to commit, rollback in both Neo4j and BDB and make
 sure they both close properly and recover properly from error situations.
 I found an implementation of a BDB IndexProvider in Peter Neubauer's Git
 repo, but I get an error when trying to build that project, so I would have
 to look into that.
 With respect to you 10mil relations needing to check if A -- B, have you
 tried SortedTree in the collections component. This class has a containsNode
 method allowing you to check if A -- B. SortedTree is a Btree so the lookup
 should be much faster.
 Niels


  Date: Thu, 28 Jul 2011 13:35:43 +0200
  From: cyuczie...@gmail.com
  To: user@lists.neo4j.org
  Subject: Re: [Neo4j] HyperRelationship example
 
  I don't know what you mean by this:
  I don't know how nicely BDB plays with Neo4J transactions. 
  I have some small experience with bdb java edition that is, but I'm not
 sure
  what would their transaction have to do with neo4j transactions... if you
  meant if you could make a wrapper such that you could use the same
  format/interface neo4j uses for their transactions, then you can, I did
 some
  attempt to that it works for me, also BDB Java Edition doesn't support
  nested transactions either (the C++ version does), but emulating them to
 use
  the same root/parent transaction is easy, my attempt is here:
 
 https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
  probably not much relevant though. But this file here:
 
 https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
  I made to use both neo4j and bdb to do the same thing, that is:
  create nodes(uppercase named ones) with these rels:
  ROOT_LIST -- START
  ROOT_LIST -- half a million unique nodes
  ROOT_LIST -- MIDDLE
  ROOT_LIST -- another half a million unique nodes
  ROOT_LIST -- END
 
  then make both bdb and neo4j check if the following rels exist:
  ROOT_LIST -- START
  ROOT_LIST -- MIDDLE
  ROOT_LIST -- END
  (you probably saw this already in another post)
  But both bdb and neo4j now use transactions... that is, in my test file.
 
  About licensing, I'm not much into that but here's the license for
 Berkeley
  DB Java Edition:
 
 http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
  Looks like New(or normal?) BSD license or something ...
  also
  
  Licensing
 
  Berkeley DB is available under dual license:
 
 - Public license that requires that software that uses the Berkeley DB
 code be free/open source software; and
 - Closed source license for non-open source software.
 
  If your code is not redistributed, no license is required (free for
 in-house
  use).
 
  
 
  from http://www.orafaq.com/wiki/Berkeley_DB#Licensing
 
 
  I would totally use neo4j, if it would be as fast at searches :/ ie.
 BTree
  storage of nodes/rels? (guessing)
 
  But having 10mil rels, and seeing BDB checking if A--B in 0ms, and neo4j
 in
  like 0 to 66 to 310 seconds (depending on its position)
 
  is a show stopper for me, especially because I want to base everything on
  just nodes (without properties) and their relationships. ie. make a set
 or
  list of things, without having A ---[ENTRY]-- e ---[NEXT] --- e2  but
  instead A-b-e-c-e2  where b and c are just nodes, and also
  AllEntries-b  and AllNexts-c   (silly example with such less info tho)
 
  Point is, I would do lots of searches a lot (imagine a real time program
  running on top of nodes/rels, that is it's defined in and can access only
  nodes), this would likely cause those ms to add up to seconds...
 
 
  I installed maven (m2e) again, I guess I could use it, but it seems it
  creates .jar , not sure if that's useful to me while I am coding... seems
  better to use project/sources no? and maven only when ready to
 publish/get
  the jar ; anyway I need to learn how to use it otherwise I'm getting
 errors
  like this , when trying to build:
 
  [ERROR]   The project org.neo4j:neo4j-graph-collections:1.5-SNAPSHOT
  

Re: [Neo4j] auto indexes in REST in 1.4?

2011-07-28 Thread Jim Webber
Try using the GA version. I don't think auto-indexing was available in M02.

Jim


On 28 Jul 2011, at 00:51, dhsieh wrote:

 Same probelm here. Downloaded neo4j-enterprise-1.4.M02-unix.tar.gz with
 deafult installtion on Linux. Added the foolwoing lines to neo4j.properties
 file: 
 
 node_auto_indexing=true 
 node_keys_indexable=name,age 
 
 relationship_auto_indexing=true 
 relationship_keys_indexable=ROOT,KNOWS,CODED_BY 
 
 Started the neo4j server, use neo4j-shell and added Neo4j Wiki Matrix
 example nodes  relationships. 
 
 From http://localhost:7474/db/data/, browser shows Neo4j REST interface
 links as: 
 
 Root relationship_index /db/data/index/relationship 
 node_index /db/data/index/node 
 reference_node /db/data/node/0 
 
 However, the fisrt 2 links /db/data/index/relationship  /db/data/index/node
 show nothing about the auto indexes for node  relstionship I specified in
 neo4j.properties file. Not sure if this feature actually works in the
 current 1.4.M02 build. Can any one pitch in on this issue?
 
 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-auto-indexes-in-REST-in-1-4-tp3159205p3205171.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.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] HyperRelationship example

2011-07-28 Thread Anders Nawroth
Hi!

Seems right to me. And yes, key/value would typically be storing the 
relationship type. We should bring this up again next week, when Mattias 
who wrote the indexing stuff is back from vacation!

/anders

On 07/28/2011 03:05 PM, John cyuczieekc wrote:
 with relationshipindex seems to be working as fast, though I am not sure if
 I am using it right ie.
 doing this first time:
 RelationshipIndex ri = graphDB.index().forRelationships( relsIndex );

 and on each relationship created between sNode--eNode where eNode is any
 random node, and sNode is the same on each call (in my case)
 Relationship rel = sNode.createRelationshipTo( eNode, linkedRelType );
 ri.add( rel, key, value );

 and when checking if sNode--eNode exists:
 final Relationship rel = ri.query( key, value, sNode, eNode
 ).getSingle();
 if ( null == rel ) {
  return false;
  } else {
  return true;
  }

 seems to me that using those `key` and `value` are useless, unless I'm
 missing something; I'm probably using them wrongly but in my case I only
 have one type of relationship.

 In either case, the timings as good ~1ms, and no memory increase, so this
 would seem like a good workaround; with findSinglePath the memory would
 increase by 1 gig (for my test)

 Thanks for suggesting to revisit RelationshipIndex, last time I dropped it I
 think because I didn't know what to put on key/value.

 Also, I get what Niels meant now by that play nice with transactions, that
 if both neo4j and bdb recover the same things after crash/recovery or not...


 On Thu, Jul 28, 2011 at 2:05 PM, Anders 
 Nawrothand...@neotechnology.comwrote:

 Hi!

 I think the hard part about transactions is recovering after crashes and
 such.

 Regarding finding A--B, have you tried using a relationship index? See:

 http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/ReadableRelationshipIndex.html

 /anders

 On 07/28/2011 01:35 PM, John cyuczieekc wrote:
 I don't know what you mean by this:
 I don't know how nicely BDB plays with Neo4J transactions.
 I have some small experience with bdb java edition that is, but I'm not
 sure
 what would their transaction have to do with neo4j transactions... if you
 meant if you could make a wrapper such that you could use the same
 format/interface neo4j uses for their transactions, then you can, I did
 some
 attempt to that it works for me, also BDB Java Edition doesn't support
 nested transactions either (the C++ version does), but emulating them to
 use
 the same root/parent transaction is easy, my attempt is here:

 https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
 probably not much relevant though. But this file here:

 https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
 I made to use both neo4j and bdb to do the same thing, that is:
 create nodes(uppercase named ones) with these rels:
 ROOT_LIST --   START
 ROOT_LIST --   half a million unique nodes
 ROOT_LIST --   MIDDLE
 ROOT_LIST --   another half a million unique nodes
 ROOT_LIST --   END

 then make both bdb and neo4j check if the following rels exist:
 ROOT_LIST --   START
 ROOT_LIST --   MIDDLE
 ROOT_LIST --   END
 (you probably saw this already in another post)
 But both bdb and neo4j now use transactions... that is, in my test file.

 About licensing, I'm not much into that but here's the license for
 Berkeley
 DB Java Edition:

 http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
 Looks like New(or normal?) BSD license or something ...
 also
 
 Licensing

 Berkeley DB is available under dual license:

  - Public license that requires that software that uses the Berkeley
 DB
  code be free/open source software; and
  - Closed source license for non-open source software.

 If your code is not redistributed, no license is required (free for
 in-house
 use).

 

 from http://www.orafaq.com/wiki/Berkeley_DB#Licensing


 I would totally use neo4j, if it would be as fast at searches :/ ie.
 BTree
 storage of nodes/rels? (guessing)

 But having 10mil rels, and seeing BDB checking if A--B in 0ms, and neo4j
 in
 like 0 to 66 to 310 seconds (depending on its position)

 is a show stopper for me, especially because I want to base everything on
 just nodes (without properties) and their relationships. ie. make a set
 or
 list of things, without having A ---[ENTRY]--   e ---[NEXT] ---   e2  but
 instead A-b-e-c-e2  where b and c are just nodes, and also
 AllEntries-b  and AllNexts-c   (silly example with such less info tho)

 Point is, I would do lots of searches a lot (imagine a real time program
 running on top of nodes/rels, that is it's defined in and can access only
 nodes), this would likely cause those ms to add up to seconds...


 I installed maven (m2e) again, I guess I could use it, but it seems it
 creates .jar , not sure if that's useful to me while I 

Re: [Neo4j] HyperRelationship example

2011-07-28 Thread John cyuczieekc
Roger that.
don't read the following it's irrelevant(don't even know why I sent it):

Btw, seems to me that (since the underlaying index storage is BTree - just
guessing from the speed)
I could store the ID of the nodes in two indexes and use only those as a
base for creating node to node relationships :) that is, kind of emulating a
key-value database, tho it seems kind of useless at this time :)
indexForward:
A--B
indexBackward:
B--A

this way, I could check if A--B exists, but could also check all modes (ie.
A) that point to B, by using Backward index; else just for checking if A--B
exists, only one index would be needed;
though the add() does take an entity, would not need that;
http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/Index.html



On Thu, Jul 28, 2011 at 3:32 PM, Anders Nawroth and...@neotechnology.comwrote:

 Hi!

 Seems right to me. And yes, key/value would typically be storing the
 relationship type. We should bring this up again next week, when Mattias
 who wrote the indexing stuff is back from vacation!

 /anders

 On 07/28/2011 03:05 PM, John cyuczieekc wrote:
  with relationshipindex seems to be working as fast, though I am not sure
 if
  I am using it right ie.
  doing this first time:
  RelationshipIndex ri = graphDB.index().forRelationships( relsIndex );
 
  and on each relationship created between sNode--eNode where eNode is any
  random node, and sNode is the same on each call (in my case)
  Relationship rel = sNode.createRelationshipTo( eNode, linkedRelType );
  ri.add( rel, key, value );
 
  and when checking if sNode--eNode exists:
  final Relationship rel = ri.query( key, value, sNode, eNode
  ).getSingle();
  if ( null == rel ) {
   return false;
   } else {
   return true;
   }
 
  seems to me that using those `key` and `value` are useless, unless I'm
  missing something; I'm probably using them wrongly but in my case I only
  have one type of relationship.
 
  In either case, the timings as good ~1ms, and no memory increase, so this
  would seem like a good workaround; with findSinglePath the memory would
  increase by 1 gig (for my test)
 
  Thanks for suggesting to revisit RelationshipIndex, last time I dropped
 it I
  think because I didn't know what to put on key/value.
 
  Also, I get what Niels meant now by that play nice with transactions,
 that
  if both neo4j and bdb recover the same things after crash/recovery or
 not...
 
 
  On Thu, Jul 28, 2011 at 2:05 PM, Anders Nawrothand...@neotechnology.com
 wrote:
 
  Hi!
 
  I think the hard part about transactions is recovering after crashes and
  such.
 
  Regarding finding A--B, have you tried using a relationship index? See:
 
 
 http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/ReadableRelationshipIndex.html
 
  /anders
 
  On 07/28/2011 01:35 PM, John cyuczieekc wrote:
  I don't know what you mean by this:
  I don't know how nicely BDB plays with Neo4J transactions.
  I have some small experience with bdb java edition that is, but I'm not
  sure
  what would their transaction have to do with neo4j transactions... if
 you
  meant if you could make a wrapper such that you could use the same
  format/interface neo4j uses for their transactions, then you can, I did
  some
  attempt to that it works for me, also BDB Java Edition doesn't support
  nested transactions either (the C++ version does), but emulating them
 to
  use
  the same root/parent transaction is easy, my attempt is here:
 
 
 https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
  probably not much relevant though. But this file here:
 
 
 https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
  I made to use both neo4j and bdb to do the same thing, that is:
  create nodes(uppercase named ones) with these rels:
  ROOT_LIST --   START
  ROOT_LIST --   half a million unique nodes
  ROOT_LIST --   MIDDLE
  ROOT_LIST --   another half a million unique nodes
  ROOT_LIST --   END
 
  then make both bdb and neo4j check if the following rels exist:
  ROOT_LIST --   START
  ROOT_LIST --   MIDDLE
  ROOT_LIST --   END
  (you probably saw this already in another post)
  But both bdb and neo4j now use transactions... that is, in my test
 file.
 
  About licensing, I'm not much into that but here's the license for
  Berkeley
  DB Java Edition:
 
 
 http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
  Looks like New(or normal?) BSD license or something ...
  also
  
  Licensing
 
  Berkeley DB is available under dual license:
 
   - Public license that requires that software that uses the
 Berkeley
  DB
   code be free/open source software; and
   - Closed source license for non-open source software.
 
  If your code is not redistributed, no license is required (free for
  in-house
  use).
 
  
 
  from 

Re: [Neo4j] HyperRelationship example

2011-07-28 Thread John cyuczieekc
Hey Niels,

what is acquireLock() doing in SortedTree ?
is removeProperty causing neo4j to acquire a lock on the Node? or its
properties?
also does that property need to exist? seems like not
interesting :)


On Wed, Jul 27, 2011 at 8:48 PM, Niels Hoogeveen
pd_aficion...@hotmail.comwrote:


 I just posted an example on how to use HyperRelationships:


 https://github.com/peterneubauer/graph-collections/wiki/HyperRelationship-example

 There is now a proper test for HyperRelationships, so I hereby push the
 software to Beta status.

 Please try out the Enhanced API and HyperRelationships and let me know what
 needs improvement.

 Niels
 ___
 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] HyperRelationship example

2011-07-28 Thread Niels Hoogeveen

It's a trick to lock a node. When removing a property that does not exist the 
node gets locked. 

 Date: Thu, 28 Jul 2011 15:51:15 +0200
 From: cyuczie...@gmail.com
 To: user@lists.neo4j.org
 Subject: Re: [Neo4j] HyperRelationship example
 
 Hey Niels,
 
 what is acquireLock() doing in SortedTree ?
 is removeProperty causing neo4j to acquire a lock on the Node? or its
 properties?
 also does that property need to exist? seems like not
 interesting :)
 
 
 On Wed, Jul 27, 2011 at 8:48 PM, Niels Hoogeveen
 pd_aficion...@hotmail.comwrote:
 
 
  I just posted an example on how to use HyperRelationships:
 
 
  https://github.com/peterneubauer/graph-collections/wiki/HyperRelationship-example
 
  There is now a proper test for HyperRelationships, so I hereby push the
  software to Beta status.
 
  Please try out the Enhanced API and HyperRelationships and let me know what
  needs improvement.
 
  Niels
  ___
  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] HyperRelationship example

2011-07-28 Thread John cyuczieekc
well if I think about it, maybe Niels could use this index(that neo4j uses)
instead of berkeleydb, that is, unless I'm missing something (other than
add() requiring an entity which is something unneeded with bdb when using
key-value). (but likely he's already making use of it and I didn't really
understand why bdb would be better then)

On Thu, Jul 28, 2011 at 3:45 PM, John cyuczieekc cyuczie...@gmail.comwrote:

 Roger that.
 don't read the following it's irrelevant(don't even know why I sent it):

 Btw, seems to me that (since the underlaying index storage is BTree - just
 guessing from the speed)
 I could store the ID of the nodes in two indexes and use only those as a
 base for creating node to node relationships :) that is, kind of emulating a
 key-value database, tho it seems kind of useless at this time :)
 indexForward:
 A--B
 indexBackward:
 B--A

 this way, I could check if A--B exists, but could also check all modes
 (ie. A) that point to B, by using Backward index; else just for checking if
 A--B exists, only one index would be needed;
 though the add() does take an entity, would not need that;

 http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/Index.html




 On Thu, Jul 28, 2011 at 3:32 PM, Anders Nawroth 
 and...@neotechnology.comwrote:

 Hi!

 Seems right to me. And yes, key/value would typically be storing the
 relationship type. We should bring this up again next week, when Mattias
 who wrote the indexing stuff is back from vacation!

 /anders

 On 07/28/2011 03:05 PM, John cyuczieekc wrote:
  with relationshipindex seems to be working as fast, though I am not sure
 if
  I am using it right ie.
  doing this first time:
  RelationshipIndex ri = graphDB.index().forRelationships( relsIndex );
 
  and on each relationship created between sNode--eNode where eNode is
 any
  random node, and sNode is the same on each call (in my case)
  Relationship rel = sNode.createRelationshipTo( eNode, linkedRelType );
  ri.add( rel, key, value );
 
  and when checking if sNode--eNode exists:
  final Relationship rel = ri.query( key, value, sNode, eNode
  ).getSingle();
  if ( null == rel ) {
   return false;
   } else {
   return true;
   }
 
  seems to me that using those `key` and `value` are useless, unless I'm
  missing something; I'm probably using them wrongly but in my case I only
  have one type of relationship.
 
  In either case, the timings as good ~1ms, and no memory increase, so
 this
  would seem like a good workaround; with findSinglePath the memory would
  increase by 1 gig (for my test)
 
  Thanks for suggesting to revisit RelationshipIndex, last time I dropped
 it I
  think because I didn't know what to put on key/value.
 
  Also, I get what Niels meant now by that play nice with transactions,
 that
  if both neo4j and bdb recover the same things after crash/recovery or
 not...
 
 
  On Thu, Jul 28, 2011 at 2:05 PM, Anders Nawroth
 and...@neotechnology.comwrote:
 
  Hi!
 
  I think the hard part about transactions is recovering after crashes
 and
  such.
 
  Regarding finding A--B, have you tried using a relationship index?
 See:
 
 
 http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/ReadableRelationshipIndex.html
 
  /anders
 
  On 07/28/2011 01:35 PM, John cyuczieekc wrote:
  I don't know what you mean by this:
  I don't know how nicely BDB plays with Neo4J transactions.
  I have some small experience with bdb java edition that is, but I'm
 not
  sure
  what would their transaction have to do with neo4j transactions... if
 you
  meant if you could make a wrapper such that you could use the same
  format/interface neo4j uses for their transactions, then you can, I
 did
  some
  attempt to that it works for me, also BDB Java Edition doesn't support
  nested transactions either (the C++ version does), but emulating them
 to
  use
  the same root/parent transaction is easy, my attempt is here:
 
 
 https://github.com/13th-floor/neo4john/blob/6c0371e82b7fc5b5f45d7c0ea9fb03ee4d241df9/src.obsolete/org/bdb/BETransaction.java
  probably not much relevant though. But this file here:
 
 
 https://github.com/13th-floor/neo4john/blob/master/src/org/benchtests/neo4j/TestLinkage.java
  I made to use both neo4j and bdb to do the same thing, that is:
  create nodes(uppercase named ones) with these rels:
  ROOT_LIST --   START
  ROOT_LIST --   half a million unique nodes
  ROOT_LIST --   MIDDLE
  ROOT_LIST --   another half a million unique nodes
  ROOT_LIST --   END
 
  then make both bdb and neo4j check if the following rels exist:
  ROOT_LIST --   START
  ROOT_LIST --   MIDDLE
  ROOT_LIST --   END
  (you probably saw this already in another post)
  But both bdb and neo4j now use transactions... that is, in my test
 file.
 
  About licensing, I'm not much into that but here's the license for
  Berkeley
  DB Java Edition:
 
 
 http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-086837.html
  Looks 

Re: [Neo4j] Events this Week

2011-07-28 Thread John cyuczieekc
btw, just making sure, the Webinar is in 3 hours from now right? (otherwise
I miscalculated)

On Wed, Jul 27, 2011 at 8:28 PM, Allison Sparrow 
allison.spar...@neotechnology.com wrote:

 Hi all,

 Just a reminder on three events we have to close off the week:

 *TONIGHT at 18:00 PDT*
 Vancouver Meetup | Reference Node: Creating a Graph:
 www.meetup.com/graphdb-vancouver/events/24143031/
 *
 TONIGHT at 19:00 PDT*
 Seattle Meetup | Discussions with Andreas Kollegger:
 www.meetup.com/graphdb-seattle/events/21044691/
 *
 TOMORROW at 10:00 PDT
 *
 Webinar | Getting Started with Neo4j:
 https://www1.gotomeeting.com/register/855127096

 See you there,

 *Allison Sparrow* *
 **Marketing Manager | Neo Technology*
 +19499036091 | @ayeeson http://twitter.com/#%21/ayeeson
 ___
 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] auto indexes in REST in 1.4?

2011-07-28 Thread dhsieh
Where is the GA version download link? I can't find it in
http://neo4j.org/download.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-auto-indexes-in-REST-in-1-4-tp3159205p3206845.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] auto indexes in REST in 1.4?

2011-07-28 Thread Chris Gioran
In the upper left part where you can select edition and platform, the
Select Release drop down list has a Current stable version (1.4)
option. Select that instead of the default Current Milestone version
option and you should be fine.

cheers,
CG

On Thu, Jul 28, 2011 at 5:32 PM, dhsieh dhsie...@yahoo.com wrote:
 Where is the GA version download link? I can't find it in
 http://neo4j.org/download.

 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-auto-indexes-in-REST-in-1-4-tp3159205p3206845.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.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] HyperRelationship example

2011-07-28 Thread Niels Hoogeveen

Actually the Enhanced API doesn't use any index at this moment. All look ups 
are done within the graph and are all either ID lookups or a traversal of no 
more than three relationships. 
Including DBD would only serve to remove this book keeping from the graph. For 
example, to reify a relationship, a property is now set on that relationship, 
storing the ID of the associated node, and the associated node has a property 
storing the ID of the relationship. Those properties are visible to the user, 
and even if the API were to hide these properties, it would mean that the name 
space for properties is reduced.
I could opt to store some book keeping in the Lucene index, but that has its 
drawbacks. Lucene doesn't support unique indexes, and I am not convinced it is 
really the fastest solution available. Adding a Lucene index would also reduce 
the index name space available to Neo4j users, and would make the content of 
the index available for manipulation. Having a BDB store hidden from users 
would allow transparent book keeping without reducing node or namespace and 
without users being able to manipulate the book keeping store.
Niels

 Date: Thu, 28 Jul 2011 16:02:01 +0200
 From: cyuczie...@gmail.com
 To: user@lists.neo4j.org
 Subject: Re: [Neo4j] HyperRelationship example
 
 well if I think about it, maybe Niels could use this index(that neo4j uses)
 instead of berkeleydb, that is, unless I'm missing something (other than
 add() requiring an entity which is something unneeded with bdb when using
 key-value). (but likely he's already making use of it and I didn't really
 understand why bdb would be better then)
 
 On Thu, Jul 28, 2011 at 3:45 PM, John cyuczieekc cyuczie...@gmail.comwrote:
 
  Roger that.
  don't read the following it's irrelevant(don't even know why I sent it):
 
  Btw, seems to me that (since the underlaying index storage is BTree - just
  guessing from the speed)
  I could store the ID of the nodes in two indexes and use only those as a
  base for creating node to node relationships :) that is, kind of emulating a
  key-value database, tho it seems kind of useless at this time :)
  indexForward:
  A--B
  indexBackward:
  B--A
 
  this way, I could check if A--B exists, but could also check all modes
  (ie. A) that point to B, by using Backward index; else just for checking if
  A--B exists, only one index would be needed;
  though the add() does take an entity, would not need that;
 
  http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/Index.html
 
 
 
 
  On Thu, Jul 28, 2011 at 3:32 PM, Anders Nawroth 
  and...@neotechnology.comwrote:
 
  Hi!
 
  Seems right to me. And yes, key/value would typically be storing the
  relationship type. We should bring this up again next week, when Mattias
  who wrote the indexing stuff is back from vacation!
 
  /anders
 
  On 07/28/2011 03:05 PM, John cyuczieekc wrote:
   with relationshipindex seems to be working as fast, though I am not sure
  if
   I am using it right ie.
   doing this first time:
   RelationshipIndex ri = graphDB.index().forRelationships( relsIndex );
  
   and on each relationship created between sNode--eNode where eNode is
  any
   random node, and sNode is the same on each call (in my case)
   Relationship rel = sNode.createRelationshipTo( eNode, linkedRelType );
   ri.add( rel, key, value );
  
   and when checking if sNode--eNode exists:
   final Relationship rel = ri.query( key, value, sNode, eNode
   ).getSingle();
   if ( null == rel ) {
return false;
} else {
return true;
}
  
   seems to me that using those `key` and `value` are useless, unless I'm
   missing something; I'm probably using them wrongly but in my case I only
   have one type of relationship.
  
   In either case, the timings as good ~1ms, and no memory increase, so
  this
   would seem like a good workaround; with findSinglePath the memory would
   increase by 1 gig (for my test)
  
   Thanks for suggesting to revisit RelationshipIndex, last time I dropped
  it I
   think because I didn't know what to put on key/value.
  
   Also, I get what Niels meant now by that play nice with transactions,
  that
   if both neo4j and bdb recover the same things after crash/recovery or
  not...
  
  
   On Thu, Jul 28, 2011 at 2:05 PM, Anders Nawroth
  and...@neotechnology.comwrote:
  
   Hi!
  
   I think the hard part about transactions is recovering after crashes
  and
   such.
  
   Regarding finding A--B, have you tried using a relationship index?
  See:
  
  
  http://components.neo4j.org/neo4j/1.4/apidocs/org/neo4j/graphdb/index/ReadableRelationshipIndex.html
  
   /anders
  
   On 07/28/2011 01:35 PM, John cyuczieekc wrote:
   I don't know what you mean by this:
   I don't know how nicely BDB plays with Neo4J transactions.
   I have some small experience with bdb java edition that is, but I'm
  not
   sure
   what would their transaction have to do with neo4j transactions... if
  you

Re: [Neo4j] strange problem while getting a node property

2011-07-28 Thread Jean-Sébastien Stoffen
Hi,

thank you very much!
In deed, node 0 doesn't have any properties.
I did not think about this.

Now it's working perfectly.

Regards,
Jean-Sébastien Stoffen

Le 28/07/11 13:26, Niels Hoogeveen a écrit :
 When iterating over all nodes, you also pull the reference node (with id = 
 0), which probably doesn't have the requested property.
 If you want to list all properties of a node, it's better to use a construct 
 like:
 for(String key: node.getPropertyKeys()){   
 System.out.println(node.getProperty(key));}

 Date: Thu, 28 Jul 2011 13:18:50 +0200
 From: c-...@jsnet.be
 To: user@lists.neo4j.org
 Subject: [Neo4j] strange problem while getting a node property

 Hi,
 I've this strange problem when I try to collect data from the graph with
 the Java API in Groovy :

 db.allNodes.each {node -
   cpt=0
   node.getRelationships().each {rel -
   cpt++
   }
   println (${node} ${cpt})
   println node.getPropertyKeys()
 }

 The iteration on each node is right working.
 The iteration to count the relationships on each node is working too.

 The call node.getPropertyKeys() gives me the list of the properties like
 this :
 [nbrel, version, maintainer, section, architecture, package, priority,
 dataset, installedSize]

 But,

 If a call node.getProperty(package)
 I receive this error :
 Caught: org.neo4j.graphdb.NotFoundException: package property not found
 for NodeImpl#0

 And, If I set the value just before, for test like this :
 node.setProperty(package, test)
 println node.getProperty(package)

 I get the value.

 So I can't get property which was not set by the node.setProperty method.
 The initial data are copied into the graph with a perl script using the
 Neo4j REST interface.

 Maybe I do something wrong,
 I'm a newbie in both Neo4j and Groovy

 Regards,
 Jean-Sébastien Stoffen
 ___
 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] bdb-index

2011-07-28 Thread Niels Hoogeveen

Trying to find something useful to hide the implementation book keeping of 
Enhanced API, I tried out dbd-index as can be found 
here:https://github.com/peterneubauer/bdb-index
It looks interesting, but fails its tests. When recovering it performs 
BerkeleyDbCommand#readCommand from the log. The retrieved indexName is not 
actually garbage. I would like to help make this component workable, but area 
of the database is a bit beyond the scope that I know.
I know this is completely unsupported software, but can someone give me some 
pointers on how to fix this issue?
Niels 
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Events this Week

2011-07-28 Thread John cyuczieekc
I chose not to attend the webinar due to the fact that it requires java and
runs *unrestricted*
So for anyone else: Enjoy!  the webinar is supposedly still going at this
time (35mins into it)

On Thu, Jul 28, 2011 at 4:04 PM, John cyuczieekc cyuczie...@gmail.comwrote:

 btw, just making sure, the Webinar is in 3 hours from now right? (otherwise
 I miscalculated)

 On Wed, Jul 27, 2011 at 8:28 PM, Allison Sparrow 
 allison.spar...@neotechnology.com wrote:

 Hi all,

 Just a reminder on three events we have to close off the week:

 *TONIGHT at 18:00 PDT*
 Vancouver Meetup | Reference Node: Creating a Graph:
 www.meetup.com/graphdb-vancouver/events/24143031/
 *
 TONIGHT at 19:00 PDT*
 Seattle Meetup | Discussions with Andreas Kollegger:
 www.meetup.com/graphdb-seattle/events/21044691/
 *
 TOMORROW at 10:00 PDT
 *
 Webinar | Getting Started with Neo4j:
 https://www1.gotomeeting.com/register/855127096

 See you there,

 *Allison Sparrow* *
 **Marketing Manager | Neo Technology*
 +19499036091 | @ayeeson http://twitter.com/#%21/ayeeson
 ___
 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] bdb-index

2011-07-28 Thread Niels Hoogeveen

Should read: The retrieved indexName is actually garbage. 

 From: pd_aficion...@hotmail.com
 To: user@lists.neo4j.org
 Date: Thu, 28 Jul 2011 19:36:21 +0200
 Subject: [Neo4j] bdb-index
 
 
 Trying to find something useful to hide the implementation book keeping of 
 Enhanced API, I tried out dbd-index as can be found 
 here:https://github.com/peterneubauer/bdb-index
 It looks interesting, but fails its tests. When recovering it performs 
 BerkeleyDbCommand#readCommand from the log. The retrieved indexName is not 
 actually garbage. I would like to help make this component workable, but area 
 of the database is a bit beyond the scope that I know.
 I know this is completely unsupported software, but can someone give me some 
 pointers on how to fix this issue?
 Niels   
 ___
 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] bdb-index

2011-07-28 Thread Peter Neubauer
niels,
in this spike, I just concentrated on getting _something_ working in
order to test insertion speed. This is not up to real indexing
standards, so some love is needed here. I think Mattias is the best
person to ask about pointers, let's wait until he is back next week if
that is ok? Maybe some other (like the standard Lucene)  index can
suffice for the time being to test out things?

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 Thu, Jul 28, 2011 at 10:36 AM, Niels Hoogeveen
pd_aficion...@hotmail.com wrote:

 Trying to find something useful to hide the implementation book keeping of 
 Enhanced API, I tried out dbd-index as can be found 
 here:https://github.com/peterneubauer/bdb-index
 It looks interesting, but fails its tests. When recovering it performs 
 BerkeleyDbCommand#readCommand from the log. The retrieved indexName is not 
 actually garbage. I would like to help make this component workable, but area 
 of the database is a bit beyond the scope that I know.
 I know this is completely unsupported software, but can someone give me some 
 pointers on how to fix this issue?
 Niels
 ___
 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] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Aseem Kishore
Jim, thanks for the explanation. I understand your constraints, but thinking
about it more, I'm actually even more baffled -- how can we actually make
use of this paged traversal API in a web scenario?

[neo4j db]  [web server]  [web client, e.g. browser]

If I want to show the results of a search, let's say, in a way that supports
paging, it just seems like I can't take advantage of the Neo4j API at all
here.

If the user wants to be able to refresh the page, or click Prev, the
browser isn't keeping state across page changes,  so it has to rely on the
web server to give it the right page.

If the server now has to keep state of all results, it defeats the purpose
of using the Neo4j paging API altogether: the server necessarily has to
fetch everything and handle paging itself.

Am I missing something? Or is this (typical in our case) scenario not
something you guys are designing for? (And if not, what *is* the use case
you guys envisioned for this?)

It seems to me that the root cause of this dilemma is the IterableT
constraint you mentioned -- it only goes forward.

Perhaps a better API/model then would be to use an offset parameter. This is
different than page because it doesn't require the server to keep state;
it just tells the server, return me the results starting *after* this result
(which would generally be the last result I saw on my previous page of
results).

E.g. the following requests:

- Get me the results of this traverse would return everything
- Get me the results of this traverse, paged with size 20 would return 20
results
- Get me the results of this traverse, paged with size 20, starting with
the node/rel after this one [given by an ID] would return the next 20
results
- etc.

Aseem


On Thu, Jul 28, 2011 at 5:09 AM, Jim Webber j...@neotechnology.com wrote:

 Hi Aseem,

 When you GET a resource, you're asking for its state at a particular
 instant in time. GET's don't always return the same content, what's
 important about them is that clients can't be held responsible for any
 (unintended) side-effects of a GET operation. For example, if you GET the
 BBC new page now, and then GET it again in 20 minutes, the bytes you receive
 will almost certainly be different.

 I think what's perhaps a bit odd in the paged traverser case is that
 clients do in fact trigger a state transition on GET which materially
 changes the response. Adding /next to the paged traverser URI does not
 change this, it just lengthens the URI.

 Under the covers, the REST API is just using the traversal API and so gets
 back an IterableT which is forward-only. We can't (or rather won't) do
 things like ?page=2 (or similar) because that would involve holding all the
 traversal state on the server which is one of the things paged traversers
 were meant to avoid (being kind to both the server and clients).

 If you want to remember all traversal state on the client, that's OK. You
 can page through your own local data structures. In fact given the number of
 clients is likely to be larger than the number of servers, this makes sense
 since the memory burden is shared amongst the many clients, rather than
 being placed on the single server.

 So, I'll buy that we've conflated a little too much into a single GET, but
 it's motivated by a sincere trade off to not overburden the server.

 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] cypher packages

2011-07-28 Thread Jean-Sébastien Stoffen
Hi,

Sorry for the newbie questions who happens very frequently at the begining.

I'm trying to submit some request to my graph using the cypher query 
language

I get those messages :
unable to resolve class CypherParser
unable to resolve class ExecutionResult
...

when I try the example showed here :
http://docs.neo4j.org/chunked/1.4.M04/query-lang.html

After some research, I've not found where I can download those packages
I've searched for org.neo4j.cypher.javacompat but without succes.

Could you tell me where to find it?

Regards,
Jean-Sébastien Stoffen.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] bdb-index

2011-07-28 Thread Niels Hoogeveen

Thank you, Peter,There is no rush here. It would be nice to investigate this 
option, but it can wait until Mattias has returned and sifted through urgent 
matters. The question is even, if it would be a good idea to use an index to do 
the book keeping for Enhanced API.As it is now, the Reification of eg. a 
Relationship, requires one property to be set on a relationship, containing the 
node ID of the associated node. On the associated node is a property containing 
the ID of the relationship, so there is a bidirectional look up. Introducing an 
index would remove the need to have these additional properties, but would lead 
to slower look-up times (no matter how fast the index).So it's a trade-off 
between speed and cleanliness of namespace. Using the Enhanced API disallows 
certain property names to be used in user applications.The property names used 
in Enhanced API all start with org.neo4j.collections.graphbd., so there is 
little chance a user application would want to use those property names, but it 
is a restriction not found in the standard API, so ultimately something to 
consider.Niels
 From: peter.neuba...@neotechnology.com
 Date: Thu, 28 Jul 2011 10:39:47 -0700
 To: user@lists.neo4j.org
 Subject: Re: [Neo4j] bdb-index
 
 niels,
 in this spike, I just concentrated on getting _something_ working in
 order to test insertion speed. This is not up to real indexing
 standards, so some love is needed here. I think Mattias is the best
 person to ask about pointers, let's wait until he is back next week if
 that is ok? Maybe some other (like the standard Lucene)  index can
 suffice for the time being to test out things?
 
 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 Thu, Jul 28, 2011 at 10:36 AM, Niels Hoogeveen
 pd_aficion...@hotmail.com wrote:
 
  Trying to find something useful to hide the implementation book keeping of 
  Enhanced API, I tried out dbd-index as can be found 
  here:https://github.com/peterneubauer/bdb-index
  It looks interesting, but fails its tests. When recovering it performs 
  BerkeleyDbCommand#readCommand from the log. The retrieved indexName is not 
  actually garbage. I would like to help make this component workable, but 
  area of the database is a bit beyond the scope that I know.
  I know this is completely unsupported software, but can someone give me 
  some pointers on how to fix this issue?
  Niels
  ___
  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] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Rick Bullotta
If you don't keep state paging will not work properly if the data changes 
often.  What may have been record #21 when you are viewing the first page of 20 
result might not be record #21 when you go to fetch the 2nd page.  

If you're only concerned with pages of 20 or so, you should absolutely, 
positively do the paging on the browser.  Anything up to a couple thousand rows 
can *easily* be handled by any modern browser.  Keep the parsed JSON data on 
the client side and page it there.  This approach will be very performant on 
both the client and server, and won't require any state.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Aseem Kishore
Sent: Thursday, July 28, 2011 3:01 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

Jim, thanks for the explanation. I understand your constraints, but thinking
about it more, I'm actually even more baffled -- how can we actually make
use of this paged traversal API in a web scenario?

[neo4j db]  [web server]  [web client, e.g. browser]

If I want to show the results of a search, let's say, in a way that supports
paging, it just seems like I can't take advantage of the Neo4j API at all
here.

If the user wants to be able to refresh the page, or click Prev, the
browser isn't keeping state across page changes,  so it has to rely on the
web server to give it the right page.

If the server now has to keep state of all results, it defeats the purpose
of using the Neo4j paging API altogether: the server necessarily has to
fetch everything and handle paging itself.

Am I missing something? Or is this (typical in our case) scenario not
something you guys are designing for? (And if not, what *is* the use case
you guys envisioned for this?)

It seems to me that the root cause of this dilemma is the IterableT
constraint you mentioned -- it only goes forward.

Perhaps a better API/model then would be to use an offset parameter. This is
different than page because it doesn't require the server to keep state;
it just tells the server, return me the results starting *after* this result
(which would generally be the last result I saw on my previous page of
results).

E.g. the following requests:

- Get me the results of this traverse would return everything
- Get me the results of this traverse, paged with size 20 would return 20
results
- Get me the results of this traverse, paged with size 20, starting with
the node/rel after this one [given by an ID] would return the next 20
results
- etc.

Aseem


On Thu, Jul 28, 2011 at 5:09 AM, Jim Webber j...@neotechnology.com wrote:

 Hi Aseem,

 When you GET a resource, you're asking for its state at a particular
 instant in time. GET's don't always return the same content, what's
 important about them is that clients can't be held responsible for any
 (unintended) side-effects of a GET operation. For example, if you GET the
 BBC new page now, and then GET it again in 20 minutes, the bytes you receive
 will almost certainly be different.

 I think what's perhaps a bit odd in the paged traverser case is that
 clients do in fact trigger a state transition on GET which materially
 changes the response. Adding /next to the paged traverser URI does not
 change this, it just lengthens the URI.

 Under the covers, the REST API is just using the traversal API and so gets
 back an IterableT which is forward-only. We can't (or rather won't) do
 things like ?page=2 (or similar) because that would involve holding all the
 traversal state on the server which is one of the things paged traversers
 were meant to avoid (being kind to both the server and clients).

 If you want to remember all traversal state on the client, that's OK. You
 can page through your own local data structures. In fact given the number of
 clients is likely to be larger than the number of servers, this makes sense
 since the memory burden is shared amongst the many clients, rather than
 being placed on the single server.

 So, I'll buy that we've conflated a little too much into a single GET, but
 it's motivated by a sincere trade off to not overburden the server.

 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


Re: [Neo4j] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Rick Bullotta
BTW, paging is a relic of the dial-up modem days, IMNSHO.

If a machine is the client of the REST API call, it should get all the data in 
a single, atomic call.  If it is a browser or mobile app, there's a natural 
limit to the # of items that a human will bother paging through, which is 
fairly small (20 - 500 typically), so again, it is painless to get all the 
data in a single call.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Rick Bullotta
Sent: Thursday, July 28, 2011 6:11 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

If you don't keep state paging will not work properly if the data changes 
often.  What may have been record #21 when you are viewing the first page of 20 
result might not be record #21 when you go to fetch the 2nd page.  

If you're only concerned with pages of 20 or so, you should absolutely, 
positively do the paging on the browser.  Anything up to a couple thousand rows 
can *easily* be handled by any modern browser.  Keep the parsed JSON data on 
the client side and page it there.  This approach will be very performant on 
both the client and server, and won't require any state.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Aseem Kishore
Sent: Thursday, July 28, 2011 3:01 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

Jim, thanks for the explanation. I understand your constraints, but thinking
about it more, I'm actually even more baffled -- how can we actually make
use of this paged traversal API in a web scenario?

[neo4j db]  [web server]  [web client, e.g. browser]

If I want to show the results of a search, let's say, in a way that supports
paging, it just seems like I can't take advantage of the Neo4j API at all
here.

If the user wants to be able to refresh the page, or click Prev, the
browser isn't keeping state across page changes,  so it has to rely on the
web server to give it the right page.

If the server now has to keep state of all results, it defeats the purpose
of using the Neo4j paging API altogether: the server necessarily has to
fetch everything and handle paging itself.

Am I missing something? Or is this (typical in our case) scenario not
something you guys are designing for? (And if not, what *is* the use case
you guys envisioned for this?)

It seems to me that the root cause of this dilemma is the IterableT
constraint you mentioned -- it only goes forward.

Perhaps a better API/model then would be to use an offset parameter. This is
different than page because it doesn't require the server to keep state;
it just tells the server, return me the results starting *after* this result
(which would generally be the last result I saw on my previous page of
results).

E.g. the following requests:

- Get me the results of this traverse would return everything
- Get me the results of this traverse, paged with size 20 would return 20
results
- Get me the results of this traverse, paged with size 20, starting with
the node/rel after this one [given by an ID] would return the next 20
results
- etc.

Aseem


On Thu, Jul 28, 2011 at 5:09 AM, Jim Webber j...@neotechnology.com wrote:

 Hi Aseem,

 When you GET a resource, you're asking for its state at a particular
 instant in time. GET's don't always return the same content, what's
 important about them is that clients can't be held responsible for any
 (unintended) side-effects of a GET operation. For example, if you GET the
 BBC new page now, and then GET it again in 20 minutes, the bytes you receive
 will almost certainly be different.

 I think what's perhaps a bit odd in the paged traverser case is that
 clients do in fact trigger a state transition on GET which materially
 changes the response. Adding /next to the paged traverser URI does not
 change this, it just lengthens the URI.

 Under the covers, the REST API is just using the traversal API and so gets
 back an IterableT which is forward-only. We can't (or rather won't) do
 things like ?page=2 (or similar) because that would involve holding all the
 traversal state on the server which is one of the things paged traversers
 were meant to avoid (being kind to both the server and clients).

 If you want to remember all traversal state on the client, that's OK. You
 can page through your own local data structures. In fact given the number of
 clients is likely to be larger than the number of servers, this makes sense
 since the memory burden is shared amongst the many clients, rather than
 being placed on the single server.

 So, I'll buy that we've conflated a little too much into a single GET, but
 it's motivated by a sincere trade off to not overburden the server.

 Jim



 ___
 Neo4j mailing list
 User@lists.neo4j.org
 

Re: [Neo4j] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Daniel Gasienica
Sure but isn’t it a huge waste of bandwidth if you load hundreds of results
and the user only looks at the first dozen?

On Thu, Jul 28, 2011 at 15:16, Rick Bullotta rick.bullo...@thingworx.comwrote:

 BTW, paging is a relic of the dial-up modem days, IMNSHO.

 If a machine is the client of the REST API call, it should get all the data
 in a single, atomic call.  If it is a browser or mobile app, there's a
 natural limit to the # of items that a human will bother paging through,
 which is fairly small (20 - 500 typically), so again, it is painless to get
 all the data in a single call.

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Rick Bullotta
 Sent: Thursday, July 28, 2011 6:11 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

 If you don't keep state paging will not work properly if the data changes
 often.  What may have been record #21 when you are viewing the first page of
 20 result might not be record #21 when you go to fetch the 2nd page.

 If you're only concerned with pages of 20 or so, you should absolutely,
 positively do the paging on the browser.  Anything up to a couple thousand
 rows can *easily* be handled by any modern browser.  Keep the parsed JSON
 data on the client side and page it there.  This approach will be very
 performant on both the client and server, and won't require any state.

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Aseem Kishore
 Sent: Thursday, July 28, 2011 3:01 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

 Jim, thanks for the explanation. I understand your constraints, but
 thinking
 about it more, I'm actually even more baffled -- how can we actually make
 use of this paged traversal API in a web scenario?

 [neo4j db]  [web server]  [web client, e.g. browser]

 If I want to show the results of a search, let's say, in a way that
 supports
 paging, it just seems like I can't take advantage of the Neo4j API at all
 here.

 If the user wants to be able to refresh the page, or click Prev, the
 browser isn't keeping state across page changes,  so it has to rely on the
 web server to give it the right page.

 If the server now has to keep state of all results, it defeats the purpose
 of using the Neo4j paging API altogether: the server necessarily has to
 fetch everything and handle paging itself.

 Am I missing something? Or is this (typical in our case) scenario not
 something you guys are designing for? (And if not, what *is* the use case
 you guys envisioned for this?)

 It seems to me that the root cause of this dilemma is the IterableT
 constraint you mentioned -- it only goes forward.

 Perhaps a better API/model then would be to use an offset parameter. This
 is
 different than page because it doesn't require the server to keep state;
 it just tells the server, return me the results starting *after* this
 result
 (which would generally be the last result I saw on my previous page of
 results).

 E.g. the following requests:

 - Get me the results of this traverse would return everything
 - Get me the results of this traverse, paged with size 20 would return 20
 results
 - Get me the results of this traverse, paged with size 20, starting with
 the node/rel after this one [given by an ID] would return the next 20
 results
 - etc.

 Aseem


 On Thu, Jul 28, 2011 at 5:09 AM, Jim Webber j...@neotechnology.com wrote:

  Hi Aseem,
 
  When you GET a resource, you're asking for its state at a particular
  instant in time. GET's don't always return the same content, what's
  important about them is that clients can't be held responsible for any
  (unintended) side-effects of a GET operation. For example, if you GET the
  BBC new page now, and then GET it again in 20 minutes, the bytes you
 receive
  will almost certainly be different.
 
  I think what's perhaps a bit odd in the paged traverser case is that
  clients do in fact trigger a state transition on GET which materially
  changes the response. Adding /next to the paged traverser URI does not
  change this, it just lengthens the URI.
 
  Under the covers, the REST API is just using the traversal API and so
 gets
  back an IterableT which is forward-only. We can't (or rather won't) do
  things like ?page=2 (or similar) because that would involve holding all
 the
  traversal state on the server which is one of the things paged traversers
  were meant to avoid (being kind to both the server and clients).
 
  If you want to remember all traversal state on the client, that's OK. You
  can page through your own local data structures. In fact given the number
 of
  clients is likely to be larger than the number of servers, this makes
 sense
  since the memory burden is shared amongst the many clients, rather than
  being placed on the single server.
 
  So, 

Re: [Neo4j] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Rick Bullotta
Not really, unless the JSON content is HUGE - which is rare.  The small price 
in bandwidth versus a responsive UI and the need for not managing state is a 
good tradeoff.  The only exception might be mobile apps, but in that case, I'd 
just fetch a smaller block (maybe 4 or 5 pages worth).  Very few users have the 
patience to page through more than a few pages worth of information. 

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Daniel Gasienica
Sent: Thursday, July 28, 2011 6:20 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

Sure but isn’t it a huge waste of bandwidth if you load hundreds of results
and the user only looks at the first dozen?

On Thu, Jul 28, 2011 at 15:16, Rick Bullotta rick.bullo...@thingworx.comwrote:

 BTW, paging is a relic of the dial-up modem days, IMNSHO.

 If a machine is the client of the REST API call, it should get all the data
 in a single, atomic call.  If it is a browser or mobile app, there's a
 natural limit to the # of items that a human will bother paging through,
 which is fairly small (20 - 500 typically), so again, it is painless to get
 all the data in a single call.

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Rick Bullotta
 Sent: Thursday, July 28, 2011 6:11 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

 If you don't keep state paging will not work properly if the data changes
 often.  What may have been record #21 when you are viewing the first page of
 20 result might not be record #21 when you go to fetch the 2nd page.

 If you're only concerned with pages of 20 or so, you should absolutely,
 positively do the paging on the browser.  Anything up to a couple thousand
 rows can *easily* be handled by any modern browser.  Keep the parsed JSON
 data on the client side and page it there.  This approach will be very
 performant on both the client and server, and won't require any state.

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Aseem Kishore
 Sent: Thursday, July 28, 2011 3:01 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

 Jim, thanks for the explanation. I understand your constraints, but
 thinking
 about it more, I'm actually even more baffled -- how can we actually make
 use of this paged traversal API in a web scenario?

 [neo4j db]  [web server]  [web client, e.g. browser]

 If I want to show the results of a search, let's say, in a way that
 supports
 paging, it just seems like I can't take advantage of the Neo4j API at all
 here.

 If the user wants to be able to refresh the page, or click Prev, the
 browser isn't keeping state across page changes,  so it has to rely on the
 web server to give it the right page.

 If the server now has to keep state of all results, it defeats the purpose
 of using the Neo4j paging API altogether: the server necessarily has to
 fetch everything and handle paging itself.

 Am I missing something? Or is this (typical in our case) scenario not
 something you guys are designing for? (And if not, what *is* the use case
 you guys envisioned for this?)

 It seems to me that the root cause of this dilemma is the IterableT
 constraint you mentioned -- it only goes forward.

 Perhaps a better API/model then would be to use an offset parameter. This
 is
 different than page because it doesn't require the server to keep state;
 it just tells the server, return me the results starting *after* this
 result
 (which would generally be the last result I saw on my previous page of
 results).

 E.g. the following requests:

 - Get me the results of this traverse would return everything
 - Get me the results of this traverse, paged with size 20 would return 20
 results
 - Get me the results of this traverse, paged with size 20, starting with
 the node/rel after this one [given by an ID] would return the next 20
 results
 - etc.

 Aseem


 On Thu, Jul 28, 2011 at 5:09 AM, Jim Webber j...@neotechnology.com wrote:

  Hi Aseem,
 
  When you GET a resource, you're asking for its state at a particular
  instant in time. GET's don't always return the same content, what's
  important about them is that clients can't be held responsible for any
  (unintended) side-effects of a GET operation. For example, if you GET the
  BBC new page now, and then GET it again in 20 minutes, the bytes you
 receive
  will almost certainly be different.
 
  I think what's perhaps a bit odd in the paged traverser case is that
  clients do in fact trigger a state transition on GET which materially
  changes the response. Adding /next to the paged traverser URI does not
  change this, it just lengthens the URI.
 
  Under the covers, the REST API is just using the traversal API and 

Re: [Neo4j] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Aseem Kishore
Sorry, I don't understand. Are you going to tell Google and Bing to send
JSON for their search results also, and page on the client side? There is a
very valid use case for not wanting to require JavaScript to page.

Aseem

On Thu, Jul 28, 2011 at 3:25 PM, Rick Bullotta
rick.bullo...@thingworx.comwrote:

 Not really, unless the JSON content is HUGE - which is rare.  The small
 price in bandwidth versus a responsive UI and the need for not managing
 state is a good tradeoff.  The only exception might be mobile apps, but in
 that case, I'd just fetch a smaller block (maybe 4 or 5 pages worth).  Very
 few users have the patience to page through more than a few pages worth of
 information.

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Daniel Gasienica
 Sent: Thursday, July 28, 2011 6:20 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

 Sure but isn’t it a huge waste of bandwidth if you load hundreds of results
 and the user only looks at the first dozen?

 On Thu, Jul 28, 2011 at 15:16, Rick Bullotta rick.bullo...@thingworx.com
 wrote:

  BTW, paging is a relic of the dial-up modem days, IMNSHO.
 
  If a machine is the client of the REST API call, it should get all the
 data
  in a single, atomic call.  If it is a browser or mobile app, there's a
  natural limit to the # of items that a human will bother paging through,
  which is fairly small (20 - 500 typically), so again, it is painless to
 get
  all the data in a single call.
 
  -Original Message-
  From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
  On Behalf Of Rick Bullotta
  Sent: Thursday, July 28, 2011 6:11 PM
  To: Neo4j user discussions
  Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement
 
  If you don't keep state paging will not work properly if the data
 changes
  often.  What may have been record #21 when you are viewing the first page
 of
  20 result might not be record #21 when you go to fetch the 2nd page.
 
  If you're only concerned with pages of 20 or so, you should absolutely,
  positively do the paging on the browser.  Anything up to a couple
 thousand
  rows can *easily* be handled by any modern browser.  Keep the parsed JSON
  data on the client side and page it there.  This approach will be very
  performant on both the client and server, and won't require any state.
 
  -Original Message-
  From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
  On Behalf Of Aseem Kishore
  Sent: Thursday, July 28, 2011 3:01 PM
  To: Neo4j user discussions
  Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement
 
  Jim, thanks for the explanation. I understand your constraints, but
  thinking
  about it more, I'm actually even more baffled -- how can we actually make
  use of this paged traversal API in a web scenario?
 
  [neo4j db]  [web server]  [web client, e.g. browser]
 
  If I want to show the results of a search, let's say, in a way that
  supports
  paging, it just seems like I can't take advantage of the Neo4j API at all
  here.
 
  If the user wants to be able to refresh the page, or click Prev, the
  browser isn't keeping state across page changes,  so it has to rely on
 the
  web server to give it the right page.
 
  If the server now has to keep state of all results, it defeats the
 purpose
  of using the Neo4j paging API altogether: the server necessarily has to
  fetch everything and handle paging itself.
 
  Am I missing something? Or is this (typical in our case) scenario not
  something you guys are designing for? (And if not, what *is* the use case
  you guys envisioned for this?)
 
  It seems to me that the root cause of this dilemma is the IterableT
  constraint you mentioned -- it only goes forward.
 
  Perhaps a better API/model then would be to use an offset parameter. This
  is
  different than page because it doesn't require the server to keep
 state;
  it just tells the server, return me the results starting *after* this
  result
  (which would generally be the last result I saw on my previous page of
  results).
 
  E.g. the following requests:
 
  - Get me the results of this traverse would return everything
  - Get me the results of this traverse, paged with size 20 would return
 20
  results
  - Get me the results of this traverse, paged with size 20, starting with
  the node/rel after this one [given by an ID] would return the next 20
  results
  - etc.
 
  Aseem
 
 
  On Thu, Jul 28, 2011 at 5:09 AM, Jim Webber j...@neotechnology.com
 wrote:
 
   Hi Aseem,
  
   When you GET a resource, you're asking for its state at a particular
   instant in time. GET's don't always return the same content, what's
   important about them is that clients can't be held responsible for any
   (unintended) side-effects of a GET operation. For example, if you GET
 the
   BBC new page now, and then GET 

Re: [Neo4j] cypher packages

2011-07-28 Thread Tobias Ivarsson
They should be in the neo4j-cypher-1.4.jar.

That jar-file should be among your dependencies if you simply depend on (in
maven):

dependency
  groupIdorg.neo4j/groupId
  artifactIdneo4j/artifactId
  version1.4/version
/dependency


Cheers,
Tobias

On Thu, Jul 28, 2011 at 12:07 PM, Jean-Sébastien Stoffen c-...@jsnet.bewrote:

 Hi,

 Sorry for the newbie questions who happens very frequently at the begining.

 I'm trying to submit some request to my graph using the cypher query
 language

 I get those messages :
 unable to resolve class CypherParser
 unable to resolve class ExecutionResult
 ...

 when I try the example showed here :
 http://docs.neo4j.org/chunked/1.4.M04/query-lang.html

 After some research, I've not found where I can download those packages
 I've searched for org.neo4j.cypher.javacompat but without succes.

 Could you tell me where to find it?

 Regards,
 Jean-Sébastien Stoffen.
 ___
 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] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Rick Bullotta
Um, I'm guessing that you aren't aware of how Google's UI/API works...

Open up Firebug, Chrome Tools, or Fiddler, and you'll see that the biggest 
chunk of traffic when you switch from one page of Google search results to 
another page (via the main Google search page) is a JSON packet...which uses 
their search API...which returns JSON.  Do they page?  Yes.  Can you call the 
API and get hundreds of results at once?  Yes...



-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Aseem Kishore
Sent: Thursday, July 28, 2011 6:42 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

Sorry, I don't understand. Are you going to tell Google and Bing to send
JSON for their search results also, and page on the client side? There is a
very valid use case for not wanting to require JavaScript to page.

Aseem

On Thu, Jul 28, 2011 at 3:25 PM, Rick Bullotta
rick.bullo...@thingworx.comwrote:

 Not really, unless the JSON content is HUGE - which is rare.  The small
 price in bandwidth versus a responsive UI and the need for not managing
 state is a good tradeoff.  The only exception might be mobile apps, but in
 that case, I'd just fetch a smaller block (maybe 4 or 5 pages worth).  Very
 few users have the patience to page through more than a few pages worth of
 information.

 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Daniel Gasienica
 Sent: Thursday, July 28, 2011 6:20 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

 Sure but isn't it a huge waste of bandwidth if you load hundreds of results
 and the user only looks at the first dozen?

 On Thu, Jul 28, 2011 at 15:16, Rick Bullotta rick.bullo...@thingworx.com
 wrote:

  BTW, paging is a relic of the dial-up modem days, IMNSHO.
 
  If a machine is the client of the REST API call, it should get all the
 data
  in a single, atomic call.  If it is a browser or mobile app, there's a
  natural limit to the # of items that a human will bother paging through,
  which is fairly small (20 - 500 typically), so again, it is painless to
 get
  all the data in a single call.
 
  -Original Message-
  From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
  On Behalf Of Rick Bullotta
  Sent: Thursday, July 28, 2011 6:11 PM
  To: Neo4j user discussions
  Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement
 
  If you don't keep state paging will not work properly if the data
 changes
  often.  What may have been record #21 when you are viewing the first page
 of
  20 result might not be record #21 when you go to fetch the 2nd page.
 
  If you're only concerned with pages of 20 or so, you should absolutely,
  positively do the paging on the browser.  Anything up to a couple
 thousand
  rows can *easily* be handled by any modern browser.  Keep the parsed JSON
  data on the client side and page it there.  This approach will be very
  performant on both the client and server, and won't require any state.
 
  -Original Message-
  From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
  On Behalf Of Aseem Kishore
  Sent: Thursday, July 28, 2011 3:01 PM
  To: Neo4j user discussions
  Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement
 
  Jim, thanks for the explanation. I understand your constraints, but
  thinking
  about it more, I'm actually even more baffled -- how can we actually make
  use of this paged traversal API in a web scenario?
 
  [neo4j db]  [web server]  [web client, e.g. browser]
 
  If I want to show the results of a search, let's say, in a way that
  supports
  paging, it just seems like I can't take advantage of the Neo4j API at all
  here.
 
  If the user wants to be able to refresh the page, or click Prev, the
  browser isn't keeping state across page changes,  so it has to rely on
 the
  web server to give it the right page.
 
  If the server now has to keep state of all results, it defeats the
 purpose
  of using the Neo4j paging API altogether: the server necessarily has to
  fetch everything and handle paging itself.
 
  Am I missing something? Or is this (typical in our case) scenario not
  something you guys are designing for? (And if not, what *is* the use case
  you guys envisioned for this?)
 
  It seems to me that the root cause of this dilemma is the IterableT
  constraint you mentioned -- it only goes forward.
 
  Perhaps a better API/model then would be to use an offset parameter. This
  is
  different than page because it doesn't require the server to keep
 state;
  it just tells the server, return me the results starting *after* this
  result
  (which would generally be the last result I saw on my previous page of
  results).
 
  E.g. the following requests:
 
  - Get me the results of this traverse would return 

[Neo4j] Composable traversals

2011-07-28 Thread Niels Hoogeveen

I'd like to take a stab at implementing traversals in the Enhanced API. One of 
the things I'd like to do, is to make traversals composable. 

Right now a Traverser is created by either calling the traverse method on Node, 
or to call the traverse(Node) method on TraversalDescription. 

This makes traversals inherently non-composable, so we can't define a single 
traversal that returns the parents of all our friends.

To make Traversers composable we need a function:

Traverser traverse(Traverser, TraversalDescription)

My take on it is to make Element (which is a superinterface of Node) into a 
Traverser.

Traverser is basically another name for IterablePath. 

Every Node (or more generally every Element) can be seen as an IterabePath, 
returning a single Path, which contains a single path-element, the Node/Element 
itself.

Composing traversals would entail the concatenation of the paths returned with 
the paths supplied, so when we ask for the parents of all our friends, the 
returned paths would take the form:

Node --FRIEND-- Node -- PARENT -- Node

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


Re: [Neo4j] Paged traversal REST API suggestion for improvement

2011-07-28 Thread Aseem Kishore
Haha. I think we're speaking past each other. Here's my point:

Disable JS. Open up Google. Do a search. Click to the next page. Click to
back to the previous page. Click page 3. Refresh. Etc.

All of this works, without JS. That means the client (your browser) isn't
the party doing the paging or keeping track of all results. It's something
on the server side.

My original question was: I don't see how one can achieve this using Neo4j's
paged traversal API. Is that not a reasonable scenario / use case for it? If
not, what is?

My follow-up suggestion was: could we not support this scenario / use case
by changing (or expanding) the API to support an offset parameter? In
other words, random access -- like keying into a graph by index and then
following edges -- instead of forward-only and once-only IterableT.

Aseem


On Thu, Jul 28, 2011 at 4:27 PM, Rick Bullotta
rick.bullo...@thingworx.comwrote:

 Um, I'm guessing that you aren't aware of how Google's UI/API works...

 Open up Firebug, Chrome Tools, or Fiddler, and you'll see that the biggest
 chunk of traffic when you switch from one page of Google search results to
 another page (via the main Google search page) is a JSON packet...which uses
 their search API...which returns JSON.  Do they page?  Yes.  Can you call
 the API and get hundreds of results at once?  Yes...



 -Original Message-
 From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
 On Behalf Of Aseem Kishore
 Sent: Thursday, July 28, 2011 6:42 PM
 To: Neo4j user discussions
 Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement

 Sorry, I don't understand. Are you going to tell Google and Bing to send
 JSON for their search results also, and page on the client side? There is a
 very valid use case for not wanting to require JavaScript to page.

 Aseem

 On Thu, Jul 28, 2011 at 3:25 PM, Rick Bullotta
 rick.bullo...@thingworx.comwrote:

  Not really, unless the JSON content is HUGE - which is rare.  The small
  price in bandwidth versus a responsive UI and the need for not managing
  state is a good tradeoff.  The only exception might be mobile apps, but
 in
  that case, I'd just fetch a smaller block (maybe 4 or 5 pages worth).
  Very
  few users have the patience to page through more than a few pages worth
 of
  information.
 
  -Original Message-
  From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
  On Behalf Of Daniel Gasienica
  Sent: Thursday, July 28, 2011 6:20 PM
  To: Neo4j user discussions
  Subject: Re: [Neo4j] Paged traversal REST API suggestion for improvement
 
  Sure but isn't it a huge waste of bandwidth if you load hundreds of
 results
  and the user only looks at the first dozen?
 
  On Thu, Jul 28, 2011 at 15:16, Rick Bullotta 
 rick.bullo...@thingworx.com
  wrote:
 
   BTW, paging is a relic of the dial-up modem days, IMNSHO.
  
   If a machine is the client of the REST API call, it should get all the
  data
   in a single, atomic call.  If it is a browser or mobile app, there's a
   natural limit to the # of items that a human will bother paging
 through,
   which is fairly small (20 - 500 typically), so again, it is painless
 to
  get
   all the data in a single call.
  
   -Original Message-
   From: user-boun...@lists.neo4j.org [mailto:
 user-boun...@lists.neo4j.org]
   On Behalf Of Rick Bullotta
   Sent: Thursday, July 28, 2011 6:11 PM
   To: Neo4j user discussions
   Subject: Re: [Neo4j] Paged traversal REST API suggestion for
 improvement
  
   If you don't keep state paging will not work properly if the data
  changes
   often.  What may have been record #21 when you are viewing the first
 page
  of
   20 result might not be record #21 when you go to fetch the 2nd page.
  
   If you're only concerned with pages of 20 or so, you should absolutely,
   positively do the paging on the browser.  Anything up to a couple
  thousand
   rows can *easily* be handled by any modern browser.  Keep the parsed
 JSON
   data on the client side and page it there.  This approach will be very
   performant on both the client and server, and won't require any
 state.
  
   -Original Message-
   From: user-boun...@lists.neo4j.org [mailto:
 user-boun...@lists.neo4j.org]
   On Behalf Of Aseem Kishore
   Sent: Thursday, July 28, 2011 3:01 PM
   To: Neo4j user discussions
   Subject: Re: [Neo4j] Paged traversal REST API suggestion for
 improvement
  
   Jim, thanks for the explanation. I understand your constraints, but
   thinking
   about it more, I'm actually even more baffled -- how can we actually
 make
   use of this paged traversal API in a web scenario?
  
   [neo4j db]  [web server]  [web client, e.g. browser]
  
   If I want to show the results of a search, let's say, in a way that
   supports
   paging, it just seems like I can't take advantage of the Neo4j API at
 all
   here.
  
   If the user wants to be able to refresh the page, or click Prev, the
   browser isn't keeping 

Re: [Neo4j] bdb-index

2011-07-28 Thread John cyuczieekc
Hi xD
I'm not clear what you need to store here, if I understand correctly you
could store in 2 primary bdb databases the nodeID (ie. long) of each node in
a relationship
ie.
key-value

dbForward:
A-B
A-C
X-D
X-B

dbBackward:
B-A
B-X
C-A
D-X

A,B,C,D,X are all nodeIDs ie. longs

this way you could check if A-B exists, or all of A's endNodes , or what
startNodes are pointing to the endNode B
the storing of these would be sorted and in BTree, lookup would be fast, so
you can consider ie. A as being a set of B and C, and X being a set of B and
D, (that is you cannot set the order as in a list, they are sorted by bdb
for fast retrievals). (But upon this, sets, can build lists np - that is
using only bdb; tho you won't need that using neo4j)
So, if this is the kind of index you wanted... (I am not aware of specific
indexes with bdb, though that doesn't mean they don't exist)

Insertions would require transaction protection so both A-B in dbForward
and B-A in dbBackward are inserted atomically. Parsing A then X of B-  in
dbBackward for example can only be done with a cursor...

Either way, I'm taking a look on that bdb-index thingy; will report back if
I have any ideas heh

John.

On Thu, Jul 28, 2011 at 9:42 PM, Niels Hoogeveen
pd_aficion...@hotmail.comwrote:


 Thank you, Peter,There is no rush here. It would be nice to investigate
 this option, but it can wait until Mattias has returned and sifted through
 urgent matters. The question is even, if it would be a good idea to use an
 index to do the book keeping for Enhanced API.As it is now, the Reification
 of eg. a Relationship, requires one property to be set on a relationship,
 containing the node ID of the associated node. On the associated node is a
 property containing the ID of the relationship, so there is a bidirectional
 look up. Introducing an index would remove the need to have these additional
 properties, but would lead to slower look-up times (no matter how fast the
 index).So it's a trade-off between speed and cleanliness of namespace. Using
 the Enhanced API disallows certain property names to be used in user
 applications.The property names used in Enhanced API all start with
 org.neo4j.collections.graphbd., so there is little chance a user
 application would want to use those property names, but it is a restriction
 not found in the standard API, so ultimately something to consider.Niels
  From: peter.neuba...@neotechnology.com
  Date: Thu, 28 Jul 2011 10:39:47 -0700
  To: user@lists.neo4j.org
  Subject: Re: [Neo4j] bdb-index
 
  niels,
  in this spike, I just concentrated on getting _something_ working in
  order to test insertion speed. This is not up to real indexing
  standards, so some love is needed here. I think Mattias is the best
  person to ask about pointers, let's wait until he is back next week if
  that is ok? Maybe some other (like the standard Lucene)  index can
  suffice for the time being to test out things?
 
  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 Thu, Jul 28, 2011 at 10:36 AM, Niels Hoogeveen
  pd_aficion...@hotmail.com wrote:
  
   Trying to find something useful to hide the implementation book keeping
 of Enhanced API, I tried out dbd-index as can be found here:
 https://github.com/peterneubauer/bdb-index
   It looks interesting, but fails its tests. When recovering it performs
 BerkeleyDbCommand#readCommand from the log. The retrieved indexName is not
 actually garbage. I would like to help make this component workable, but
 area of the database is a bit beyond the scope that I know.
   I know this is completely unsupported software, but can someone give me
 some pointers on how to fix this issue?
   Niels
   ___
   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] Composable traversals

2011-07-28 Thread John cyuczieekc
Hey Niels,
  As they are composable, is java going to keep track of things, like if
recursive, in stack ? or in array/variables ? or the graph could keep track
of what's beep parsed so far, in-graph ? (I mean, this question applies for
non-composable too; personally i like the idea of in-graph keeping track of
those but maybe that would be implemented later at a higher level, so I
guess for now it will be in array/variables)

Just making sure, in here:
 Node --FRIEND-- Node -- PARENT -- Node
FRIEND and PARENT are both relationship types?
they are thus not intermediary nodes acting like they are relationships?
(which is actually what I do with bdb where the only elemental thing is the
Node, rels cannot be addressed ie. by ID)

What happens while the traversers are executing and some other
thread/process is deleting something which the traverser added to to itself
as a valid node/path ? For example the first Node in Node --FRIEND-- Node
assuming that's where the traverser's currently at, is deleted...
Is there some notification/event or were they locked by traverser? or this
kind of issue will be dealt with later after traverser is implemented?
Are thee locks kept in-graph so they can be seen by other threads/processes
(mainly thinking processes that cannot access the same java resource ie. in
another jvm or computer tho accessing the same database - I guess this rules
out embedded?) ? if any locks...

On Fri, Jul 29, 2011 at 1:30 AM, Niels Hoogeveen
pd_aficion...@hotmail.comwrote:


 I'd like to take a stab at implementing traversals in the Enhanced API. One
 of the things I'd like to do, is to make traversals composable.

 Right now a Traverser is created by either calling the traverse method on
 Node, or to call the traverse(Node) method on TraversalDescription.

 This makes traversals inherently non-composable, so we can't define a
 single traversal that returns the parents of all our friends.

 To make Traversers composable we need a function:

 Traverser traverse(Traverser, TraversalDescription)

 My take on it is to make Element (which is a superinterface of Node) into a
 Traverser.

 Traverser is basically another name for IterablePath.

 Every Node (or more generally every Element) can be seen as an
 IterabePath, returning a single Path, which contains a single
 path-element, the Node/Element itself.

 Composing traversals would entail the concatenation of the paths returned
 with the paths supplied, so when we ask for the parents of all our friends,
 the returned paths would take the form:

 Node --FRIEND-- Node -- PARENT -- Node

 Niels

 ___
 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] bdb-index

2011-07-28 Thread John cyuczieekc
I forked and fixed, the tests are all working now:
https://github.com/13th-floor/bdb-index
Let me know if you want me to do a pull request, ... sadly I applied
formatting on RawBDBSpeed and the diff doesn't look pretty if you're trying
to see what changed

John.


On Thu, Jul 28, 2011 at 7:36 PM, Niels Hoogeveen
pd_aficion...@hotmail.comwrote:


 Trying to find something useful to hide the implementation book keeping of
 Enhanced API, I tried out dbd-index as can be found here:
 https://github.com/peterneubauer/bdb-index
 It looks interesting, but fails its tests. When recovering it performs
 BerkeleyDbCommand#readCommand from the log. The retrieved indexName is not
 actually garbage. I would like to help make this component workable, but
 area of the database is a bit beyond the scope that I know.
 I know this is completely unsupported software, but can someone give me
 some pointers on how to fix this issue?
 Niels
 ___
 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