Re: [Neo4j] REST API - always batch?

2011-12-01 Thread Dmytrii Nagirniak
Thanks Peter.

I was asking because of the request to support batching in neography:
https://github.com/maxdemarzi/neography/issues/16

I sounds like the normal API is obsolete then :)

It encourages non-transactional operations. I think the batch-ing should be 
promoted a little bit more.

Check the availability and place the reservation if something is still 
available is pretty hard to implement without it.
Not sure if batching supports conditional operations though. Does it?

Is there anything that would be impossible/slow etc to do with batching?
I mean, there must be some drawbacks :)

Cheers.

On 01/12/2011, at 6:08 PM, Peter Neubauer wrote:

 Dmytri,
 sounds like an interesting plan! I don't think there is anything
 directly that I can see, except a bug,
 https://github.com/neo4j/community/issues/113 with \\ which you
 might watch our for, reported by Josh Adell.
 
 Let us know how it works out!
 
 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
 
 brew install neo4j  neo4j start
 heroku addons:add neo4j
 
 
 
 On Thu, Dec 1, 2011 at 5:53 AM, Dmytrii Nagirniak dna...@gmail.com wrote:
 Hi,
 
 I wonder what the disadvantages would be if every request to the server 
 would always be a batch (even for simple GETs)?
 
 This would make it easier to use the API from the application.
 
 How bad is this idea?
 
 Cheers,
 Dima
 http://www.ApproachE.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

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


Re: [Neo4j] REST API - always batch?

2011-12-01 Thread Michael Hunger
I think especially for atomic create operations that will be solved by a GEOFF 
import plugin in the future.

which allows for updates/insertions of subgraphs.

https://github.com/nigelsmall/py2neo/wiki/GEOFF

Michael

Am 01.12.2011 um 09:03 schrieb Dmytrii Nagirniak:

 Thanks Peter.
 
 I was asking because of the request to support batching in neography:
 https://github.com/maxdemarzi/neography/issues/16
 
 I sounds like the normal API is obsolete then :)
 
 It encourages non-transactional operations. I think the batch-ing should be 
 promoted a little bit more.
 
 Check the availability and place the reservation if something is still 
 available is pretty hard to implement without it.
 Not sure if batching supports conditional operations though. Does it?
 
 Is there anything that would be impossible/slow etc to do with batching?
 I mean, there must be some drawbacks :)
 
 Cheers.
 
 On 01/12/2011, at 6:08 PM, Peter Neubauer wrote:
 
 Dmytri,
 sounds like an interesting plan! I don't think there is anything
 directly that I can see, except a bug,
 https://github.com/neo4j/community/issues/113 with \\ which you
 might watch our for, reported by Josh Adell.
 
 Let us know how it works out!
 
 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
 
 brew install neo4j  neo4j start
 heroku addons:add neo4j
 
 
 
 On Thu, Dec 1, 2011 at 5:53 AM, Dmytrii Nagirniak dna...@gmail.com wrote:
 Hi,
 
 I wonder what the disadvantages would be if every request to the server 
 would always be a batch (even for simple GETs)?
 
 This would make it easier to use the API from the application.
 
 How bad is this idea?
 
 Cheers,
 Dima
 http://www.ApproachE.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
 
 ___
 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] Named matched with depth gives error

2011-12-01 Thread Andres Taylor
On Wed, Nov 30, 2011 at 1:57 PM, dnagir dna...@gmail.com wrote:

 Hi,

 I am trying this query:

 *START u=node(5963) MATCH p = (u)-[r:selling*1..99]-() WHERE
 r.development=7867 RETURN p*

 But it gives the error: Error: *NoSuchElementException - key not found: r*

 When I remove the depth specification (*1..99) from the MATCH, it works as
 expected.


I fixed this 
yesterdayhttps://github.com/neo4j/community/commit/37c2867871c7d953c2021177d0b72cd8ba825be0.
Sorry you ran into it...

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


Re: [Neo4j] CQL find by name

2011-12-01 Thread Krzysztof Raczyński
In my opinion, the current syntax reminds me of SQL, which is a good
thing. All the newbies like me can easily wrap their head around the
concepts, without much problem. Since you can't do an actual
assignment in Cypher (please correct me if i am wrong), an equal sign
clearly means comparison only.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher Query Optimizing

2011-12-01 Thread Martin Junghanns
Am 01.12.2011 01:48, schrieb Michael Hunger:
 Martin,
Michael, :)

 would you be so kind as to test the current neo4j-1.6 snapshot with your 
 query?
I used neo4j 1.6 M01 community edition for my tests.

 We did some changes in cypher and would like to see how that affects your 
 query.

 Thanks a lot

 Michael
Greetings, Martin

 Am 30.11.2011 um 18:34 schrieb Martin Junghanns:

 @Tero @Krzysztof
 thx for your fast replies.

 @Krzysztof
 for me it was not fairly well known. I will also check out the
 traverser api.

 @Tero
 I tried the same query using the internal id instead of my mapping index
 (lucene)

 orig:
 START n=node:words(w_id = '137') MATCH n-[:CO_S]-m, n-[:CO_S]-  t,
 m-[r:CO_S]-  t return m.w_id, t.w_id, r.sig, r.freq
 took: 662ms (average of 100 runs after 10 warmups)

 new:
 START n=node(119) MATCH n-[:CO_S]-m, n-[:CO_S]-  t, m-[r:CO_S]-  t
 return m.w_id, t.w_id, r.sig, r.freq
 took: 644ms (average of 100 runs after 10 warmups)

 So it doesn't seem to be much more faster not using the index for node
 lookup.

 I will check out your posts concerning Lucene Index.

 Greetings, Martin

 Am 30.11.2011 18:08, schrieb Krzysztof Raczyński:
 It is fairly well known that cypher queries are not (yet) optimised.
 If speed is a concern for you, try using traversal API, i can confirm
 it is much faster than cypher.

 cheers
 ___
 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] CQL find by name

2011-12-01 Thread Michael Hunger
Actually they map to two different calls of the neo4j core API.

The first one is a exact lookup for the value.

The second one takes an arbitrary query string and executes it against an 
index, so it is much more powerful.
(But also dependend on the index-provider)

Main difference is that the query string has to be parsed by the index.
And around parameters, first one is better if you want to have the lookup 
variable fixed.

start node=node:index(key={param})
start node=node:index({param})

Cheers

Michael

Am 01.12.2011 um 03:56 schrieb yobi:

 I have seen both this:
 
 START root=node:node_auto_index(name = 'FileRoot')
 
 and this used:
 
 START root=node:node_auto_index('name: FileRoot')
 
 Isn't the second one more appropriate since the first one could be mixed up
 with an assignment and the second one looks more like a key:value pair. More
 simple to get and you don't have to change syntax style when you are using
 *.
 
 START root=node:node_auto_index('name: FileRoot*')
 
 Correct me if I am missing something.
 
 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/CQL-find-by-name-tp3550446p3550446.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


[Neo4j] spring data neo4j Relationships

2011-12-01 Thread Martin Junghanns
Hey,

after reading the docs and looking at the examples, I give up trying to 
find a solution for myself. The problem is the following: How are 
@RelationshipEntity classes persistet? I have the same stucture as in 
the Movies Example: the classes Actor -- Role -- Movie. When adding a 
new Role to an Actor and saving the Actor Entity using the 
ActorRepository, the new edges are not persisted in the database. Do I 
have to persist the Role Entities manually? If yes, what Repository 
shall I use for that?

this is part of my Actor class

 @GraphId
 private Long id;

 // 1:n relation
 @RelatedToVia
 CollectionTMS_Rel OpTmRs;
// 1:1 relation to store the latest link ... this works and the 
ede is persistet
 private TMS OpTmRs_Latest;


this is part of my Role class

 @GraphId
 Long id;

 @StartNode
 WTUR wturInstance;
 @EndNode
 TMS tmsInstance;

 long timestamp;

and finally this is the other end of the edge, my Movie class

 @GraphId
 private Long id;

 @RelatedTo(type = TMS_REL, direction = INCOMING)
 SetWTUR wturs;

 @RelatedToVia(type = TMS_REL, direction = INCOMING)
 IterableTMS_Rel tmsRels;

So, all single edges work perfectly, but the sets don't. Hope someone 
can help me out with that


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


Re: [Neo4j] spring data neo4j Relationships

2011-12-01 Thread Michael Hunger
Martin,

are you using the simple mapping (w/o AJ) or the advanced AspectJ mapping?

I assume the simple mapping:

There are several ways of persisting a RelationshipEntity()

* (template or repository).createRelationshipBetween()
* (template or repository).save(new Role(movie, actor, rolenName));
* node-entity with @Fetch @RelatedToVia SetRole roles=new HashSetRole();

actor = (template or repository).findOne(actorId); // or other loading 
mechanisms
actor.roles.add(new Role(movie, actor, rolenName));
(template or repository).save(actor)

if you are not using the first approach, you have to provide a RelationshipType 
for Role 
* as part of the @RelationshipEntity(type=TYPE) annotation
* or as a @RelationshipType String type; field

We can also have a skype call if you want to clarify things.

HTH,

Michael

Am 01.12.2011 um 12:49 schrieb Martin Junghanns:

 Hey,
 
 after reading the docs and looking at the examples, I give up trying to 
 find a solution for myself. The problem is the following: How are 
 @RelationshipEntity classes persistet? I have the same stucture as in 
 the Movies Example: the classes Actor -- Role -- Movie. When adding a 
 new Role to an Actor and saving the Actor Entity using the 
 ActorRepository, the new edges are not persisted in the database. Do I 
 have to persist the Role Entities manually? If yes, what Repository 
 shall I use for that?
 
 this is part of my Actor class
 
 @GraphId
 private Long id;
 
 // 1:n relation
 @RelatedToVia
 CollectionTMS_Rel OpTmRs;
// 1:1 relation to store the latest link ... this works and the 
 ede is persistet
 private TMS OpTmRs_Latest;
 
 
 this is part of my Role class
 
 @GraphId
 Long id;
 
 @StartNode
 WTUR wturInstance;
 @EndNode
 TMS tmsInstance;
 
 long timestamp;
 
 and finally this is the other end of the edge, my Movie class
 
 @GraphId
 private Long id;
 
 @RelatedTo(type = TMS_REL, direction = INCOMING)
 SetWTUR wturs;
 
 @RelatedToVia(type = TMS_REL, direction = INCOMING)
 IterableTMS_Rel tmsRels;
 
 So, all single edges work perfectly, but the sets don't. Hope someone 
 can help me out with that
 
 
 Greetings, Martin
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

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


Re: [Neo4j] REST API - always batch?

2011-12-01 Thread Jacob Hansson
On Thu, Dec 1, 2011 at 9:03 AM, Dmytrii Nagirniak dna...@gmail.com wrote:

 Thanks Peter.

 I was asking because of the request to support batching in neography:
 https://github.com/maxdemarzi/neography/issues/16

 I sounds like the normal API is obsolete then :)

 It encourages non-transactional operations. I think the batch-ing should
 be promoted a little bit more.

 Check the availability and place the reservation if something is still
 available is pretty hard to implement without it.
 Not sure if batching supports conditional operations though. Does it?

 Is there anything that would be impossible/slow etc to do with batching?
 I mean, there must be some drawbacks :)


There are a few reasons we aren't pushing the batch API as the primary way
to work with REST. One is that it's a bit more complex to get started with,
but the two primary reasons are these:

1. There are limits to how large the results can be from a batch API call.
The batch API supports streaming deserialization of it's input, but output
is still created as a giant string in memory. It is reasonably easy to hit
the limits of how large the batch API results can be when you start
batching requests.

2. We don't want it to be the primary API. We have lots of ideas for how we
can improve the current REST API (add full transactional support, massively
improve throughput and latency), and so we would rather go down that road.
The batch API is a pragmatic solution to a big problem, but I don't think
it is a good long-term path to take.

/jake

Cheers.

 On 01/12/2011, at 6:08 PM, Peter Neubauer wrote:

  Dmytri,
  sounds like an interesting plan! I don't think there is anything
  directly that I can see, except a bug,
  https://github.com/neo4j/community/issues/113 with \\ which you
  might watch our for, reported by Josh Adell.
 
  Let us know how it works out!
 
  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
 
  brew install neo4j  neo4j start
  heroku addons:add neo4j
 
 
 
  On Thu, Dec 1, 2011 at 5:53 AM, Dmytrii Nagirniak dna...@gmail.com
 wrote:
  Hi,
 
  I wonder what the disadvantages would be if every request to the server
 would always be a batch (even for simple GETs)?
 
  This would make it easier to use the API from the application.
 
  How bad is this idea?
 
  Cheers,
  Dima
  http://www.ApproachE.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

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




-- 
Jacob Hansson
Phone: +46 (0) 763503395
Twitter: @jakewins
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Will there ever be a native SDK for Node.js?

2011-12-01 Thread Tero Paananen
 With REST, you have a separate server. Thus multiple applications
 can use. Or you can access it directly through normal web browser
 to fix your data.
 Or even run background jobs against that server. All that is
 not possible with native.

I wouldn't say that. It's not possible using Neo4J APIs
directly, but with Spring Data for Neo4J and the rest of
the Spring framework (as an example) it's pretty damn
easy to provide remote access to a Neo4J data store.

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


Re: [Neo4j] Will there ever be a native SDK for Node.js?

2011-12-01 Thread Michael Hunger
Actually that is true with many technologies.

to provide a REST-Endpoint Neo4j-Servers you can use:

* jruby with sinatra/rails
* python
* as you said SDN
* playframework and scala
* clojure (and whatever rest-framework on top)
* or even pure netty based high performance servers
* or other java REST API's on top of the core-API

IMHO more important is the protocol between your frontend and the 
neo4j-rest-endpoints, those should speak domain language and protocol and not 
necessarily nodes and relationships :)

Cheers

Michael

Am 01.12.2011 um 13:34 schrieb Tero Paananen:

 With REST, you have a separate server. Thus multiple applications
 can use. Or you can access it directly through normal web browser
 to fix your data.
 Or even run background jobs against that server. All that is
 not possible with native.
 
 I wouldn't say that. It's not possible using Neo4J APIs
 directly, but with Spring Data for Neo4J and the rest of
 the Spring framework (as an example) it's pretty damn
 easy to provide remote access to a Neo4J data store.
 
   -TPP
 ___
 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] Will there ever be a native SDK for Node.js?

2011-12-01 Thread Rick Bullotta
Why not take a look at RingoJS?  Would be uber easy to integrate native Neo4J 
APIs.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of yobi
Sent: Wednesday, November 30, 2011 10:59 PM
To: user@lists.neo4j.org
Subject: [Neo4j] Will there ever be a native SDK for Node.js?

Have been reading through the Java documentation. Having a native SDK seems
to be a big win when interacting with Neo4j.

I wonder if you have any plans on making a native SDK for Node.js since apps
on Heroku could run on Node.js as well.

Thanks

Johnny

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Will-there-ever-be-a-native-SDK-for-Node-js-tp3550518p3550518.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] REST API - always batch?

2011-12-01 Thread jadell
To toss my two cents in, I had been thinking about moving my REST library to
use only batches for all CRUID operations.  I've been putting it off, and I
will probably drop the idea for now based on Jake's response.


Jacob Hansson-2 wrote
 
 1. There are limits to how large the results can be from a batch API
 call...
 
 2. ...We have lots of ideas for how we
 can improve the current REST API (add full transactional support,
 massively
 improve throughput and latency)...
 

Having real transactions via the REST API (a bit of an oxymoron?) would be
most welcome.

-- Josh

PS, has anyone else used the acronym CRUID (Create Read Update Index Delete)
to describe Neo4j operations? My other attempt was ICRUD but that sounds
like the stuff you rub out of your eyes when you wake up in the morning.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-API-always-batch-tp3550568p3551739.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] REST API - always batch?

2011-12-01 Thread Nigel Small
iCrud sounds more like what Apple fans will be asking for this Christmas.

On 1 Dec 2011 14:46, jadell josh.ad...@gmail.com wrote:

 To toss my two cents in, I had been thinking about moving my REST library
 to
 use only batches for all CRUID operations.  I've been putting it off, and I
 will probably drop the idea for now based on Jake's response.


 Jacob Hansson-2 wrote
 
  1. There are limits to how large the results can be from a batch API
  call...
 
  2. ...We have lots of ideas for how we
  can improve the current REST API (add full transactional support,
  massively
  improve throughput and latency)...
 

 Having real transactions via the REST API (a bit of an oxymoron?) would be
 most welcome.

 -- Josh

 PS, has anyone else used the acronym CRUID (Create Read Update Index
 Delete)
 to describe Neo4j operations? My other attempt was ICRUD but that sounds
 like the stuff you rub out of your eyes when you wake up in the morning.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-API-always-batch-tp3550568p3551739.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


[Neo4j] Cypher syntax for conditional path segments?

2011-12-01 Thread jschweigl
The query

works fine for all *complete* paths. Now I would like to get all incomplete
paths as well, meaning

all a without any BASED ON, all a-[:BASED_ON]-b without CALLS and so on.

Is this possible using cypher? Optional relationships result in null
relations, which cypher does not like when it binds to a path variable.

Best regards
Johann

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-syntax-for-conditional-path-segments-tp3551867p3551867.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] cypher question - subqueries possible?

2011-12-01 Thread jschweigl
Once I find the time to set up a blog, I'l happily do that.

What's still annoying me is that I do not understand the difference between
the query pairs 7/8 and 9/10 ... 

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/cypher-question-subqueries-possible-tp3543685p3551887.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] NullPointerException in ExecutingRestRequest

2011-12-01 Thread Frank
Hi Michael,

My curl result looks like this:

$ curl http://localhost:7474/db/data/ -i
HTTP/1.1 200 OK
Content-Length: 680
Content-Encoding: UTF-8
Content-Type: application/json
Access-Control-Allow-Origin: *
Server: Jetty(6.1.25)

{
  relationship_index : http://localhost:7474/db/data/index/relationship;,
  node : http://localhost:7474/db/data/node;,
  relationship_types : http://localhost:7474/db/data/relationship/types;,
  neo4j_version : 1.5,
  batch : http://localhost:7474/db/data/batch;,
  extensions_info : http://localhost:7474/db/data/ext;,
  node_index : http://localhost:7474/db/data/index/node;,
  extensions : {
CypherPlugin : {
  execute_query : 
http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query;
},
GremlinPlugin : {
  execute_script : 
http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script;
}
  }
}

I installed what I thought was the latest version of the server.

My Maven dependency tree is enourmous because the rest of my application uses a 
lot of things. I think this is the part you're interested in, though.

[INFO] +- 
org.springframework.data:spring-data-neo4j:jar:2.0.0.BUILD-SNAPSHOT:compile
[INFO] |  +- org.springframework:spring-beans:jar:3.0.6.RELEASE:compile
[INFO] |  +- org.springframework:spring-aspects:jar:3.0.6.RELEASE:compile
[INFO] |  +- 
org.springframework.data:spring-data-commons-core:jar:1.2.0.M2:compile
[INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile
[INFO] |  +- cglib:cglib:jar:2.2:compile
[INFO] |  +- org.neo4j:neo4j:jar:1.5:compile
[INFO] |  |  +- org.neo4j:neo4j-kernel:jar:1.5:compile
[INFO] |  |  |  \- 
org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
[INFO] |  |  +- org.neo4j:neo4j-lucene-index:jar:1.5:compile
[INFO] |  |  +- org.neo4j:neo4j-graph-algo:jar:1.5:compile
[INFO] |  |  +- org.neo4j:neo4j-udc:jar:1.5:compile
[INFO] |  |  +- org.neo4j:neo4j-graph-matching:jar:1.5:compile
[INFO] |  |  \- org.neo4j:neo4j-jmx:jar:1.5:compile
[INFO] |  +- org.neo4j:neo4j-cypher-dsl:jar:1.5:compile
[INFO] |  +- 
org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO] |  \- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] +- 
org.springframework.data:spring-data-neo4j-rest:jar:2.0.0.BUILD-SNAPSHOT:compile
[INFO] |  +- org.neo4j:neo4j-rest-graphdb:jar:1.5:compile
[INFO] |  |  \- org.neo4j:server-api:jar:1.5:compile
[INFO] |  | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] |  | \- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] |  |\- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
[INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.6.1:compile
[INFO] |  +- com.sun.jersey:jersey-server:jar:1.4:compile
[INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.4:compile
[INFO] |  \- com.sun.jersey:jersey-client:jar:1.4:compile



On Nov 30, 2011, at 8:37 PM, Michael Hunger [via Neo4j Community Discussions] 
wrote:

 Frank, 
 
 sorry to hear that. 
 
 I just tried it and it works as expected. 
 
 final SpringRestGraphDatabase gdb = new 
 SpringRestGraphDatabase(http://localhost:7474/db/data/;); 
 final Node node = gdb.getReferenceNode(); 
 assertEquals(0,node.getId()); 
 
 What version of the Neo4j-Server are you using? Could you please also show 
 the output of mvn dependency:tree ? 
 
 Thanks a lot 
 
 Michael 
 
 if you execute it via curl, what are the results? 
 
 ynagzet:spring-data-neo4j mh$ curl http://localhost:7474/db/data/ -i 
 HTTP/1.1 200 OK 
 Content-Length: 620 
 Content-Encoding: UTF-8 
 Content-Type: application/json 
 Access-Control-Allow-Origin: * 
 Server: Jetty(6.1.25) 
 
 { 
   relationship_index : http://localhost:7474/db/data/index/relationship;, 
   node : http://localhost:7474/db/data/node;, 
   relationship_types : http://localhost:7474/db/data/relationship/types;, 
   neo4j_version : 1.6.M01, 
   batch : http://localhost:7474/db/data/batch;, 
   extensions_info : http://localhost:7474/db/data/ext;, 
   node_index : http://localhost:7474/db/data/index/node;, 
   reference_node : http://localhost:7474/db/data/node/0;, 
   extensions : { 
 GremlinPlugin : { 
   execute_script : 
 http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script; 
 } 
   } 
 }ynagzet:spring-data-neo4j mh$ curl http://localhost:7474/db/data -i 
 HTTP/1.1 302 Found 
 Location: http://localhost:7474/db/data/
 Content-Length: 0 
 Server: Jetty(6.1.25) 
 
 
 Am 01.12.2011 um 00:19 schrieb Frank: 
 
  The server is running on localhost and can be hit from a browser. The 
  server's configuration was modified to allow requests from any IP address, 
  although all of my attempts are from the localhost anyway. 
  
  I've tried this with and without a trailing slash on the URI, no 
  difference. 
  
  Code: 
  
  GraphDatabase graphDb = new 
  SpringRestGraphDatabase(http://localhost:7474/db/data;); 
  graphDb.getReferenceNode(); 
  
  Result: 
  
  java.lang.NullPointerException 
 

Re: [Neo4j] cypher question - subqueries possible?

2011-12-01 Thread Andres Taylor
On Thu, Dec 1, 2011 at 4:55 PM, jschweigl johann.schwe...@gmail.com wrote:

 Once I find the time to set up a blog, I'l happily do that.

 What's still annoying me is that I do not understand the difference between
 the query pairs 7/8 and 9/10 ...


I'll have a go.

The difference between 7 and 8 is which relationship is optional
7:  scenario-[:HAS_MOCKUP]-mock-[r?:HAS_MOCKUP]-sub
8:  scenario-[r?:HAS_MOCKUP]-mock-[:HAS_MOCKUP]-sub
(I've rewritten the second match to better show the difference.)

Both *scenario* and *sub* are bound, so only the relationship marked with *r
* is optional.

Now, if we're looking at a *scenario* that has no *mock*s connected to it,
no subgraphs will match with query number 7, but with query 8 you can still
get matches. I hope this makes sense. Let me know if it doesn't.

Query 10 I'm assuming has a typo in it. You bind an identifier named *sub*,
but in the match, you use *subprocess*.
Here are the interesting parts of queries 9 and 10. I've reworked the match
of query 10 to make the difference more notable, and I've fixed what I
think is a typo:
9: MATCH sub-[:HAS_MOCKUP]-mock-[:HAS_MOCKUP]-scenario
10: MATCH sub-[:HAS_MOCKUP]-mock-[r?:HAS_MOCKUP]-scenario
WHERE r IS NULL

This makes the difference much clearer - query 9 will return all *sub* and *
scenario* combinations connected over a mock, and query 10 will return all
combinations* *not connected.

Hope this helps.

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


Re: [Neo4j] NullPointerException in ExecutingRestRequest

2011-12-01 Thread Frank
I tried switching to version 1.6 (Current Milestone) and now it works.

Am I correct in concluding that the restful client services are not compatible 
with version 1.5?

As version 1.5 is listed as the current stable version, I'm a little 
suprised/concerned by this.

Frank

On Nov 30, 2011, at 8:37 PM, Michael Hunger [via Neo4j Community Discussions] 
wrote:

 Frank, 
 
 sorry to hear that. 
 
 I just tried it and it works as expected. 
 
 final SpringRestGraphDatabase gdb = new 
 SpringRestGraphDatabase(http://localhost:7474/db/data/;); 
 final Node node = gdb.getReferenceNode(); 
 assertEquals(0,node.getId()); 
 
 What version of the Neo4j-Server are you using? Could you please also show 
 the output of mvn dependency:tree ? 
 
 Thanks a lot 
 
 Michael 
 
 if you execute it via curl, what are the results? 
 
 ynagzet:spring-data-neo4j mh$ curl http://localhost:7474/db/data/ -i 
 HTTP/1.1 200 OK 
 Content-Length: 620 
 Content-Encoding: UTF-8 
 Content-Type: application/json 
 Access-Control-Allow-Origin: * 
 Server: Jetty(6.1.25) 
 
 { 
   relationship_index : http://localhost:7474/db/data/index/relationship;, 
   node : http://localhost:7474/db/data/node;, 
   relationship_types : http://localhost:7474/db/data/relationship/types;, 
   neo4j_version : 1.6.M01, 
   batch : http://localhost:7474/db/data/batch;, 
   extensions_info : http://localhost:7474/db/data/ext;, 
   node_index : http://localhost:7474/db/data/index/node;, 
   reference_node : http://localhost:7474/db/data/node/0;, 
   extensions : { 
 GremlinPlugin : { 
   execute_script : 
 http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script; 
 } 
   } 
 }ynagzet:spring-data-neo4j mh$ curl http://localhost:7474/db/data -i 
 HTTP/1.1 302 Found 
 Location: http://localhost:7474/db/data/
 Content-Length: 0 
 Server: Jetty(6.1.25) 
 
 
 Am 01.12.2011 um 00:19 schrieb Frank: 
 
  The server is running on localhost and can be hit from a browser. The 
  server's configuration was modified to allow requests from any IP address, 
  although all of my attempts are from the localhost anyway. 
  
  I've tried this with and without a trailing slash on the URI, no 
  difference. 
  
  Code: 
  
  GraphDatabase graphDb = new 
  SpringRestGraphDatabase(http://localhost:7474/db/data;); 
  graphDb.getReferenceNode(); 
  
  Result: 
  
  java.lang.NullPointerException 
  at 
  org.neo4j.rest.graphdb.ExecutingRestRequest.uriWithoutSlash(ExecutingRestRequest.java:78)
   
  at 
  org.neo4j.rest.graphdb.ExecutingRestRequest.init(ExecutingRestRequest.java:72)
   
  at 
  org.neo4j.rest.graphdb.ExecutingRestRequest.with(ExecutingRestRequest.java:149)
   
  at org.neo4j.rest.graphdb.entity.RestEntity.init(RestEntity.java:52) 
  at org.neo4j.rest.graphdb.entity.RestNode.init(RestNode.java:47) 
  at org.neo4j.rest.graphdb.RestAPI.getReferenceNode(RestAPI.java:168) 
  at 
  org.neo4j.rest.graphdb.RestGraphDatabase.getReferenceNode(RestGraphDatabase.java:71)
   
  at neo4j.Populate.init(Populate.java:35) 
  at neo4j.Populate.main(Populate.java:18) 
  
  
  -- 
  View this message in context: 
  http://neo4j-community-discussions.438527.n3.nabble.com/NullPointerException-in-ExecutingRestRequest-tp3550067p3550067.html
  Sent from the Neo4j Community Discussions mailing list archive at 
  Nabble.com. 
  ___ 
  Neo4j mailing list 
  [hidden email] 
  https://lists.neo4j.org/mailman/listinfo/user
 
 ___ 
 Neo4j mailing list 
 [hidden email] 
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 If you reply to this email, your message will be added to the discussion 
 below:
 http://neo4j-community-discussions.438527.n3.nabble.com/NullPointerException-in-ExecutingRestRequest-tp3550067p3550419.html
 To unsubscribe from NullPointerException in ExecutingRestRequest, click here.
 NAML



--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/NullPointerException-in-ExecutingRestRequest-tp3550067p3552186.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] NullPointerException in ExecutingRestRequest

2011-12-01 Thread Michael Hunger
Hi Frank,

this is really weird. Your server is missing the exploratory URL for the 
reference node.
The (Spring)RestGraphDatabaseService uses this URL to get the URL for the 
ReferenceNode.

I don't know why your sever is missing that. 

I just downloaded 1.5 community for unix and started the server, it reports the 
reference_node url as expected:

ynagzet:neo4j-community-1.5 mh$ curl http://localhost:7474/db/data/
{
  relationship_index : http://localhost:7474/db/data/index/relationship;,
  node : http://localhost:7474/db/data/node;,
  relationship_types : http://localhost:7474/db/data/relationship/types;,
  neo4j_version : 1.5,
  batch : http://localhost:7474/db/data/batch;,
  extensions_info : http://localhost:7474/db/data/ext;,
  node_index : http://localhost:7474/db/data/index/node;,
  reference_node : http://localhost:7474/db/data/node/0;,
  extensions : {
CypherPlugin : {
  execute_query : 
http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query;
},
GremlinPlugin : {
  execute_script : 
http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script;
}
  }
}

Am 01.12.2011 um 17:53 schrieb Frank:

 Hi Michael,
 
 My curl result looks like this:
 
 $ curl http://localhost:7474/db/data/ -i
 HTTP/1.1 200 OK
 Content-Length: 680
 Content-Encoding: UTF-8
 Content-Type: application/json
 Access-Control-Allow-Origin: *
 Server: Jetty(6.1.25)
 
 {
  relationship_index : http://localhost:7474/db/data/index/relationship;,
  node : http://localhost:7474/db/data/node;,
  relationship_types : http://localhost:7474/db/data/relationship/types;,
  neo4j_version : 1.5,
  batch : http://localhost:7474/db/data/batch;,
  extensions_info : http://localhost:7474/db/data/ext;,
  node_index : http://localhost:7474/db/data/index/node;,
  extensions : {
CypherPlugin : {
  execute_query : 
 http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query;
},
GremlinPlugin : {
  execute_script : 
 http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script;
}
  }
 }
 
 I installed what I thought was the latest version of the server.
 
 My Maven dependency tree is enourmous because the rest of my application uses 
 a lot of things. I think this is the part you're interested in, though.
 
 [INFO] +- 
 org.springframework.data:spring-data-neo4j:jar:2.0.0.BUILD-SNAPSHOT:compile
 [INFO] |  +- org.springframework:spring-beans:jar:3.0.6.RELEASE:compile
 [INFO] |  +- org.springframework:spring-aspects:jar:3.0.6.RELEASE:compile
 [INFO] |  +- 
 org.springframework.data:spring-data-commons-core:jar:1.2.0.M2:compile
 [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile
 [INFO] |  +- cglib:cglib:jar:2.2:compile
 [INFO] |  +- org.neo4j:neo4j:jar:1.5:compile
 [INFO] |  |  +- org.neo4j:neo4j-kernel:jar:1.5:compile
 [INFO] |  |  |  \- 
 org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile
 [INFO] |  |  +- org.neo4j:neo4j-lucene-index:jar:1.5:compile
 [INFO] |  |  +- org.neo4j:neo4j-graph-algo:jar:1.5:compile
 [INFO] |  |  +- org.neo4j:neo4j-udc:jar:1.5:compile
 [INFO] |  |  +- org.neo4j:neo4j-graph-matching:jar:1.5:compile
 [INFO] |  |  \- org.neo4j:neo4j-jmx:jar:1.5:compile
 [INFO] |  +- org.neo4j:neo4j-cypher-dsl:jar:1.5:compile
 [INFO] |  +- 
 org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
 [INFO] |  \- javax.validation:validation-api:jar:1.0.0.GA:compile
 [INFO] +- 
 org.springframework.data:spring-data-neo4j-rest:jar:2.0.0.BUILD-SNAPSHOT:compile
 [INFO] |  +- org.neo4j:neo4j-rest-graphdb:jar:1.5:compile
 [INFO] |  |  \- org.neo4j:server-api:jar:1.5:compile
 [INFO] |  | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
 [INFO] |  | \- commons-configuration:commons-configuration:jar:1.6:compile
 [INFO] |  |\- 
 commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
 [INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.6.1:compile
 [INFO] |  +- com.sun.jersey:jersey-server:jar:1.4:compile
 [INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.4:compile
 [INFO] |  \- com.sun.jersey:jersey-client:jar:1.4:compile
 
 
 
 On Nov 30, 2011, at 8:37 PM, Michael Hunger [via Neo4j Community Discussions] 
 wrote:
 
 Frank, 
 
 sorry to hear that. 
 
 I just tried it and it works as expected. 
 
final SpringRestGraphDatabase gdb = new 
 SpringRestGraphDatabase(http://localhost:7474/db/data/;); 
final Node node = gdb.getReferenceNode(); 
assertEquals(0,node.getId()); 
 
 What version of the Neo4j-Server are you using? Could you please also show 
 the output of mvn dependency:tree ? 
 
 Thanks a lot 
 
 Michael 
 
 if you execute it via curl, what are the results? 
 
 ynagzet:spring-data-neo4j mh$ curl http://localhost:7474/db/data/ -i 
 HTTP/1.1 200 OK 
 Content-Length: 620 
 Content-Encoding: UTF-8 
 Content-Type: application/json 
 Access-Control-Allow-Origin: * 
 Server: Jetty(6.1.25) 
 
 { 
  relationship_index : http://localhost:7474/db/data/index/relationship;, 
  node : 

Re: [Neo4j] NullPointerException in ExecutingRestRequest

2011-12-01 Thread Frank
Interesting. I did create and delete a few nodes manually via the Web interface 
right when I first installed the server. Maybe there's some bug related to 
that. In any case, it seems to be working now that I reinstalled the server 
with 1.6.

On Dec 1, 2011, at 12:12 PM, Michael Hunger [via Neo4j Community Discussions] 
wrote:

 Hi Frank, 
 
 this is really weird. Your server is missing the exploratory URL for the 
 reference node. 
 The (Spring)RestGraphDatabaseService uses this URL to get the URL for the 
 ReferenceNode. 
 
 I don't know why your sever is missing that. 
 
 I just downloaded 1.5 community for unix and started the server, it reports 
 the reference_node url as expected: 
 
 ynagzet:neo4j-community-1.5 mh$ curl http://localhost:7474/db/data/
 { 
   relationship_index : http://localhost:7474/db/data/index/relationship;, 
   node : http://localhost:7474/db/data/node;, 
   relationship_types : http://localhost:7474/db/data/relationship/types;, 
   neo4j_version : 1.5, 
   batch : http://localhost:7474/db/data/batch;, 
   extensions_info : http://localhost:7474/db/data/ext;, 
   node_index : http://localhost:7474/db/data/index/node;, 
   reference_node : http://localhost:7474/db/data/node/0;, 
   extensions : { 
 CypherPlugin : { 
   execute_query : 
 http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query; 
 }, 
 GremlinPlugin : { 
   execute_script : 
 http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script; 
 } 
   } 
 } 
 
 Am 01.12.2011 um 17:53 schrieb Frank: 
 
  Hi Michael, 
  
  My curl result looks like this: 
  
  $ curl http://localhost:7474/db/data/ -i 
  HTTP/1.1 200 OK 
  Content-Length: 680 
  Content-Encoding: UTF-8 
  Content-Type: application/json 
  Access-Control-Allow-Origin: * 
  Server: Jetty(6.1.25) 
  
  { 
   relationship_index : http://localhost:7474/db/data/index/relationship;, 
   node : http://localhost:7474/db/data/node;, 
   relationship_types : http://localhost:7474/db/data/relationship/types;, 
   neo4j_version : 1.5, 
   batch : http://localhost:7474/db/data/batch;, 
   extensions_info : http://localhost:7474/db/data/ext;, 
   node_index : http://localhost:7474/db/data/index/node;, 
   extensions : { 
 CypherPlugin : { 
   execute_query : 
  http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query; 
 }, 
 GremlinPlugin : { 
   execute_script : 
  http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script; 
 } 
   } 
  } 
  
  I installed what I thought was the latest version of the server. 
  
  My Maven dependency tree is enourmous because the rest of my application 
  uses a lot of things. I think this is the part you're interested in, 
  though. 
  
  [INFO] +- 
  org.springframework.data:spring-data-neo4j:jar:2.0.0.BUILD-SNAPSHOT:compile 
  [INFO] |  +- org.springframework:spring-beans:jar:3.0.6.RELEASE:compile 
  [INFO] |  +- org.springframework:spring-aspects:jar:3.0.6.RELEASE:compile 
  [INFO] |  +- 
  org.springframework.data:spring-data-commons-core:jar:1.2.0.M2:compile 
  [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile 
  [INFO] |  +- cglib:cglib:jar:2.2:compile 
  [INFO] |  +- org.neo4j:neo4j:jar:1.5:compile 
  [INFO] |  |  +- org.neo4j:neo4j-kernel:jar:1.5:compile 
  [INFO] |  |  |  \- 
  org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile 
  [INFO] |  |  +- org.neo4j:neo4j-lucene-index:jar:1.5:compile 
  [INFO] |  |  +- org.neo4j:neo4j-graph-algo:jar:1.5:compile 
  [INFO] |  |  +- org.neo4j:neo4j-udc:jar:1.5:compile 
  [INFO] |  |  +- org.neo4j:neo4j-graph-matching:jar:1.5:compile 
  [INFO] |  |  \- org.neo4j:neo4j-jmx:jar:1.5:compile 
  [INFO] |  +- org.neo4j:neo4j-cypher-dsl:jar:1.5:compile 
  [INFO] |  +- 
  org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
   
  [INFO] |  \- javax.validation:validation-api:jar:1.0.0.GA:compile 
  [INFO] +- 
  org.springframework.data:spring-data-neo4j-rest:jar:2.0.0.BUILD-SNAPSHOT:compile
   
  [INFO] |  +- org.neo4j:neo4j-rest-graphdb:jar:1.5:compile 
  [INFO] |  |  \- org.neo4j:server-api:jar:1.5:compile 
  [INFO] |  | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile 
  [INFO] |  | \- 
  commons-configuration:commons-configuration:jar:1.6:compile 
  [INFO] |  |\- 
  commons-beanutils:commons-beanutils-core:jar:1.8.0:compile 
  [INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.6.1:compile 
  [INFO] |  +- com.sun.jersey:jersey-server:jar:1.4:compile 
  [INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.4:compile 
  [INFO] |  \- com.sun.jersey:jersey-client:jar:1.4:compile 
  
  
  
  On Nov 30, 2011, at 8:37 PM, Michael Hunger [via Neo4j Community 
  Discussions] wrote: 
  
  Frank, 
  
  sorry to hear that. 
  
  I just tried it and it works as expected. 
  
 final SpringRestGraphDatabase gdb = new 
  SpringRestGraphDatabase(http://localhost:7474/db/data/;);  
 final Node node = gdb.getReferenceNode(); 
 

Re: [Neo4j] NullPointerException in ExecutingRestRequest

2011-12-01 Thread Michael Hunger
Did you by chance delete the reference node too? (aka. node 0) 

I tried it and it seems to be the reason.

After deleting the reference node it is no longer shown in the graph 
representation.

I will add an appropriate Exception to java-rest-graphdb

Cheers,

Michael

Am 01.12.2011 um 19:20 schrieb Frank:

 Interesting. I did create and delete a few nodes manually via the Web 
 interface right when I first installed the server. Maybe there's some bug 
 related to that. In any case, it seems to be working now that I reinstalled 
 the server with 1.6.
 
 On Dec 1, 2011, at 12:12 PM, Michael Hunger [via Neo4j Community Discussions] 
 wrote:
 
 Hi Frank, 
 
 this is really weird. Your server is missing the exploratory URL for the 
 reference node. 
 The (Spring)RestGraphDatabaseService uses this URL to get the URL for the 
 ReferenceNode. 
 
 I don't know why your sever is missing that. 
 
 I just downloaded 1.5 community for unix and started the server, it reports 
 the reference_node url as expected: 
 
 ynagzet:neo4j-community-1.5 mh$ curl http://localhost:7474/db/data/
 { 
  relationship_index : http://localhost:7474/db/data/index/relationship;, 
  node : http://localhost:7474/db/data/node;, 
  relationship_types : http://localhost:7474/db/data/relationship/types;, 
  neo4j_version : 1.5, 
  batch : http://localhost:7474/db/data/batch;, 
  extensions_info : http://localhost:7474/db/data/ext;, 
  node_index : http://localhost:7474/db/data/index/node;, 
  reference_node : http://localhost:7474/db/data/node/0;, 
  extensions : { 
CypherPlugin : { 
  execute_query : 
 http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query; 
}, 
GremlinPlugin : { 
  execute_script : 
 http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script; 
} 
  } 
 } 
 
 Am 01.12.2011 um 17:53 schrieb Frank: 
 
 Hi Michael, 
 
 My curl result looks like this: 
 
 $ curl http://localhost:7474/db/data/ -i 
 HTTP/1.1 200 OK 
 Content-Length: 680 
 Content-Encoding: UTF-8 
 Content-Type: application/json 
 Access-Control-Allow-Origin: * 
 Server: Jetty(6.1.25) 
 
 { 
 relationship_index : http://localhost:7474/db/data/index/relationship;, 
 node : http://localhost:7474/db/data/node;, 
 relationship_types : http://localhost:7474/db/data/relationship/types;, 
 neo4j_version : 1.5, 
 batch : http://localhost:7474/db/data/batch;, 
 extensions_info : http://localhost:7474/db/data/ext;, 
 node_index : http://localhost:7474/db/data/index/node;, 
 extensions : { 
   CypherPlugin : { 
 execute_query : 
 http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query; 
   }, 
   GremlinPlugin : { 
 execute_script : 
 http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script; 
   } 
 } 
 } 
 
 I installed what I thought was the latest version of the server. 
 
 My Maven dependency tree is enourmous because the rest of my application 
 uses a lot of things. I think this is the part you're interested in, 
 though. 
 
 [INFO] +- 
 org.springframework.data:spring-data-neo4j:jar:2.0.0.BUILD-SNAPSHOT:compile 
 [INFO] |  +- org.springframework:spring-beans:jar:3.0.6.RELEASE:compile 
 [INFO] |  +- org.springframework:spring-aspects:jar:3.0.6.RELEASE:compile 
 [INFO] |  +- 
 org.springframework.data:spring-data-commons-core:jar:1.2.0.M2:compile 
 [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile 
 [INFO] |  +- cglib:cglib:jar:2.2:compile 
 [INFO] |  +- org.neo4j:neo4j:jar:1.5:compile 
 [INFO] |  |  +- org.neo4j:neo4j-kernel:jar:1.5:compile 
 [INFO] |  |  |  \- 
 org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile 
 [INFO] |  |  +- org.neo4j:neo4j-lucene-index:jar:1.5:compile 
 [INFO] |  |  +- org.neo4j:neo4j-graph-algo:jar:1.5:compile 
 [INFO] |  |  +- org.neo4j:neo4j-udc:jar:1.5:compile 
 [INFO] |  |  +- org.neo4j:neo4j-graph-matching:jar:1.5:compile 
 [INFO] |  |  \- org.neo4j:neo4j-jmx:jar:1.5:compile 
 [INFO] |  +- org.neo4j:neo4j-cypher-dsl:jar:1.5:compile 
 [INFO] |  +- 
 org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
  
 [INFO] |  \- javax.validation:validation-api:jar:1.0.0.GA:compile 
 [INFO] +- 
 org.springframework.data:spring-data-neo4j-rest:jar:2.0.0.BUILD-SNAPSHOT:compile
  
 [INFO] |  +- org.neo4j:neo4j-rest-graphdb:jar:1.5:compile 
 [INFO] |  |  \- org.neo4j:server-api:jar:1.5:compile 
 [INFO] |  | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile 
 [INFO] |  | \- 
 commons-configuration:commons-configuration:jar:1.6:compile 
 [INFO] |  |\- 
 commons-beanutils:commons-beanutils-core:jar:1.8.0:compile 
 [INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.6.1:compile 
 [INFO] |  +- com.sun.jersey:jersey-server:jar:1.4:compile 
 [INFO] |  |  \- com.sun.jersey:jersey-core:jar:1.4:compile 
 [INFO] |  \- com.sun.jersey:jersey-client:jar:1.4:compile 
 
 
 
 On Nov 30, 2011, at 8:37 PM, Michael Hunger [via Neo4j Community 
 Discussions] wrote: 
 
 Frank, 
 
 sorry to hear that. 
 
 I just tried it and it works as 

Re: [Neo4j] NullPointerException in ExecutingRestRequest

2011-12-01 Thread Frank
I may well have done that, yes. I wasn't aware that node 0 was the same as the 
reference node.

On Dec 1, 2011, at 12:44 PM, Michael Hunger [via Neo4j Community Discussions] 
wrote:

 Did you by chance delete the reference node too? (aka. node 0) 
 
 I tried it and it seems to be the reason. 
 
 After deleting the reference node it is no longer shown in the graph 
 representation. 
 
 I will add an appropriate Exception to java-rest-graphdb 
 
 Cheers, 
 
 Michael 
 
 Am 01.12.2011 um 19:20 schrieb Frank: 
 
  Interesting. I did create and delete a few nodes manually via the Web 
  interface right when I first installed the server. Maybe there's some bug 
  related to that. In any case, it seems to be working now that I reinstalled 
  the server with 1.6. 
  
  On Dec 1, 2011, at 12:12 PM, Michael Hunger [via Neo4j Community 
  Discussions] wrote: 
  
  Hi Frank, 
  
  this is really weird. Your server is missing the exploratory URL for the 
  reference node. 
  The (Spring)RestGraphDatabaseService uses this URL to get the URL for the 
  ReferenceNode. 
  
  I don't know why your sever is missing that. 
  
  I just downloaded 1.5 community for unix and started the server, it 
  reports the reference_node url as expected: 
  
  ynagzet:neo4j-community-1.5 mh$ curl http://localhost:7474/db/data/
  { 
   relationship_index : 
  http://localhost:7474/db/data/index/relationship;, 
   node : http://localhost:7474/db/data/node;, 
   relationship_types : 
  http://localhost:7474/db/data/relationship/types;, 
   neo4j_version : 1.5, 
   batch : http://localhost:7474/db/data/batch;, 
   extensions_info : http://localhost:7474/db/data/ext;, 
   node_index : http://localhost:7474/db/data/index/node;, 
   reference_node : http://localhost:7474/db/data/node/0;, 
   extensions : { 
 CypherPlugin : { 
   execute_query : 
  http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query; 
 }, 
 GremlinPlugin : { 
   execute_script : 
  http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script; 
 } 
   } 
  } 
  
  Am 01.12.2011 um 17:53 schrieb Frank: 
  
  Hi Michael, 
  
  My curl result looks like this: 
  
  $ curl http://localhost:7474/db/data/ -i 
  HTTP/1.1 200 OK 
  Content-Length: 680 
  Content-Encoding: UTF-8 
  Content-Type: application/json 
  Access-Control-Allow-Origin: * 
  Server: Jetty(6.1.25) 
  
  { 
  relationship_index : 
  http://localhost:7474/db/data/index/relationship;, 
  node : http://localhost:7474/db/data/node;, 
  relationship_types : 
  http://localhost:7474/db/data/relationship/types;, 
  neo4j_version : 1.5, 
  batch : http://localhost:7474/db/data/batch;, 
  extensions_info : http://localhost:7474/db/data/ext;, 
  node_index : http://localhost:7474/db/data/index/node;, 
  extensions : { 
CypherPlugin : { 
  execute_query : 
  http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query; 
}, 
GremlinPlugin : { 
  execute_script : 
  http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script; 
} 
  } 
  } 
  
  I installed what I thought was the latest version of the server. 
  
  My Maven dependency tree is enourmous because the rest of my application 
  uses a lot of things. I think this is the part you're interested in, 
  though. 
  
  [INFO] +- 
  org.springframework.data:spring-data-neo4j:jar:2.0.0.BUILD-SNAPSHOT:compile
   
  [INFO] |  +- org.springframework:spring-beans:jar:3.0.6.RELEASE:compile 
  [INFO] |  +- org.springframework:spring-aspects:jar:3.0.6.RELEASE:compile 
  [INFO] |  +- 
  org.springframework.data:spring-data-commons-core:jar:1.2.0.M2:compile 
  [INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile 
  [INFO] |  +- cglib:cglib:jar:2.2:compile 
  [INFO] |  +- org.neo4j:neo4j:jar:1.5:compile 
  [INFO] |  |  +- org.neo4j:neo4j-kernel:jar:1.5:compile 
  [INFO] |  |  |  \- 
  org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile 
  [INFO] |  |  +- org.neo4j:neo4j-lucene-index:jar:1.5:compile 
  [INFO] |  |  +- org.neo4j:neo4j-graph-algo:jar:1.5:compile 
  [INFO] |  |  +- org.neo4j:neo4j-udc:jar:1.5:compile 
  [INFO] |  |  +- org.neo4j:neo4j-graph-matching:jar:1.5:compile 
  [INFO] |  |  \- org.neo4j:neo4j-jmx:jar:1.5:compile 
  [INFO] |  +- org.neo4j:neo4j-cypher-dsl:jar:1.5:compile 
  [INFO] |  +- 
  org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
   
  [INFO] |  \- javax.validation:validation-api:jar:1.0.0.GA:compile 
  [INFO] +- 
  org.springframework.data:spring-data-neo4j-rest:jar:2.0.0.BUILD-SNAPSHOT:compile
   
  [INFO] |  +- org.neo4j:neo4j-rest-graphdb:jar:1.5:compile 
  [INFO] |  |  \- org.neo4j:server-api:jar:1.5:compile 
  [INFO] |  | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile 
  [INFO] |  | \- 
  commons-configuration:commons-configuration:jar:1.6:compile 
  [INFO] |  |\- 
  commons-beanutils:commons-beanutils-core:jar:1.8.0:compile 
  [INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.6.1:compile 
  [INFO] |  

[Neo4j] SpringData requires rename of transactionManager

2011-12-01 Thread Frank
Hi,

I find that I'm unable to integrate SpringDataNeo4j into my existing Spring
project unless I rename my transaction manager, which is currently declared
this way:

bean id=transactionManager
class=org.springframework.jdbc.datasource.DataSourceTransactionManager
property name=dataSource ref=sbDataSource /
/bean

bean id=transactionTemplate
class=org.springframework.transaction.support.TransactionTemplate
property name=transactionManager ref=transactionManager /
/bean

tx:annotation-driven transaction-manager=transactionManager /

Unless I rename the first bean to something other than transactionManager,
my own Spring beans fail to load. I'm somewhat hesitant to do this because
I'm working in a large project with multiple developers and I don't know the
full impact of renaming this bean. Is there any other way around the
problem? Can I be certain that neo4j will not interfere with my existing
JDBC transactions?

I'm also a bit curious/confused as to where the neo4j transactionManager
bean is coming from. I did not declare any such bean in my Spring
configuration files. All I declared was this:

neo4j:config graphDatabaseService=graphDatabaseService/

bean id=graphDatabaseService
class=org.springframework.data.neo4j.rest.SpringRestGraphDatabase
constructor-arg value=http://localhost:7474/db/data//
/bean

Finally, I'm wondering why I shouldn't just instantiate a
SpringRestGraphDatabase object programatically instead of as a Spring bean.
Is there any particular disadvantage to doing it programatically beyond the
benefits of having Spring manage the lifecycle?

Thanks for your help.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/SpringData-requires-rename-of-transactionManager-tp3552635p3552635.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] allSimplePaths performance

2011-12-01 Thread Petar Dobrev
Sure, I sent you a link where you can download a snapshot of the dataset in
a separate email.

Best regards,
Petar

On Mon, Nov 28, 2011 at 12:16 PM, Mattias Persson matt...@neotechnology.com
 wrote:

 I think I'd need your dataset to be able to reproduce and fix it, would
 that be possible?

 2011/11/25 Petar Dobrev petar.dob...@myphilanthropedia.org

  On Fri, Nov 25, 2011 at 7:59 PM, Mattias Persson
  matt...@neotechnology.comwrote:
 
  
   Correct, it finds paths on that depth only. If other paths are
  encountered
   along the way they aren't returned.
  
  
 
  However, in the example I provided it misses a path that is present on
 the
  desired depth, that's what I was actually wondering about.
 
  In this example:
 
  The source of the testing program is here:
 https://gist.github.com/1391654
  Output before adding the additional relationship:
  https://gist.github.com/1391668
  Output after adding the additional relationship:
  https://gist.github.com/1391661
 
  shortestPath misses one path (at depth 3) unless an additional
 relationship
  is present, which is unrelated to the paths between the nodes.
 
  Petar
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 



 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Petar Dobrev
Engineer
Philanthropedia
http://www.myphilanthropedia.org
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] py2neo - GEOFF enhancements

2011-12-01 Thread Michael Hunger
Nigel,

is it possible to also do index-lookups in geoff?
and use those as nodes or rels or even as hooks for later on?

I'm also toying with two other ideas:
#1 using indexes as the third primitive besides nodes and rels in geoff just 
with a different delimeter (e.g. | as you already have) 
#2 giving indexes a similar semantics as relationships to category nodes (which 
is the same for in-graph indexes, where the index-name is the category-type and 
indexed key-values are properties on the relationship or relationships)

I'm not really satisfied with the syntaxes I came up with and would like to 
brainstorm that.

|index| -{foo:bar} -(bert)


some ideas for alternative index syntaxes
#add
|index:{foo:bar}|+={foo}
# replace
|index:{foo:bar}|={foo}
# remove
|index:{foo:bar}|-={foo}

#query
|index:{foo:bar}| -[:KNOWS]-(bert)
|index:querystring| -[:KNOWS]-(bert)

Am 01.12.2011 um 01:32 schrieb Nigel Small:

 Peter: I am happy with the current state of the neo4j-geoff code so feel it
 should be stable enough to adopt when you wish to do so. I have also made a
 couple of recent updates to the documentation, most notably the GEOFF.md
 file.
 
 Cheers
 
 Nige
 
 *Nigel Small*
 Phone: +44 7814 638 246
 Blog: http://nigelsmall.name/
 GTalk: ni...@nigelsmall.name
 MSN: nasm...@live.co.uk
 Skype: technige
 Twitter: @technige https://twitter.com/#%21/technige
 LinkedIn: http://uk.linkedin.com/in/nigelsmall
 
 
 
 On 29 November 2011 23:33, Michael Hunger
 michael.hun...@neotechnology.comwrote:
 
 #1 Thanks
 #2 You're probably right
 
 #3 You can do the index lookup outside and pass in the IndexHitsNode as
 being and Iterator
 #3 I rather thought of {name} for |people| - {name: {hook}} as a shortcut
 for that
 
 Michael
 
 But #2 and #3 are probably overkill anyway.
 
 Cheers
 
 Michael
 
 Am 29.11.2011 um 23:59 schrieb Nigel Small:
 
 Hi Michael
 
 Probably better to just return the full map and let the client code deal
 with it ? (If it isn't interested it would either just ignore the return
 result or discard it quickly).
 Done. Now works as:
 
 MapString,PropertyContainer entities =
 GEOFFLoader.loadIntoNeo4j(reader,
 db, hooks);
 Node nodeFoo = (Node) entities.get((foo));
 Node nodeBar = (Node) entities.get((bar));
 
 Intention behind longs, is when I get them from an external source then
 they can be used to be look up nodes during import.
 This can be done but not sure it's the right place... I'm cautious about
 using IDs directly as they aren't very portable. Also, it's not intuitive
 whether an ID is for a node or relationship. Would like to get a few
 votes
 on this - I'm happy to be outvoted if the consensus is to do it!
 
 Also can hooks be used for index lookups? (Just asking)
 Are you thinking of something like {People:name=bert}? If so, this is
 quite a distance from where we are currently since every token can only
 refer to a single entity, whereas an index lookup could return multiple
 results.
 
 Nige
 
 *Nigel Small*
 Phone: +44 7814 638 246
 Blog: http://nigelsmall.name/
 GTalk: ni...@nigelsmall.name
 MSN: nasm...@live.co.uk
 Skype: technige
 Twitter: @technige https://twitter.com/#%21/technige
 LinkedIn: http://uk.linkedin.com/in/nigelsmall
 
 
 
 On 29 November 2011 22:09, Michael Hunger
 michael.hun...@neotechnology.comwrote:
 
 Hmm good question, that means the namespace keeps everything around
 until
 it is gc'ed ?
 
 Probably better to just return the full map and let the client code deal
 with it ? (If it isn't interested it would either just ignore the return
 result or discard it quickly).
 
 Intention behind longs, is when I get them from an external source then
 they can be used to be look up nodes during import.
 
 Also can hooks be used for index lookups? (Just asking)
 
 Thanks a lot
 
 Michael
 
 Am 29.11.2011 um 22:58 schrieb Nigel Small:
 
 Hi Michael
 
 Doesn't handle iterables (yet) but should be quite easy to add in. What
 purpose did you have behind longs?
 
 I've just committed a few new methods allowing the Neo4jNamespace
 returned
 from a loadIntoNeo4j call to be used to retrieve new entities by name
 (or a
 map of such). The new methods are:
 
 public Node getPreexistingNode(String name)
 public MapString, Node getPreexistingNodes(String... names)
 public Node getNewlyCreatedNode(String name)
 public MapString, Node getNewlyCreatedNodes(String... names)
 public Relationship getPreexistingRelationship(String name)
 public MapString, Relationship getPreexistingRelationships(String...
 names)
 public Relationship getNewlyCreatedRelationship(String name)
 public MapString, Relationship getNewlyCreatedRelationships(String...
 names)
 
 One of the tests in GraphDescriptionTest illustrates simple usage,
 thus:
 
 Neo4jNamespace ns = GEOFFLoader.loadIntoNeo4j(reader, db, hooks);
 Node nodeFoo = ns.getNewlyCreatedNode(foo);
 Node nodeBar = ns.getNewlyCreatedNode(bar);
 
 Hope this helps - I'll have a play with iterables next.
 
 Cheers
 
 Nige
 
 *Nigel Small*
 Phone: +44 7814 638 

[Neo4j] Standalone server and transactions

2011-12-01 Thread zolv
Hi

I have read as much I was able to read about Neo4j with the topic I wrote
below.

My imaginations of DB server (doesn't matter RDBMS or NoSQL) is that the
crucial things for DB server is interesting from development point of view
are (musts!):
1. DB server must be able to work as standalone server
2. DB server must provide transactions.
Can anybody guide me through these 2 things in Neo4j world?

Ad 1.
There are lots of examples to work with Neo4j as embedded. Actually these
examples works, I already made some application that was operating quite
good (embedded Neo4j was started/stopped by Singleton EJB). The only problem
is that I can use DB via application (x)or Neoclipse. Never both at the same
time. This is very annoying to stop the app and connect via Neoclipse and
vice versa.

Ad2. So first thing what I wanted to do was start Neo4j as standalone
server. The problem was thtat the only entry point to Neo4j server
is...HTTP REST. This lib (as I know) is not managed by Neo4j
project/fellows but some external fellow created it. I say - OK, let it
be. But the first thing what was written there was transactions are not
supported. Only batch operations but from my point of view this is a bit
tricky solution for transactions.

Am I missing something?
I hope I do, because in this situation, Neo4j isn't actually interesting DB
server/solution...but I want it to be.

Standalone server and transactions or GTFO.

Cheers

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3553058.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] Unique constraint and transaction over REST

2011-12-01 Thread dnagir
Hi,

I wonder what's the best way to do something similar to unique constraints
in RDBMS.

For example, user registration requires that the user's email to be unique.

Working over in Ruby over REST API, how do you achieve this?

I assume I need an auto-index on email property of User nodes. Then query it
to check the property.

But how can I make it transactional? So that I am sure that between querying
and inserting the node, no similar has been inserted.

The transactional part better applies to reservation instead of user
creation. But you get the point.

Cheers.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Unique-constraint-and-transaction-over-REST-tp3553148p3553148.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] py2neo - GEOFF enhancements

2011-12-01 Thread Nigel Small
Hi Michael

GEOFF was originally conceived as a graph serialisation format and, as
such, was intended to represent a snapshot of entities at a particular
point in time instead of, as you are discussing, a programmatic set of
actions (add, replace, remove, etc). That said, these ideas are still worth
exploring...

First off, since hooks are the variables of GEOFF, it would seem
consistent to use those for assigning the return values of index lookups
and queries. Something like the following could be used to perform an index
query, assign the result to a hook and use that hook to build a
relationship:

{foo} := |index| @ {key: value}
{foo}-[:KNOWS]-(bar)

Actually, since the index query may result in multiple returned entities,
we might want to limit to the first item returned:

{foo} := |index| @ {key:value}
{foo.1}-[:KNOWS]-(bar)

Using the other operators for adding, removing and replacing index entries,
this would make...

# add node bert to index at foo:bar
|index| @ {foo: bar} += (bert)

# remove node bert from index at foo:bar
|index| @ {foo: bar} -= (bert)

# replace node with bert in index at foo:bar
|index| @ {foo: bar} := (bert)

So essentially, we would be looking at at least the following requirements:

   1. Allow hooks to hold multiple entities instead of just a single entity
   2. Allow assignment to hooks
   3. Implement an @ operator to allow inline index queries
   4. Implement assignment, addition and removal operators to indexes

These ideas would turn GEOFF into much more of a programming language than
a notation for serialisation: a big change and one which would potentially
require another significant rewrite. I'm not against doing this but I'm
wondering if this is a valuable direction to go in and whether, if we were
to do this, it would be better to start from first principles instead.
Would this fill a gap that none of the other current options can?
Cheers

Nige

*Nigel Small*
Phone: +44 7814 638 246
Blog: http://nigelsmall.name/
GTalk: ni...@nigelsmall.name
MSN: nasm...@live.co.uk
Skype: technige
Twitter: @technige https://twitter.com/#%21/technige
LinkedIn: http://uk.linkedin.com/in/nigelsmall



On 1 December 2011 21:47, Michael Hunger
michael.hun...@neotechnology.comwrote:

 Nigel,

 is it possible to also do index-lookups in geoff?
 and use those as nodes or rels or even as hooks for later on?

 I'm also toying with two other ideas:
 #1 using indexes as the third primitive besides nodes and rels in geoff
 just with a different delimeter (e.g. | as you already have)
 #2 giving indexes a similar semantics as relationships to category nodes
 (which is the same for in-graph indexes, where the index-name is the
 category-type and indexed key-values are properties on the relationship or
 relationships)

 I'm not really satisfied with the syntaxes I came up with and would like
 to brainstorm that.

 |index| -{foo:bar} -(bert)


 some ideas for alternative index syntaxes
 #add
 |index:{foo:bar}|+={foo}
 # replace
 |index:{foo:bar}|={foo}
 # remove
 |index:{foo:bar}|-={foo}

 #query
 |index:{foo:bar}| -[:KNOWS]-(bert)
 |index:querystring| -[:KNOWS]-(bert)

 Am 01.12.2011 um 01:32 schrieb Nigel Small:

  Peter: I am happy with the current state of the neo4j-geoff code so feel
 it
  should be stable enough to adopt when you wish to do so. I have also
 made a
  couple of recent updates to the documentation, most notably the GEOFF.md
  file.
 
  Cheers
 
  Nige
 
  *Nigel Small*
  Phone: +44 7814 638 246
  Blog: http://nigelsmall.name/
  GTalk: ni...@nigelsmall.name
  MSN: nasm...@live.co.uk
  Skype: technige
  Twitter: @technige https://twitter.com/#%21/technige
  LinkedIn: http://uk.linkedin.com/in/nigelsmall
 
 
 
  On 29 November 2011 23:33, Michael Hunger
  michael.hun...@neotechnology.comwrote:
 
  #1 Thanks
  #2 You're probably right
 
  #3 You can do the index lookup outside and pass in the IndexHitsNode
 as
  being and Iterator
  #3 I rather thought of {name} for |people| - {name: {hook}} as a
 shortcut
  for that
 
  Michael
 
  But #2 and #3 are probably overkill anyway.
 
  Cheers
 
  Michael
 
  Am 29.11.2011 um 23:59 schrieb Nigel Small:
 
  Hi Michael
 
  Probably better to just return the full map and let the client code
 deal
  with it ? (If it isn't interested it would either just ignore the
 return
  result or discard it quickly).
  Done. Now works as:
 
  MapString,PropertyContainer entities =
  GEOFFLoader.loadIntoNeo4j(reader,
  db, hooks);
  Node nodeFoo = (Node) entities.get((foo));
  Node nodeBar = (Node) entities.get((bar));
 
  Intention behind longs, is when I get them from an external source
 then
  they can be used to be look up nodes during import.
  This can be done but not sure it's the right place... I'm cautious
 about
  using IDs directly as they aren't very portable. Also, it's not
 intuitive
  whether an ID is for a node or relationship. Would like to get a few
  votes
  on this - I'm happy to be outvoted if the consensus is to do it!
 
  Also can 

Re: [Neo4j] py2neo - GEOFF enhancements

2011-12-01 Thread Michael Hunger
Peter and I have been discussing what interchange format we'd like to have for 
applications feeding data into a graph.

And geoff seems to be quite a good choice.

Modifying and accessing indexes (much like in-file-hooks) would be a part of 
that.

So what I imagine is a set of connectors to outside services which are 
producing geoff which is then consumed by a server plugin (e.g. for hosted 
neo4j services on heroku). Much like STDIN and STDOUT between unix command line 
tools.

Having a declarative format that aligns more with cypher is preferable to a 
imperative format like the REST API or Gremlin. 

That's why I would also like to look into aligning the syntax with the cypher 
syntax, actually I'm more fond of the iconographic syntax but there are some 
drawbacks on readability for people.

That's some of the reasoning behind it.

Cheers

Michael

Am 02.12.2011 um 01:49 schrieb Nigel Small:

 Hi Michael
 
 GEOFF was originally conceived as a graph serialisation format and, as
 such, was intended to represent a snapshot of entities at a particular
 point in time instead of, as you are discussing, a programmatic set of
 actions (add, replace, remove, etc). That said, these ideas are still worth
 exploring...
 
 First off, since hooks are the variables of GEOFF, it would seem
 consistent to use those for assigning the return values of index lookups
 and queries. Something like the following could be used to perform an index
 query, assign the result to a hook and use that hook to build a
 relationship:
 
 {foo} := |index| @ {key: value}
 {foo}-[:KNOWS]-(bar)
 
 Actually, since the index query may result in multiple returned entities,
 we might want to limit to the first item returned:
 
 {foo} := |index| @ {key:value}
 {foo.1}-[:KNOWS]-(bar)
 
 Using the other operators for adding, removing and replacing index entries,
 this would make...
 
 # add node bert to index at foo:bar
 |index| @ {foo: bar} += (bert)
 
 # remove node bert from index at foo:bar
 |index| @ {foo: bar} -= (bert)
 
 # replace node with bert in index at foo:bar
 |index| @ {foo: bar} := (bert)
 
 So essentially, we would be looking at at least the following requirements:
 
   1. Allow hooks to hold multiple entities instead of just a single entity
   2. Allow assignment to hooks
   3. Implement an @ operator to allow inline index queries
   4. Implement assignment, addition and removal operators to indexes
 
 These ideas would turn GEOFF into much more of a programming language than
 a notation for serialisation: a big change and one which would potentially
 require another significant rewrite. I'm not against doing this but I'm
 wondering if this is a valuable direction to go in and whether, if we were
 to do this, it would be better to start from first principles instead.
 Would this fill a gap that none of the other current options can?
 Cheers
 
 Nige
 
 *Nigel Small*
 Phone: +44 7814 638 246
 Blog: http://nigelsmall.name/
 GTalk: ni...@nigelsmall.name
 MSN: nasm...@live.co.uk
 Skype: technige
 Twitter: @technige https://twitter.com/#%21/technige
 LinkedIn: http://uk.linkedin.com/in/nigelsmall
 
 
 
 On 1 December 2011 21:47, Michael Hunger
 michael.hun...@neotechnology.comwrote:
 
 Nigel,
 
 is it possible to also do index-lookups in geoff?
 and use those as nodes or rels or even as hooks for later on?
 
 I'm also toying with two other ideas:
 #1 using indexes as the third primitive besides nodes and rels in geoff
 just with a different delimeter (e.g. | as you already have)
 #2 giving indexes a similar semantics as relationships to category nodes
 (which is the same for in-graph indexes, where the index-name is the
 category-type and indexed key-values are properties on the relationship or
 relationships)
 
 I'm not really satisfied with the syntaxes I came up with and would like
 to brainstorm that.
 
 |index| -{foo:bar} -(bert)
 
 
 some ideas for alternative index syntaxes
 #add
 |index:{foo:bar}|+={foo}
 # replace
 |index:{foo:bar}|={foo}
 # remove
 |index:{foo:bar}|-={foo}
 
 #query
 |index:{foo:bar}| -[:KNOWS]-(bert)
 |index:querystring| -[:KNOWS]-(bert)
 
 Am 01.12.2011 um 01:32 schrieb Nigel Small:
 
 Peter: I am happy with the current state of the neo4j-geoff code so feel
 it
 should be stable enough to adopt when you wish to do so. I have also
 made a
 couple of recent updates to the documentation, most notably the GEOFF.md
 file.
 
 Cheers
 
 Nige
 
 *Nigel Small*
 Phone: +44 7814 638 246
 Blog: http://nigelsmall.name/
 GTalk: ni...@nigelsmall.name
 MSN: nasm...@live.co.uk
 Skype: technige
 Twitter: @technige https://twitter.com/#%21/technige
 LinkedIn: http://uk.linkedin.com/in/nigelsmall
 
 
 
 On 29 November 2011 23:33, Michael Hunger
 michael.hun...@neotechnology.comwrote:
 
 #1 Thanks
 #2 You're probably right
 
 #3 You can do the index lookup outside and pass in the IndexHitsNode
 as
 being and Iterator
 #3 I rather thought of {name} for |people| - {name: {hook}} as a
 shortcut
 for that
 
 Michael
 
 But #2 

[Neo4j] Controlling Traversal Depth with Python Neo4j Bindings

2011-12-01 Thread Chris Diehl
Hi Jake,

I have a situation where I want to start at a given node in my graph and
traverse down a linear chain of nodes a specified # of hops. Is there a way
for me to specify the traversal depth using the Python bindings?
If not, what would you suggest as the best way to achieve that goal?

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


Re: [Neo4j] py2neo - GEOFF enhancements

2011-12-01 Thread Nigel Small
OK cool, that gives me some context. I'll put together some ideas over the
next few days and we can compare notes :-)

*Nigel Small*
Phone: +44 7814 638 246
Blog: http://nigelsmall.name/
GTalk: ni...@nigelsmall.name
MSN: nasm...@live.co.uk
Skype: technige
Twitter: @technige https://twitter.com/#%21/technige
LinkedIn: http://uk.linkedin.com/in/nigelsmall



On 2 December 2011 01:02, Michael Hunger
michael.hun...@neotechnology.comwrote:

 Peter and I have been discussing what interchange format we'd like to have
 for applications feeding data into a graph.

 And geoff seems to be quite a good choice.

 Modifying and accessing indexes (much like in-file-hooks) would be a part
 of that.

 So what I imagine is a set of connectors to outside services which are
 producing geoff which is then consumed by a server plugin (e.g. for hosted
 neo4j services on heroku). Much like STDIN and STDOUT between unix command
 line tools.

 Having a declarative format that aligns more with cypher is preferable to
 a imperative format like the REST API or Gremlin.

 That's why I would also like to look into aligning the syntax with the
 cypher syntax, actually I'm more fond of the iconographic syntax but there
 are some drawbacks on readability for people.

 That's some of the reasoning behind it.

 Cheers

 Michael

 Am 02.12.2011 um 01:49 schrieb Nigel Small:

  Hi Michael
 
  GEOFF was originally conceived as a graph serialisation format and, as
  such, was intended to represent a snapshot of entities at a particular
  point in time instead of, as you are discussing, a programmatic set of
  actions (add, replace, remove, etc). That said, these ideas are still
 worth
  exploring...
 
  First off, since hooks are the variables of GEOFF, it would seem
  consistent to use those for assigning the return values of index lookups
  and queries. Something like the following could be used to perform an
 index
  query, assign the result to a hook and use that hook to build a
  relationship:
 
  {foo} := |index| @ {key: value}
  {foo}-[:KNOWS]-(bar)
 
  Actually, since the index query may result in multiple returned entities,
  we might want to limit to the first item returned:
 
  {foo} := |index| @ {key:value}
  {foo.1}-[:KNOWS]-(bar)
 
  Using the other operators for adding, removing and replacing index
 entries,
  this would make...
 
  # add node bert to index at foo:bar
  |index| @ {foo: bar} += (bert)
 
  # remove node bert from index at foo:bar
  |index| @ {foo: bar} -= (bert)
 
  # replace node with bert in index at foo:bar
  |index| @ {foo: bar} := (bert)
 
  So essentially, we would be looking at at least the following
 requirements:
 
1. Allow hooks to hold multiple entities instead of just a single
 entity
2. Allow assignment to hooks
3. Implement an @ operator to allow inline index queries
4. Implement assignment, addition and removal operators to indexes
 
  These ideas would turn GEOFF into much more of a programming language
 than
  a notation for serialisation: a big change and one which would
 potentially
  require another significant rewrite. I'm not against doing this but I'm
  wondering if this is a valuable direction to go in and whether, if we
 were
  to do this, it would be better to start from first principles instead.
  Would this fill a gap that none of the other current options can?
  Cheers
 
  Nige
 
  *Nigel Small*
  Phone: +44 7814 638 246
  Blog: http://nigelsmall.name/
  GTalk: ni...@nigelsmall.name
  MSN: nasm...@live.co.uk
  Skype: technige
  Twitter: @technige https://twitter.com/#%21/technige
  LinkedIn: http://uk.linkedin.com/in/nigelsmall
 
 
 
  On 1 December 2011 21:47, Michael Hunger
  michael.hun...@neotechnology.comwrote:
 
  Nigel,
 
  is it possible to also do index-lookups in geoff?
  and use those as nodes or rels or even as hooks for later on?
 
  I'm also toying with two other ideas:
  #1 using indexes as the third primitive besides nodes and rels in geoff
  just with a different delimeter (e.g. | as you already have)
  #2 giving indexes a similar semantics as relationships to category nodes
  (which is the same for in-graph indexes, where the index-name is the
  category-type and indexed key-values are properties on the relationship
 or
  relationships)
 
  I'm not really satisfied with the syntaxes I came up with and would like
  to brainstorm that.
 
  |index| -{foo:bar} -(bert)
 
 
  some ideas for alternative index syntaxes
  #add
  |index:{foo:bar}|+={foo}
  # replace
  |index:{foo:bar}|={foo}
  # remove
  |index:{foo:bar}|-={foo}
 
  #query
  |index:{foo:bar}| -[:KNOWS]-(bert)
  |index:querystring| -[:KNOWS]-(bert)
 
  Am 01.12.2011 um 01:32 schrieb Nigel Small:
 
  Peter: I am happy with the current state of the neo4j-geoff code so
 feel
  it
  should be stable enough to adopt when you wish to do so. I have also
  made a
  couple of recent updates to the documentation, most notably the
 GEOFF.md
  file.
 
  Cheers
 
  Nige
 
  *Nigel Small*
  Phone: +44 7814 638 

Re: [Neo4j] Standalone server and transactions

2011-12-01 Thread Dmytrii Nagirniak
Being able to access a single database is crucial requirement for me (fix 
production data on the spot, spin multiple instances of the app for example).

The options for that are:
1. REST API
2. Native with Enterprise edition (not sure exactly it actually allows 
connecting from multiple sources?).

The option 1 isn't the best fit if you need transactions heavily (which is not 
common for all applications).
The option 2 isn't good if you are not ready to pay the Enterprise price.

I lean to have option 1.
The batching for transactions may work well enough.
I've asked the question about it here: 
http://neo4j-community-discussions.438527.n3.nabble.com/Unique-constraint-and-transaction-over-REST-tp3553148p3553148.html

But basically, with the REST you can't have the transactions as by definition 
HTTP is stateless.

So I would say it's a trade-off.

On 02/12/2011, at 9:03 AM, zolv wrote:

 Hi
 
 I have read as much I was able to read about Neo4j with the topic I wrote
 below.
 
 My imaginations of DB server (doesn't matter RDBMS or NoSQL) is that the
 crucial things for DB server is interesting from development point of view
 are (musts!):
 1. DB server must be able to work as standalone server
 2. DB server must provide transactions.
 Can anybody guide me through these 2 things in Neo4j world?
 
 Ad 1.
 There are lots of examples to work with Neo4j as embedded. Actually these
 examples works, I already made some application that was operating quite
 good (embedded Neo4j was started/stopped by Singleton EJB). The only problem
 is that I can use DB via application (x)or Neoclipse. Never both at the same
 time. This is very annoying to stop the app and connect via Neoclipse and
 vice versa.
 
 Ad2. So first thing what I wanted to do was start Neo4j as standalone
 server. The problem was thtat the only entry point to Neo4j server
 is...HTTP REST. This lib (as I know) is not managed by Neo4j
 project/fellows but some external fellow created it. I say - OK, let it
 be. But the first thing what was written there was transactions are not
 supported. Only batch operations but from my point of view this is a bit
 tricky solution for transactions.
 
 Am I missing something?
 I hope I do, because in this situation, Neo4j isn't actually interesting DB
 server/solution...but I want it to be.
 
 Standalone server and transactions or GTFO.
 
 Cheers
 
 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3553058.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] REST API - always batch?

2011-12-01 Thread Dmytrii Nagirniak
 
 1. There are limits to how large the results can be from a batch API call.

Just curious, what those limits are and what happens if you hit it?


 2. ... We have lots of ideas for how we
 can improve the current REST API (add full transactional support, massively
 improve throughput and latency), and so we would rather go down that road.
 The batch API is a pragmatic solution to a big problem, but I don't think
 it is a good long-term path to take.

That is really interesting. Can you give a bit more details on the REST 
transaction API?
Any estimations on this?


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


Re: [Neo4j] Will there ever be a native SDK for Node.js?

2011-12-01 Thread Dmytrii Nagirniak

On 01/12/2011, at 11:34 PM, Tero Paananen wrote:

 Spring Data for Neo4J and the rest of
 the Spring framework (as an example) it's pretty damn
 easy to provide remote access to a Neo4J data store.

Are you saying that your WEB application should become a database server? That 
is not appropriate architecture.
And you would have to re-create the API that is already available through 
neo4js REST API.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Will there ever be a native SDK for Node.js?

2011-12-01 Thread Tero Paananen
On 12/1/2011 10:47 PM, Dmytrii Nagirniak wrote:
 
 On 01/12/2011, at 11:34 PM, Tero Paananen wrote:
 
 Spring Data for Neo4J and the rest of
 the Spring framework (as an example) it's pretty damn
 easy to provide remote access to a Neo4J data store.
 
 Are you saying that your WEB application should become a database server?

No. I'm saying that you have options that will allow
you to easily adapt your solution to whatever your
needs are without putting everything and the kitchen
sink into the database server.

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


[Neo4j] Design Guides

2011-12-01 Thread Dmytrii Nagirniak
Hi,

Are there any database *design* guidelines to follow?
What I mean by that is how to structure node and relationships?
Should you stick all nodes to the Reference node? Should you group it through a 
particular node etc?

This would be very useful for people coming from RDBMS and other databases to 
correct the way of thinking.

For example, creating users in the system, I want to be able to access those by 
email or so.
So I instead of indexing email field it is recommended (I believe) to make the 
Users reachable by graph.

Thus it should be linked to the Reference node (0). 
Next question, should you have direct relationship ROOT -users- User or have 
it through the container node, like ROOT-users- USERS -users- User.

I looked at the docs, but couldn't find something like this.

Cheers,
Dima
http://www.ApproachE.com




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


Re: [Neo4j] Standalone server and transactions

2011-12-01 Thread Jim Webber
Hi,

 1. DB server must be able to work as standalone server
 2. DB server must provide transactions.
 Can anybody guide me through these 2 things in Neo4j world?

1. Neo4j works as a standalone (or clustered) server which is accessible 
through the REST API.
2. Neo4j is ACID transactional with each HTTP request to the server being 
internally scoped in a single transaction.

HTH,

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


Re: [Neo4j] Named matched with depth gives error

2011-12-01 Thread Jim Webber
Hi Dima,

There's a nightly snapshot that you can grab if you're interested in being on 
the bleeding edge. It's in the Neo4j repo:

http://m2.neo4j.org/

And so the latest Cypher build is here:

http://m2.neo4j.org/org/neo4j/neo4j-cypher/1.6-SNAPSHOT/

You can just add a snapshot dependency to your Maven POM/Ivy settings/whatever 
else to get this automatically as part of your build.

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


[Neo4j] Log message for unmanaged extension

2011-12-01 Thread Brendan cheng

Hi,
I tried to debug my unmanaged extension with 
private static final Logger log = Logger.getLogger(Register.class);
and
generate a message like:
log.warn(passed check point 1);
But I couldn't find any these messages from any log files, neo4j.0.0.log, 
console.log, message.log...etc
How should I setup the log message?
Regards,
Brendan   
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Named matched with depth gives error

2011-12-01 Thread Michael Hunger
download the 1.6 SNAPSHOT from neo4j.org/downloads

mobile mail please excuse brevity and typos

Am 02.12.2011 um 01:27 schrieb dnagir dna...@gmail.com:

 I fixed this 
 yesterdayhttps://github.com/neo4j/community/commit/37c2867871c7d953c2021177d0b72cd8ba825be0.
  
 
 Thanks a lot for that.
 How can I get the build that includes the fix? (Sorry for the question, but 
 just starting with noe4j).
 
 Sorry you ran into it... 
 NP.
 
 Cheers.
 
 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Named-matched-with-depth-gives-error-tp3548195p3553337.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] Named matched with depth gives error

2011-12-01 Thread dnagir
Thank Michael,

I didn't realise there's snapshot version available from the download page.

I prefer downloading the whole package instead of one particular thing, as Jim 
suggested.

But glad to know there's such an option.

Cheers.

On 02/12/2011, at 5:20 PM, Michael Hunger [via Neo4j Community Discussions] 
wrote:

 download the 1.6 SNAPSHOT from neo4j.org/downloads 
 
 mobile mail please excuse brevity and typos 
 
 Am 02.12.2011 um 01:27 schrieb dnagir [hidden email]: 
 
  I fixed this 
  yesterdayhttps://github.com/neo4j/community/commit/37c2867871c7d953c2021177d0b72cd8ba825be0.
   
  
  Thanks a lot for that. 
  How can I get the build that includes the fix? (Sorry for the question, but 
  just starting with noe4j). 
  
  Sorry you ran into it... 
  NP. 
  
  Cheers. 
  
  -- 
  View this message in context: 
  http://neo4j-community-discussions.438527.n3.nabble.com/Named-matched-with-depth-gives-error-tp3548195p3553337.html
  Sent from the Neo4j Community Discussions mailing list archive at 
  Nabble.com. 
  ___ 
  Neo4j mailing list 
  [hidden email] 
  https://lists.neo4j.org/mailman/listinfo/user
 ___ 
 Neo4j mailing list 
 [hidden email] 
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 If you reply to this email, your message will be added to the discussion 
 below:
 http://neo4j-community-discussions.438527.n3.nabble.com/Named-matched-with-depth-gives-error-tp3548195p3553894.html
 To unsubscribe from Named matched with depth gives error, click here.
 NAML



--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Named-matched-with-depth-gives-error-tp3548195p3553941.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] Standalone server and transactions

2011-12-01 Thread Dmytrii Nagirniak

On 02/12/2011, at 4:48 PM, Jim Webber wrote:

 1. Neo4j works as a standalone (or clustered) server which is accessible 
 through the REST API.

That's the point. There is not standalone version with native bindings.
You either run embedded and lock the whole database to the particular app, or 
you go with REST that doesn't support transactions (batch != transaction)...

 2. Neo4j is ACID transactional with each HTTP request to the server being 
 internally scoped in a single transaction.
Unfortunately it is not always enough, even when using batch API.

Here is the use-case:
1. Query for a nodes/rels.
2. Run some custom logic on the client.
3. Update nodes/rels appropriately.

This is the most common way of using databases. And currently it is not 
possible to wrap it in a transaction.

So the only alternative in this case is to use native binding, which may not be 
available to all. And means we are back at point 1.

Do you see what I mean here?
It's a trade-off: ACID vs DB with multiple clients.


A way of doing transactions over REST would be nice. But it will be extremely 
hard to implement due to the stateless nature of HTTP.
I can see something like this in API:

POST /transaction?timeout=2
# Returns the ID of the transaction for the future

# then use the normal API...


PUT /transactions/1234/commit
# or
PUT /transactions/1234/rollback
# or
DESTROY /transactions/1234
# or automatically rollback after 2 secs


But I am not sure this can work reliably and performant enough with HTTP.

Cheers.



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


Re: [Neo4j] Standalone server and transactions

2011-12-01 Thread Michael Hunger

Am 01.12.2011 um 23:03 schrieb zolv:

 Hi
 
 I have read as much I was able to read about Neo4j with the topic I wrote
 below.
 
 My imaginations of DB server (doesn't matter RDBMS or NoSQL) is that the
 crucial things for DB server is interesting from development point of view
 are (musts!):
 1. DB server must be able to work as standalone server

Neo4j comes as stand-alone server accessible via an REST API. 
You can add other API's on top of the embedded Graph Database yourself by using 
Plugins / Extensions.

 2. DB server must provide transactions.
Neo4j is one of the few NOSQL solutions that offers ACID capabilities and 
transactions.

 Can anybody guide me through these 2 things in Neo4j world?
 
 Ad 1.
 There are lots of examples to work with Neo4j as embedded. Actually these
 examples works, I already made some application that was operating quite
 good (embedded Neo4j was started/stopped by Singleton EJB). The only problem
 is that I can use DB via application (x)or Neoclipse. Never both at the same
 time. This is very annoying to stop the app and connect via Neoclipse and
 vice versa.

Neoclipse can access a neo4j-database in readonly mode which is possible at the 
same time.

 
 Ad2. So first thing what I wanted to do was start Neo4j as standalone
 server. The problem was thtat the only entry point to Neo4j server
 is...HTTP REST. This lib (as I know) is not managed by Neo4j
 project/fellows but some external fellow created it. I say - OK, let it

What lib are you referring to? A client library? (this one? 
https://github.com/neo4j/java-rest-binding)

There are REST clients for many languages and it is fairly easy to write your 
own.
Still, the solution that is most flexible and performant is either to embed 
neo4j and expose domain protocol endpoints in your own server or write a server 
plugin/extension that provides those.

 be. But the first thing what was written there was transactions are not
 supported. Only batch operations but from my point of view this is a bit
 tricky solution for transactions.

Each HTTP request is a single transaction. Other approaches that handles 
transaction over the wire individually and longer running are planned. 

 Am I missing something?
 I hope I do, because in this situation, Neo4j isn't actually interesting DB
 server/solution...but I want it to be.

I would like to know some more detailed reasons for that, so far we haven't 
received this kind of response.

Thanks a lot

Michael
 
 Standalone server and transactions or GTFO.
 
 Cheers
 
 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Standalone-server-and-transactions-tp3553058p3553058.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] Standalone server and transactions

2011-12-01 Thread Michael Hunger
No, the alternative there is to provide a server-side extension that 
encapsulates your business logic as an endpoint running inside of a tx.

Cheers

Michael

Am 02.12.2011 um 08:30 schrieb Dmytrii Nagirniak:

 
 On 02/12/2011, at 4:48 PM, Jim Webber wrote:
 
 1. Neo4j works as a standalone (or clustered) server which is accessible 
 through the REST API.
 
 That's the point. There is not standalone version with native bindings.
 You either run embedded and lock the whole database to the particular app, or 
 you go with REST that doesn't support transactions (batch != transaction)...
 
 2. Neo4j is ACID transactional with each HTTP request to the server being 
 internally scoped in a single transaction.
 Unfortunately it is not always enough, even when using batch API.
 
 Here is the use-case:
 1. Query for a nodes/rels.
 2. Run some custom logic on the client.
 3. Update nodes/rels appropriately.
 
 This is the most common way of using databases. And currently it is not 
 possible to wrap it in a transaction.
 
 So the only alternative in this case is to use native binding, which may not 
 be available to all. And means we are back at point 1.
 
 Do you see what I mean here?
 It's a trade-off: ACID vs DB with multiple clients.
 
 
 A way of doing transactions over REST would be nice. But it will be extremely 
 hard to implement due to the stateless nature of HTTP.
 I can see something like this in API:
 
 POST /transaction?timeout=2
 # Returns the ID of the transaction for the future
 
 # then use the normal API...
 
 
 PUT /transactions/1234/commit
 # or
 PUT /transactions/1234/rollback
 # or
 DESTROY /transactions/1234
 # or automatically rollback after 2 secs
 
 
 But I am not sure this can work reliably and performant enough with HTTP.
 
 Cheers.
 
 
 
 ___
 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